/* ── TaskPilot Guided Tour — Landing-Look ──────────────────────────────────────
   Immer-dunkles Glas-Chrome mit Orange-Akzent, unabhängig vom App-Theme
   (bewusst — die Tour setzt die Landing-Story fort). */

/* Backdrop — full-screen click blocker; background set by JS */
.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: all;
    transition: background 0.26s ease;
}

/* Spotlight ring — box-shadow creates the surrounding dim + accent outline.
   Längere Transition → der Spot GLEITET zwischen den Zielen. */
.tour-spotlight {
    position: fixed;
    z-index: 9001;
    border-radius: 16px;
    pointer-events: none;
    box-shadow:
        0 0 0 9999px rgba(5, 5, 8, 0.78),
        0 0 0 2px #f97316,
        0 0 24px rgba(249, 115, 22, 0.35);
    transition:
        left   0.5s cubic-bezier(0.4, 0, 0.2, 1),
        top    0.5s cubic-bezier(0.4, 0, 0.2, 1),
        width  0.5s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tooltip: dunkles Glas-Panel im Landing-Stil */
.tour-tooltip {
    position: fixed;
    z-index: 9002;
    width: min(380px, calc(100vw - 32px));
    background: rgba(22, 22, 28, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, 0.14),
        0 40px 100px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    animation: tour-tt-in 0.32s cubic-bezier(0.34, 1.28, 0.64, 1) both;
    pointer-events: all;
}

@keyframes tour-tt-in {
    from { opacity: 0; transform: scale(0.94) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Center-Mode braucht die translate(-50%,-50%)-Position — Keyframe-Transform
   würde sie überschreiben, daher dort nur Fade. */
.tour-tooltip[style*="translate(-50%"] {
    animation-name: tour-tt-in-center;
}

@keyframes tour-tt-in-center {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Progress bar strip */
.tour-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    width: 100%;
}

.tour-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #fb923c);
    border-radius: 0 999px 999px 0;
    transition: width 0.32s ease;
}

/* Inner padding wrapper */
.tour-inner {
    padding: 20px 20px 18px;
    position: relative;
}

/* Close button */
.tour-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.05);
    color: #a3a3ad;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease, color 0.12s ease;
    z-index: 1;
}
.tour-close:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fafafc;
}

/* Step counter */
.tour-counter {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    color: #f97316;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Title */
.tour-h {
    font-size: 17px;
    font-weight: 800;
    color: #fafafc;
    letter-spacing: -0.03em;
    line-height: 1.22;
    margin-bottom: 10px;
    padding-right: 28px;
}

/* Body text */
.tour-p {
    font-size: 13.5px;
    line-height: 1.62;
    color: #d9d9df;
    margin-bottom: 0;
}

/* Footer row */
.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 16px;
}

.tour-footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons — Landing-Pill-Stil */
.tour-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}
.tour-btn:hover { transform: translateY(-1px); }
.tour-btn:active { transform: none; }

.tour-btn--pri {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border: none;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.30);
}
.tour-btn--pri:hover {
    box-shadow: 0 8px 26px rgba(249, 115, 22, 0.40);
    filter: brightness(1.05);
}

.tour-btn--sec {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #d9d9df;
}
.tour-btn--sec:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.20);
    color: #fafafc;
}

.tour-btn--ghost {
    background: transparent;
    border: 1px solid transparent;
    color: #a3a3ad;
}
.tour-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.10);
    color: #d9d9df;
}

/* Done step: stacked CTA buttons */
.tour-done-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.tour-btn--full {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

/* Footer layout when done-actions is present */
.tour-footer:has(.tour-done-actions) {
    flex-direction: column;
    align-items: stretch;
}
.tour-footer:has(.tour-done-actions) > span:first-child {
    display: none;
}
.tour-footer:has(.tour-done-actions) .tour-footer-right {
    width: 100%;
}

/* ── Center mode overlay (no spotlight target) ───────────────── */
.tour-overlay--dim {
    background: rgba(5, 5, 8, 0.78);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 680px) {
    .tour-tooltip {
        width: calc(100vw - 24px) !important;
        left: 12px !important;
        right: auto !important;
        top: auto !important;
        bottom: 16px !important;
        transform: none !important;
        position: fixed !important;
        max-height: 70vh;
        overflow-y: auto;
        border-radius: 20px 20px 16px 16px;
    }

    .tour-spotlight {
        display: none !important;
    }

    .tour-overlay {
        background: rgba(5, 5, 8, 0.72) !important;
    }
}

/* ── Reduced Motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .tour-spotlight {
        transition: none;
    }

    .tour-tooltip {
        animation: none;
    }

    .tour-progress-fill {
        transition: none;
    }

    .tour-btn:hover {
        transform: none;
    }
}
