/**
 * CN Landing Onboarding - Overlay & Popup Styles
 * Highlights the SOUR campaign card while darkening everything else.
 */

/* ===== Full-page dim overlay ===== */
.cn-onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 99990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}
.cn-onboarding-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ===== Spotlight ring around the SOUR card ===== */
.cn-onboarding-spotlight-active #campaign-card-sour {
    position: relative;
    z-index: 99995 !important;
    box-shadow:
        0 0 0 4px rgba(0, 255, 255, 0.7),
        0 0 40px 8px rgba(0, 255, 255, 0.35),
        0 0 80px 16px rgba(168, 85, 247, 0.2) !important;
    transform: scale(1.04);
    transition: transform 0.5s cubic-bezier(.4,0,.2,1), box-shadow 0.5s ease;
    cursor: pointer;
}
/* Subtle breathing pulse */
.cn-onboarding-spotlight-active #campaign-card-sour::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    border: 2px solid rgba(0, 255, 255, 0.5);
    animation: cn-onboarding-pulse 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes cn-onboarding-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.015); }
}

/* Dim all other campaign cards */
.cn-onboarding-spotlight-active .cn-campaign-card:not(#campaign-card-sour) {
    opacity: 0.15 !important;
    pointer-events: none !important;
    filter: grayscale(1) brightness(0.3);
    transition: opacity 0.5s ease, filter 0.5s ease;
}

/* Keep the selector section header visible but dimmed */
.cn-onboarding-spotlight-active .cn-campaign-selector-header,
.cn-onboarding-spotlight-active .cn-campaign-selector-glass-panel,
.cn-onboarding-spotlight-active .cn-demo-start-prompt {
    opacity: 0.1 !important;
    pointer-events: none !important;
    transition: opacity 0.5s ease;
}

/* ===== Popup tooltip ===== */
.cn-onboarding-popup {
    position: fixed;
    z-index: 99998;
    width: 400px;
    max-width: 90vw;
    background: linear-gradient(145deg, rgba(10, 15, 30, 0.97), rgba(5, 10, 25, 0.97));
    border: 1px solid rgba(0, 255, 255, 0.35);
    border-radius: 16px;
    padding: 30px 28px 24px;
    box-shadow:
        0 0 60px rgba(0, 255, 255, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
}
.cn-onboarding-popup.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Decorative top glow line */
.cn-onboarding-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0ff, transparent);
    border-radius: 1px;
}

/* Zordon-style orb */
.cn-onboarding-orb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, #00ffff 0%, #0088aa 60%, transparent 100%);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin: 0 auto 16px;
    animation: cn-orb-glow 3s ease-in-out infinite;
}
@keyframes cn-orb-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.5); }
    50%      { box-shadow: 0 0 35px rgba(0, 255, 255, 0.8), 0 0 60px rgba(0, 255, 255, 0.3); }
}

.cn-onboarding-headline {
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    margin: 0 0 12px;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
}

.cn-onboarding-body {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.65;
    text-align: center;
    margin: 0 0 20px;
}
.cn-onboarding-body strong {
    color: #00ffff;
    font-weight: 700;
}

.cn-onboarding-cta {
    display: block;
    text-align: center;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 0;
    animation: cn-cta-blink 2.5s ease-in-out infinite;
}
@keyframes cn-cta-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* Arrow pointing to SOUR card */
.cn-onboarding-arrow {
    position: fixed;
    z-index: 99997;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.cn-onboarding-arrow.visible {
    opacity: 1;
}
.cn-onboarding-arrow svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.6));
    animation: cn-arrow-bounce 1.2s ease-in-out infinite;
}
@keyframes cn-arrow-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* Dismiss / skip link */
.cn-onboarding-dismiss {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
    background: none;
    border: none;
    font-family: inherit;
}
.cn-onboarding-dismiss:hover {
    color: rgba(255, 255, 255, 0.65);
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
    .cn-onboarding-popup {
        width: 92vw;
        padding: 22px 18px 18px;
        bottom: 20px !important;
        left: 4vw !important;
        top: auto !important;
        right: auto !important;
    }
    .cn-onboarding-headline {
        font-size: 15px;
    }
    .cn-onboarding-body {
        font-size: 13px;
    }
}

/* ===== Exit animation ===== */
.cn-onboarding-overlay.exiting {
    opacity: 0;
    transition: opacity 0.4s ease;
}
.cn-onboarding-popup.exiting {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.cn-onboarding-spotlight-active.cn-onboarding-exiting #campaign-card-sour {
    box-shadow: none !important;
    transform: scale(1) !important;
}
