/* ==========================================================================
   APP TOUR - MOTORE TOUR GUIDATO A STEP (Dark & Gold Theme)
   ========================================================================== */

:root {
    --tour-overlay-bg: rgba(0, 0, 0, 0.78);
    --tour-card-bg: #18191c;
    --tour-card-border: #383a40;
    --tour-primary: #FFC107;
    --tour-primary-glow: rgba(255, 193, 7, 0.45);
    --tour-text: #ffffff;
    --tour-text-muted: #b5bac1;
}

/* Overlay Backdrop */
.app-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--tour-overlay-bg);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Spotlight Element Highlight */
.app-tour-target-highlight {
    position: relative !important;
    z-index: 10005 !important;
    box-shadow: 0 0 0 4px var(--tour-primary), 0 0 24px var(--tour-primary-glow), 0 8px 30px rgba(0, 0, 0, 0.8) !important;
    border-radius: 12px !important;
    transition: box-shadow 0.25s ease-in-out, background-color 0.25s ease !important;
    pointer-events: auto !important;
    background-color: var(--tour-card-bg) !important;
}

/* Quando l'elemento evidenziato è un bottone piccolo o icona navbar, assicuriamo padding e contrasto */
button.app-tour-target-highlight,
a.app-tour-target-highlight {
    padding: 6px 10px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Gestione elementi contenuti dentro navbar/container con z-index o stacking context */
.app-tour-target-parent {
    z-index: 10004 !important;
}

/* Tour Popover Card */
.app-tour-popover {
    position: fixed;
    z-index: 10030 !important;
    width: 320px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    background-color: var(--tour-card-bg);
    border: 1px solid var(--tour-card-border);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
    color: var(--tour-text);
    padding: 18px 20px;
    opacity: 0;
    transform: scale(0.94) translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    box-sizing: border-box;
}

.app-tour-popover::-webkit-scrollbar {
    width: 4px;
}
.app-tour-popover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.app-tour-popover.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Header */
.app-tour-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.app-tour-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: rgba(255, 193, 7, 0.15);
    color: var(--tour-primary);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 20px;
    padding: 3px 9px;
}

.app-tour-close-btn {
    background: transparent;
    border: none;
    color: var(--tour-text-muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.app-tour-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Content */
.app-tour-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.app-tour-body {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--tour-text-muted);
    margin-bottom: 16px;
}

.app-tour-body strong {
    color: #fff;
}

/* Footer / Actions */
.app-tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
    margin-top: 4px;
}

.app-tour-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.app-tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.app-tour-dot.active {
    background-color: var(--tour-primary);
    transform: scale(1.3);
}

.app-tour-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-tour-btn {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.app-tour-btn-prev {
    background: transparent;
    color: var(--tour-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.app-tour-btn-prev:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.app-tour-btn-next {
    background: var(--tour-primary);
    color: #111;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.app-tour-btn-next:hover {
    background: #ffcd38;
    transform: translateY(-1px);
}

.app-tour-btn-skip {
    background: transparent;
    color: var(--tour-text-muted);
    font-size: 0.78rem;
    padding: 6px 8px;
}

.app-tour-btn-skip:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

/* Pulsante Guida Pagina */
.btn-tour-help {
    font-size: 0.82rem;
    padding: 4px 10px;
    border-radius: 20px;
    color: #ffc107 !important;
    border: 1px solid rgba(255, 193, 7, 0.4) !important;
    background: rgba(255, 193, 7, 0.08) !important;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-tour-help:hover {
    background: rgba(255, 193, 7, 0.2) !important;
    border-color: #ffc107 !important;
    transform: scale(1.03);
}
