/* ==========================================================================
   PnP Free Mode — Welcome Modal + Banner + Tour Styles
   Theme: Navy #0D2849 / Gold #CEBA4C / Glass-morphism
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Welcome Modal Overlay
   --------------------------------------------------------------------------- */
#pnp-welcome-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#pnp-welcome-overlay.welcome-visible {
    opacity: 1;
}

#pnp-welcome-overlay.welcome-hiding {
    opacity: 0;
    pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Welcome Modal Card
   --------------------------------------------------------------------------- */
.welcome-modal {
    background: linear-gradient(165deg, rgba(13, 40, 73, 0.98) 0%, rgba(8, 28, 52, 0.98) 100%);
    border: 1px solid rgba(206, 186, 76, 0.25);
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 2.5rem 2.25rem 2rem;
    position: relative;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(206, 186, 76, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    text-align: center;
    transform: translateY(12px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-visible .welcome-modal {
    transform: translateY(0) scale(1);
}

.welcome-close {
    position: absolute;
    top: 0.85rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.welcome-close:hover {
    color: #fff;
}

/* Badge */
.welcome-badge {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #0D2849;
    background: linear-gradient(135deg, #CEBA4C, #e6d472);
    border-radius: 20px;
    margin-bottom: 1.25rem;
}

/* Title */
.welcome-title {
    color: #CEBA4C;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.welcome-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    margin: 0 0 1.25rem;
    font-weight: 400;
}

/* Divider */
.welcome-divider {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(206, 186, 76, 0.5), transparent);
    margin: 0 auto 1.25rem;
}

/* Body */
.welcome-body {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature pills */
.welcome-features {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: rgba(206, 186, 76, 0.08);
    border: 1px solid rgba(206, 186, 76, 0.15);
    border-radius: 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.welcome-feature-icon {
    font-size: 0.85rem;
}

/* Buttons */
.welcome-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.welcome-btn {
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 160px;
}

.welcome-btn-primary {
    background: linear-gradient(135deg, #CEBA4C 0%, #e6d472 50%, #CEBA4C 100%);
    background-size: 200% 100%;
    color: #0D2849;
    box-shadow: 0 4px 16px rgba(206, 186, 76, 0.25);
}

.welcome-btn-primary:hover {
    background-position: 100% 0;
    box-shadow: 0 6px 24px rgba(206, 186, 76, 0.35);
    transform: translateY(-1px);
}

.welcome-btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Footnote */
.welcome-footnote {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.72rem;
    margin: 0;
}

/* ---------------------------------------------------------------------------
   Free Mode Banner
   --------------------------------------------------------------------------- */
#pnp-free-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.45rem 1rem;
    background: linear-gradient(90deg, rgba(206, 186, 76, 0.12), rgba(206, 186, 76, 0.06), rgba(206, 186, 76, 0.12));
    border-bottom: 1px solid rgba(206, 186, 76, 0.15);
    font-size: 0.78rem;
    z-index: 99;
    position: relative;
}

.free-banner-text {
    color: rgba(206, 186, 76, 0.85);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.free-banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #28c76f;
    box-shadow: 0 0 6px rgba(40, 199, 111, 0.5);
    animation: bannerPulse 2s ease-in-out infinite;
}

@keyframes bannerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.free-banner-upgrade {
    padding: 0.25rem 0.85rem;
    background: rgba(206, 186, 76, 0.15);
    border: 1px solid rgba(206, 186, 76, 0.3);
    border-radius: 4px;
    color: #CEBA4C;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.free-banner-upgrade:hover {
    background: rgba(206, 186, 76, 0.25);
    border-color: #CEBA4C;
}
.free-banner-link {
    background: none;
    border: none;
    color: rgba(242, 242, 242, 0.5);
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    margin: 0 0.5rem;
    padding: 0;
}
.free-banner-link:hover {
    color: #CEBA4C;
}

/* Gold theme — flip banner to navy on gold for contrast */
body.theme-gold #pnp-free-banner {
    background: linear-gradient(90deg, rgba(13, 40, 73, 0.15), rgba(13, 40, 73, 0.08), rgba(13, 40, 73, 0.15));
    border-bottom: 1px solid rgba(13, 40, 73, 0.2);
}

body.theme-gold .free-banner-text {
    color: #0D2849;
}

body.theme-gold .free-banner-dot {
    background: #0D2849;
    box-shadow: 0 0 6px rgba(13, 40, 73, 0.4);
}

body.theme-gold .free-banner-link {
    color: rgba(13, 40, 73, 0.6);
}

body.theme-gold .free-banner-link:hover {
    color: #0D2849;
}

body.theme-gold .free-banner-upgrade {
    background: rgba(13, 40, 73, 0.12);
    border-color: rgba(13, 40, 73, 0.3);
    color: #0D2849;
}

body.theme-gold .free-banner-upgrade:hover {
    background: rgba(13, 40, 73, 0.22);
    border-color: #0D2849;
}

/* ---------------------------------------------------------------------------
   Responsive — Mobile
   --------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .welcome-modal {
        padding: 2rem 1.5rem 1.5rem;
    }

    .welcome-title {
        font-size: 1.4rem;
    }

    .welcome-buttons {
        flex-direction: column;
    }

    .welcome-btn {
        min-width: 100%;
    }

    .welcome-features {
        gap: 0.4rem;
    }

    .welcome-feature {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    #pnp-free-banner {
        font-size: 0.65rem;
        gap: 0.35rem;
        padding: 0.3rem 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .free-banner-text {
        font-size: 0.6rem;
        flex-basis: 100%;
        justify-content: center;
        text-align: center;
    }

    .free-banner-link,
    .free-banner-upgrade {
        font-size: 0.6rem;
        padding: 0.15rem 0.5rem;
    }
}

/* ---------------------------------------------------------------------------
   Tour — Backdrop & Spotlight Mask
   --------------------------------------------------------------------------- */
/* Self-contained tour container — everything lives inside */
#pnp-tour {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
}

.tour-mask {
    position: absolute;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gold glow on highlighted target */
.tour-highlight {
    position: relative;
    z-index: 9991 !important;
    box-shadow: 0 0 0 4px rgba(206, 186, 76, 0.35), 0 0 24px rgba(206, 186, 76, 0.15) !important;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

/* ---------------------------------------------------------------------------
   Tour — Tooltip Card
   --------------------------------------------------------------------------- */
.tour-tooltip {
    position: absolute;
    z-index: 10;
    background: linear-gradient(165deg, rgba(13, 40, 73, 0.98), rgba(8, 28, 52, 0.98));
    border: 1px solid rgba(206, 186, 76, 0.2);
    border-radius: 12px;
    padding: 1.25rem 1.5rem 1rem;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(206, 186, 76, 0.06);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}

.tour-tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.tour-tooltip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.tour-step-label {
    font-size: 0.68rem;
    color: rgba(206, 186, 76, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Progress dots */
.tour-dots {
    display: flex;
    gap: 5px;
}

.tour-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.2s;
}

.tour-dot-active {
    background: #CEBA4C;
    box-shadow: 0 0 6px rgba(206, 186, 76, 0.4);
}

.tour-dot-done {
    background: #28c76f;
}

/* Title */
.tour-tooltip-title {
    color: #CEBA4C;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

/* Body */
.tour-tooltip-body {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.84rem;
    line-height: 1.55;
    margin: 0 0 1rem;
}

/* Sample file button */
.tour-sample-btn {
    display: block;
    width: 100%;
    padding: 0.55rem;
    margin-bottom: 1rem;
    background: rgba(206, 186, 76, 0.1);
    border: 1px dashed rgba(206, 186, 76, 0.35);
    border-radius: 8px;
    color: #CEBA4C;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tour-sample-btn:hover {
    background: rgba(206, 186, 76, 0.18);
    border-color: #CEBA4C;
}

.tour-sample-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Navigation buttons */
.tour-tooltip-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tour-nav-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.tour-nav-next {
    background: linear-gradient(135deg, #CEBA4C, #e6d472);
    color: #0D2849;
    box-shadow: 0 2px 8px rgba(206, 186, 76, 0.2);
}

.tour-nav-next:hover {
    box-shadow: 0 4px 16px rgba(206, 186, 76, 0.3);
    transform: translateY(-1px);
}

.tour-nav-back {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.tour-nav-back:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Exit link */
.tour-exit {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    font-family: inherit;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.tour-exit:hover {
    color: rgba(255, 255, 255, 0.5);
}

/* ---------------------------------------------------------------------------
   Tour — CTA Completion Overlay
   --------------------------------------------------------------------------- */
/* CTA card — rendered inside #pnp-tour container */
.tour-cta-card {
    position: relative;
    background: linear-gradient(165deg, rgba(13, 40, 73, 0.98), rgba(8, 28, 52, 0.98));
    border: 1px solid rgba(206, 186, 76, 0.3);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-cta-overlay.welcome-visible .tour-cta-card {
    transform: translateY(0) scale(1);
}

.tour-cta-check {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(40, 199, 111, 0.15), rgba(40, 199, 111, 0.05));
    border: 2px solid rgba(40, 199, 111, 0.4);
    color: #28c76f;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.tour-cta-title {
    color: #CEBA4C;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.tour-cta-body {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 1.75rem;
}

.tour-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* ---------------------------------------------------------------------------
   Tour — Mobile Bottom Sheet
   --------------------------------------------------------------------------- */
.tour-tooltip-mobile {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-height: 45vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%) !important;
    overflow-y: auto;
}

.tour-tooltip-mobile.tour-tooltip-visible {
    transform: translateY(0) !important;
}

@media (max-width: 600px) {
    .tour-cta-card {
        padding: 2rem 1.5rem 1.5rem;
    }

    .tour-cta-title {
        font-size: 1.3rem;
    }
}
