/* ============================================
   AI UNIVERSITY QUESTIONNAIRE POPUP
   Matches existing AI University styling
   ============================================ */

/* CSS Variables matching AI University */
:root {
    --aiuq-bg-dark: #000000;
    --aiuq-text-white: #ffffff;
    --aiuq-accent-blue: #0096ff;
    --aiuq-accent-blue-hover: #0080e6;
    --aiuq-text-muted: rgba(255, 255, 255, 0.7);
    --aiuq-text-subtle: rgba(255, 255, 255, 0.5);
    --aiuq-border-subtle: rgba(255, 255, 255, 0.1);
    --aiuq-bg-card: rgba(255, 255, 255, 0.03);
    --aiuq-font-family: -apple-system, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Overlay */
.aiuq-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-family: var(--aiuq-font-family);
}

.aiuq-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Modal Container - Desktop */
.aiuq-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--aiuq-bg-dark);
    border: 1px solid var(--aiuq-border-subtle);
    border-radius: 24px;
    width: 90%;
    max-width: 620px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 10001;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.aiuq-modal::-webkit-scrollbar {
    width: 6px;
}

.aiuq-modal::-webkit-scrollbar-track {
    background: transparent;
}

.aiuq-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.aiuq-overlay.visible .aiuq-modal {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Mobile - Bottom slide-up */
@media (max-width: 768px) {
    .aiuq-modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        max-width: 100%;
        width: 100%;
        border-radius: 24px 24px 0 0;
        max-height: 90vh;
    }

    .aiuq-overlay.visible .aiuq-modal {
        transform: translateY(0);
    }
}

/* Close button */
.aiuq-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.aiuq-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--aiuq-text-white);
}

/* Content container */
.aiuq-content {
    padding: 60px 50px 50px;
}

@media (max-width: 768px) {
    .aiuq-content {
        padding: 50px 30px 40px;
    }
}

/* Screen transitions */
.aiuq-screen {
    display: none;
    animation: aiuqFadeIn 0.3s ease;
}

.aiuq-screen.active {
    display: block;
}

@keyframes aiuqFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hook screen styles */
.aiuq-hook-title {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--aiuq-text-white);
    letter-spacing: -0.02em;
}

.aiuq-hook-description {
    font-size: 16px;
    color: var(--aiuq-text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

.aiuq-hook-highlight {
    color: var(--aiuq-accent-blue);
    font-weight: 500;
}

/* Primary button */
.aiuq-btn-primary {
    width: 100%;
    padding: 16px 32px;
    background: var(--aiuq-accent-blue);
    color: var(--aiuq-text-white);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
    font-family: var(--aiuq-font-family);
}

.aiuq-btn-primary:hover {
    background: var(--aiuq-accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0, 150, 255, 0.4);
}

.aiuq-btn-primary:active {
    transform: translateY(0);
}

.aiuq-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Secondary link */
.aiuq-btn-secondary {
    display: block;
    text-align: center;
    color: var(--aiuq-text-subtle);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 8px;
    width: 100%;
    font-family: var(--aiuq-font-family);
}

.aiuq-btn-secondary:hover {
    color: var(--aiuq-text-muted);
}

/* Progress bar */
.aiuq-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-bottom: 32px;
    overflow: hidden;
}

.aiuq-progress-bar {
    height: 100%;
    background: var(--aiuq-accent-blue);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0;
}

/* Question text */
.aiuq-question {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 28px;
    color: var(--aiuq-text-white);
}

/* Answer options - vertical list */
.aiuq-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aiuq-option {
    width: 100%;
    padding: 16px 20px;
    background: var(--aiuq-bg-card);
    border: 1px solid var(--aiuq-border-subtle);
    border-radius: 12px;
    color: var(--aiuq-text-white);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--aiuq-font-family);
}

.aiuq-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 150, 255, 0.3);
}

.aiuq-option.selected {
    background: rgba(0, 150, 255, 0.1);
    border-color: var(--aiuq-accent-blue);
}

