/* ═══════════════════════════════════════════════════════════════
   VYOMA AI — Popup & Disclaimer Styles (popup.css)
   ─────────────────────────────────────────────────────────────
   Additive — does not modify any existing CSS.
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables (scoped) ── */
:root {
    --popup-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --popup-bg: linear-gradient(170deg, rgba(22, 20, 42, 0.96) 0%, rgba(10, 10, 22, 0.98) 100%);
    --popup-border: rgba(255, 255, 255, 0.08);
    --popup-text: #e8e6f0;
    --popup-text-muted: rgba(255, 255, 255, 0.5);
    --popup-accent: #6c5ce7;
    --popup-accent-soft: rgba(108, 92, 231, 0.12);
    --popup-radius: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   1. DISCLAIMER TEXT OVERRIDE
   ═══════════════════════════════════════════════════════════════ */

/* Hide original disclaimer text — override via visibility + height 0 */
.input-disclaimer {
    font-size: 0 !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* New disclaimer text — injected via JS */
.ai-disclaimer-text {
    font-size: 0.68rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.45));
    margin-top: 8px;
    text-align: center;
    font-family: var(--font, 'Inter', sans-serif);
    line-height: 1.5;
}

.ai-disclaimer-text .disclaimer-link {
    color: var(--accent, #6c5ce7);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, opacity 0.2s ease;
    border-bottom: 1px dotted transparent;
}

.ai-disclaimer-text .disclaimer-link:hover {
    color: var(--accent-hover, #8b7cf6);
    border-bottom-color: var(--accent, #6c5ce7);
    opacity: 0.9;
}

/* ═══════════════════════════════════════════════════════════════
   2. POPUP BACKDROP
   ═══════════════════════════════════════════════════════════════ */

.akira-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.akira-popup-overlay.popup-active {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════
   3. POPUP MODAL
   ═══════════════════════════════════════════════════════════════ */

.akira-popup-modal {
    position: relative;
    width: 92%;
    max-width: 480px;
    background: var(--popup-bg);
    border: 1px solid var(--popup-border);
    border-radius: var(--popup-radius);
    padding: 32px 28px 28px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(108, 92, 231, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: scale(0.92) translateY(18px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.akira-popup-overlay.popup-active .akira-popup-modal {
    transform: scale(1) translateY(0);
}

/* Glossy top highlight */
.akira-popup-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(108, 92, 231, 0.45) 30%,
            rgba(162, 155, 254, 0.6) 50%,
            rgba(108, 92, 231, 0.45) 70%,
            transparent 100%);
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   4. POPUP CLOSE BUTTON
   ═══════════════════════════════════════════════════════════════ */

.akira-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--popup-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    z-index: 5;
    font-size: 0;
    line-height: 0;
}

.akira-popup-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--popup-text);
    transform: scale(1.08);
}

.akira-popup-close svg {
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   5. POPUP HEADER
   ═══════════════════════════════════════════════════════════════ */

.akira-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.akira-popup-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.akira-popup-icon.info-icon {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.18), rgba(108, 92, 231, 0.08));
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.akira-popup-icon.privacy-icon {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.18), rgba(0, 184, 148, 0.08));
    border: 1px solid rgba(0, 184, 148, 0.2);
}

.akira-popup-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--popup-text);
    font-family: var(--popup-font);
    letter-spacing: -0.01em;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   6. POPUP BODY
   ═══════════════════════════════════════════════════════════════ */

.akira-popup-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.akira-popup-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.akira-popup-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}

.akira-popup-item-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    width: 22px;
    text-align: center;
}

.akira-popup-item-text {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--popup-text);
    font-family: var(--popup-font);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   7. POPUP LINKS (Privacy & Policy)
   ═══════════════════════════════════════════════════════════════ */

.akira-popup-links {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.akira-popup-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--popup-accent-soft);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 12px;
    color: #a29bfe;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--popup-font);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    flex: 1;
    justify-content: center;
    min-width: 140px;
}

.akira-popup-link-btn:hover {
    background: rgba(108, 92, 231, 0.2);
    border-color: rgba(108, 92, 231, 0.35);
    color: #c8c3ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.15);
}

.akira-popup-link-btn svg {
    width: 14px;
    height: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   8. POPUP DIVIDER
   ═══════════════════════════════════════════════════════════════ */

.akira-popup-divider {
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.06) 20%,
            rgba(255, 255, 255, 0.06) 80%,
            transparent 100%);
    margin: 4px 0;
}

/* ═══════════════════════════════════════════════════════════════
   9. MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .akira-popup-modal {
        width: 95%;
        padding: 24px 20px 22px;
        border-radius: 16px;
    }

    .akira-popup-header {
        gap: 10px;
        margin-bottom: 16px;
    }

    .akira-popup-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 17px;
    }

    .akira-popup-title {
        font-size: 1rem;
    }

    .akira-popup-item {
        padding: 12px 14px;
        gap: 10px;
        border-radius: 12px;
    }

    .akira-popup-item-text {
        font-size: 0.84rem;
    }

    .akira-popup-links {
        flex-direction: column;
    }

    .akira-popup-link-btn {
        width: 100%;
        min-width: 0;
    }

    .ai-disclaimer-text {
        font-size: 0.62rem;
    }
}

@media (max-width: 360px) {
    .akira-popup-modal {
        width: 97%;
        padding: 20px 16px 18px;
    }

    .akira-popup-item {
        padding: 10px 12px;
    }

    .akira-popup-item-text {
        font-size: 0.8rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   10. LIGHT MODE SUPPORT
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .ai-disclaimer-text {
    color: #888;
}

[data-theme="light"] .ai-disclaimer-text .disclaimer-link {
    color: #6c5ce7;
}

[data-theme="light"] .ai-disclaimer-text .disclaimer-link:hover {
    color: #5a4bd1;
}

/* Keep popups dark always — they're overlays */