/* =============================================================
   Nexstate Ask AI – Standalone Landing Page
   Font: Source Serif 4 | Premium, spacious, minimalist
   ============================================================= */

/* ── Intro (reuses public-pages.css classes) ───────────────── */
.ask-ai-content {
    opacity: 0;
    transform: translateY(40px);
}

.ask-ai-content.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ask-ai-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f7f7f8;
    font-family: 'Source Serif 4', Georgia, serif;
}

.ask-ai-page * {
    font-family: 'Source Serif 4', Georgia, serif;
    box-sizing: border-box;
}

/* ── Header ─────────────────────────────────────────────────── */
.ask-ai-header {
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ask-ai-header .logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.ask-ai-header .logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

.ask-ai-header .divider {
    color: #ccc;
    font-weight: 300;
    font-size: 18px;
}

.ask-ai-header .home-link {
    color: #666;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.ask-ai-header .home-link:hover {
    color: #333;
}

/* ── Main Content ───────────────────────────────────────────── */
.ask-ai-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 24px 80px 24px;
    margin-top: -60px;
}

.ask-ai-heading {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 600;
    color: #111;
    text-align: center;
    margin: 0 0 32px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ── Input ──────────────────────────────────────────────────── */
.ask-ai-input-wrapper {
    width: 100%;
    max-width: 680px;
    position: relative;
}

.ask-ai-input {
    width: 100%;
    padding: 18px 56px 18px 24px;
    font-size: 16px;
    font-family: 'Source Serif 4', Georgia, serif;
    border: 2px solid #e0e0e0;
    border-radius: 28px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
}

.ask-ai-input:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    background: #fff;
}

.ask-ai-input:disabled {
    opacity: 0.6;
    cursor: default;
}

.ask-ai-input::placeholder {
    color: #999;
}

.ask-ai-send {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #111;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ask-ai-send:hover {
    background: #333;
}

.ask-ai-send:disabled {
    background: #ccc;
    cursor: default;
}

/* ── Loading ────────────────────────────────────────────────── */
.ask-ai-loading {
    margin-top: 16px;
    font-size: 14px;
    color: #888;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Example Callouts ───────────────────────────────────────── */
.ask-ai-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 28px;
    max-width: 680px;
}

.ask-ai-example {
    padding: 10px 18px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    font-family: 'Source Serif 4', Georgia, serif;
    line-height: 1.4;
}

.ask-ai-example:hover {
    border-color: #7C3AED;
    color: #7C3AED;
    background: rgba(124, 58, 237, 0.04);
}

/* ── Response Area ──────────────────────────────────────────── */
.ask-ai-response {
    max-width: 680px;
    width: 100%;
    margin-bottom: 24px;
    padding: 24px 28px;
    background: #f8f9fa;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    animation: fadeInUp 0.4s ease-out;
}

.ask-ai-response .question {
    font-weight: 600;
    color: #111;
    margin-bottom: 12px;
    font-size: 16px;
}

.ask-ai-response .answer {
    white-space: pre-wrap;
    margin-bottom: 16px;
}

.ask-ai-response .response-links {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
}

.response-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.response-link:hover {
    color: #333;
}

.response-link.primary {
    color: #7C3AED;
    font-weight: 600;
}

.response-link.primary:hover {
    color: #5B21B6;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ask-ai-header {
        padding: 16px 20px;
    }

    .ask-ai-main {
        padding: 0 16px 60px 16px;
        margin-top: -30px;
    }

    .ask-ai-input {
        padding: 14px 48px 14px 18px;
        font-size: 15px;
        border-radius: 22px;
    }

    .ask-ai-send {
        width: 36px;
        height: 36px;
        right: 6px;
    }

    .ask-ai-examples {
        gap: 8px;
    }

    .ask-ai-example {
        padding: 8px 14px;
        font-size: 13px;
    }

    .ask-ai-response {
        padding: 18px 20px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .ask-ai-heading {
        font-size: 22px;
    }

    .ask-ai-examples {
        flex-direction: column;
        align-items: center;
    }

    .ask-ai-example {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* ── Dark Mode (OS preference) ─────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .ask-ai-page {
        background: #1c1c1e;
    }

    .ask-ai-header .logo-text {
        color: #e8e8ec;
    }

    .ask-ai-header .divider {
        color: #444;
    }

    .ask-ai-header .home-link {
        color: #999;
    }

    .ask-ai-header .home-link:hover {
        color: #ddd;
    }

    .ask-ai-heading {
        color: #e8e8ec;
    }

    .ask-ai-input {
        background: #2c2c2e;
        border-color: #3a3a3c;
        color: #e8e8ec;
    }

    .ask-ai-input:focus {
        border-color: #9f7aea;
        box-shadow: 0 0 0 4px rgba(159, 122, 234, 0.15);
        background: #3a3a3c;
    }

    .ask-ai-input::placeholder {
        color: #666;
    }

    .ask-ai-send {
        background: #e8e8ec;
        color: #1c1c1e;
    }

    .ask-ai-send:hover {
        background: #d0d0d8;
    }

    .ask-ai-send:disabled {
        background: #3a3a3c;
        color: #666;
    }

    .ask-ai-loading {
        color: #888;
    }

    .ask-ai-example {
        border-color: #3a3a3c;
        color: #999;
    }

    .ask-ai-example:hover {
        border-color: #9f7aea;
        color: #b794f4;
        background: rgba(159, 122, 234, 0.08);
    }

    .ask-ai-response {
        background: #2c2c2e;
        color: #d0d0d8;
    }

    .ask-ai-response .question {
        color: #e8e8ec;
    }

    .ask-ai-response .response-links {
        border-top-color: #3a3a3c;
    }

    .response-link {
        color: #999;
    }

    .response-link:hover {
        color: #ddd;
    }

    .response-link.primary {
        color: #b794f4;
    }

    .response-link.primary:hover {
        color: #d6bcfa;
    }

    /* Intro overlay dark mode */
    .intro-overlay {
        background: #1c1c1e !important;
    }

    .intro-tagline {
        color: rgba(200, 200, 220, 0.75) !important;
    }

    .intro-powered {
        color: rgba(200, 200, 220, 0.5) !important;
    }

    .intro-brand {
        color: #e8e8ec !important;
        -webkit-text-fill-color: #e8e8ec !important;
    }
}
