/* Tour-System: Gefuehrte Tour mit Overlay, Spotlight und Schritt-Tooltips */

/* Tour Overlay */
.tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 250000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.tour-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Spotlight - box-shadow erzeugt die Verdunkelung rund herum */
.tour-spotlight {
  position: absolute;
  border-radius: 4px;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.82),
    0 0 0 2px #2f81f7,
    0 0 0 4px rgba(47, 129, 247, 0.35),
    0 0 32px rgba(47, 129, 247, 0.5);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  opacity: 0;
}

/* Tour Tooltip */
.tour-tooltip {
  position: fixed;
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.07) inset;
  width: 320px;
  max-width: calc(100vw - 32px);
  z-index: 250001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, top 0.4s ease, left 0.4s ease;
  font-family: Arial, Helvetica, sans-serif;
}

.tour-tooltip.active {
  opacity: 1;
  visibility: visible;
}

/* Tooltip Header */
.tour-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px 6px 0 0;
}

.tour-step-indicator {
  font-size: 11px;
  font-weight: 600;
  color: #2f81f7;
  background: rgba(47, 129, 247, 0.12);
  border: 1px solid rgba(47, 129, 247, 0.28);
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.tour-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.tour-close-btn:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}

/* Tooltip Content */
.tour-tooltip-title {
  margin: 0;
  padding: 16px 16px 8px;
  font-size: 15px;
  font-weight: 700;
  color: #e6edf3;
}

.tour-tooltip-content {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(230, 237, 243, 0.72);
}

/* Tooltip Footer */
.tour-tooltip-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 0 6px 6px;
}

.tour-btn-group {
  display: flex;
  gap: 8px;
}

/* Tour Buttons */
.tour-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.tour-btn-skip {
  background: none;
  color: rgba(255, 255, 255, 0.45);
}

.tour-btn-skip:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
}

.tour-btn-prev {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tour-btn-prev:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #e6edf3;
}

.tour-btn-next {
  background: #2f81f7;
  color: #fff;
}

.tour-btn-next:hover {
  background: #1c7cd6;
  box-shadow: 0 4px 14px rgba(47, 129, 247, 0.4);
}

/* Floating Tour Button */
.tour-floating-btn {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-fg-inverse);
  border: 2px solid var(--color-bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  z-index: 10010;
}

/* Floating Legal Button */
.legal-floating-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg-overlay);
  color: var(--color-fg-default);
  border: 1px solid var(--color-border-emphasis);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  z-index: 100000;
}

.legal-floating-btn:hover {
  background: var(--color-bg-overlay);
  color: var(--color-fg-default);
  transform: scale(1.05);
}

.legal-floating-btn svg {
  flex-shrink: 0;
}

/* Floating Menu */
.legal-floating-menu {
  position: absolute;
  bottom: 48px;
  right: 0;
  background: var(--color-bg-overlay);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: 8px 0;
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.legal-floating-btn:hover .legal-floating-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.legal-floating-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--color-fg-default);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.2s ease;
}

.legal-floating-menu a:hover {
  background: var(--color-bg-input);
  color: var(--color-primary);
}

.tour-floating-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(47, 129, 247, 0.5);
}

.tour-floating-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.tour-floating-btn svg {
  flex-shrink: 0;
}

/* Tooltip fÃ¼r floating button */
.tour-floating-btn::after {
  content: attr(title);
  position: absolute;
  left: 52px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-bg-overlay);
  color: var(--color-fg-default);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tour-floating-btn:hover::after {
  opacity: 1;
  visibility: visible;
}