.aiuq-option-emoji {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.aiuq-option-text {
    flex: 1;
}

/* Age range - horizontal grid */
.aiuq-options.horizontal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.aiuq-options.horizontal .aiuq-option {
    justify-content: center;
    padding: 14px 12px;
    font-size: 14px;
}

@media (max-width: 480px) {
    .aiuq-options.horizontal {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Question counter */
.aiuq-counter {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 24px;
}

/* Final screen styles */
.aiuq-final-offer {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.1) 0%, rgba(0, 150, 255, 0.02) 100%);
    border: 1px solid rgba(0, 150, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.aiuq-final-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--aiuq-text-white);
    margin-bottom: 8px;
}

.aiuq-final-subtitle {
    font-size: 16px;
    color: var(--aiuq-text-white);
    margin-bottom: 4px;
}

.aiuq-final-value {
    font-size: 14px;
    color: var(--aiuq-text-muted);
}

.aiuq-final-highlight {
    color: var(--aiuq-accent-blue);
    font-weight: 600;
}

.aiuq-validity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--aiuq-text-muted);
    margin-bottom: 24px;
}

.aiuq-validity-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Email input */
.aiuq-email-group {
    margin-bottom: 16px;
}

.aiuq-email-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--aiuq-border-subtle);
    border-radius: 12px;
    color: var(--aiuq-text-white);
    font-size: 16px;
    transition: all 0.2s ease;
    font-family: var(--aiuq-font-family);
    box-sizing: border-box;
}

.aiuq-email-input:focus {
    outline: none;
    border-color: var(--aiuq-accent-blue);
    background: rgba(255, 255, 255, 0.08);
}

.aiuq-email-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.aiuq-email-input.error {
    border-color: #ff4757;
}

.aiuq-email-error {
    color: #ff4757;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.aiuq-email-error.visible {
    display: block;
}

.aiuq-email-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 24px;
    text-align: center;
}

/* Success screen */
.aiuq-success {
    text-align: center;
    padding: 20px 0;
}

.aiuq-success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--aiuq-accent-blue) 0%, #00d4ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 28px;
}

.aiuq-success-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--aiuq-text-white);
    margin-bottom: 12px;
}

.aiuq-success-message {
    font-size: 15px;
    color: var(--aiuq-text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.aiuq-code-display {
    background: rgba(0, 150, 255, 0.1);
    border: 1px dashed var(--aiuq-accent-blue);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.aiuq-code-label {
    font-size: 12px;
    color: var(--aiuq-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.aiuq-code-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--aiuq-accent-blue);
    letter-spacing: 0.05em;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

.aiuq-code-expiry {
    font-size: 13px;
    color: var(--aiuq-text-subtle);
    margin-top: 8px;
}

/* Loading state */
.aiuq-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px;
}

.aiuq-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--aiuq-border-subtle);
    border-top-color: var(--aiuq-accent-blue);
    border-radius: 50%;
    animation: aiuqSpin 0.8s linear infinite;
}

@keyframes aiuqSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile swipe indicator */
@media (max-width: 768px) {
    .aiuq-modal::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
    }
}

/* Hide on specific pages */
body.checkout-page .aiuq-overlay,
body.logged-in .aiuq-overlay {
    display: none !important;
}

/* ============================================
   POPUP ADJUSTMENTS - Dec 17 2025
   ============================================ */

/* Center hook screen text */
.aiuq-screen[data-screen="hook"] {
    text-align: center;
}

.aiuq-screen[data-screen="hook"] .aiuq-hook-title,
.aiuq-screen[data-screen="hook"] .aiuq-hook-description {
    text-align: center;
}

/* Center final screen text */
.aiuq-screen[data-screen="final"] {
    text-align: center;
}

.aiuq-screen[data-screen="final"] .aiuq-final-offer {
    text-align: center;
}

/* Hide close button by default */
.aiuq-close {
    display: none;
}

/* Only show close button on success screen */
.aiuq-overlay.show-close .aiuq-close {
    display: flex;
}

/* More relaxed spacing for questions */
.aiuq-question {
    margin-bottom: 32px;
    line-height: 1.5;
}

.aiuq-options {
    gap: 14px;
}

.aiuq-option {
    padding: 18px 22px;
}
