﻿/* =========================================
   DESIGN TOKENS – Premium Grade
========================================= */
.guided-wrapper {
    --guide-bg-gradient: radial-gradient(circle at 15% 0%, #f8f9ff 0%, #e9efff 38%, #dbe6f5 100%);
    --surface-card: #ffffff;
    --surface-soft: #f4f6fb;
    --surface-soft-strong: #eef2fb;
    --border-soft: #d4deea;
    --border-strong: #c0cfe3;
    --text-strong: #0f172a;
    --text-muted: #475569;
    --text-soft: #6b7280;
    --brand-primary: #6366f1;
    --brand-primary-deep: #4f46e5;
    --brand-accent: #7c3aed;
    --accent-sky: #3b82f6;
    --shadow-soft: 0 18px 48px rgba(15, 23, 42, 0.16);
    --shadow-hover: 0 22px 60px rgba(15, 23, 42, 0.20);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-pill: 999px;
}

/* =========================================
   OUTER WRAPPER – Full-width desktop feel
========================================= */
.guided-wrapper {
    max-width: 1160px; /* ⬅ wider, desktop */
    width: 100%;
    margin: 32px auto 60px;
    padding: 26px 32px 32px;
    border-radius: var(--radius-xl);
    background: var(--guide-bg-gradient);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI";
    color: var(--text-strong);
    backdrop-filter: blur(20px);
    animation: fadeIn 0.45s ease;
    box-sizing: border-box;
}

/* Header row (title + icon) */
.guided-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 4px 0;
}

.guided-header-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

/* =========================================
   MAIN LAYOUT – Preferences + Chat side by side
========================================= */
.guided-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.4fr);
    gap: 24px;
    align-items: stretch;
}

/* =========================================
   LEFT – GUIDE PREFERENCES CARD
========================================= */
.guide-style-section {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    padding: 20px 22px 22px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .guide-style-section:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-hover);
    }

.guide-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-icon {
    font-size: 24px;
    color: var(--brand-accent);
}

.guide-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.guide-desc {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-soft);
}

.preference-row {
    background: #f6f7ff;
    border-radius: 16px;
    padding: 12px 14px;
    border: 1px solid #dde5ff;
}

.preference-label {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #6b7a8c;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.preference-value {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.custom-guide-box {
    background: #f1f4ff;
    border-radius: 16px;
    padding: 12px 14px;
    border: 1px solid #d7e1ff;
}

.custom-guide-label {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #6b7a8c;
    text-transform: uppercase;
}

.custom-guide-value {
    font-size: 14px;
    margin-top: 4px;
    font-weight: 500;
}

/* =========================================
   RIGHT – CHAT CARD (taller & wide)
========================================= */
.chat-card {
    background: var(--surface-card);
    border-radius: 24px;
    border: 1px solid var(--border-soft);
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    min-height: 520px; /* ⬅ more height for chat */
}

    .chat-card:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-hover);
    }

/* INTRO CLOUD STATE */
.conversation-starter {
    text-align: center;
    padding: 28px 18px 22px;
    animation: fadeIn 0.4s ease;
}

.cloud-icon {
    font-size: 34px;
    color: var(--accent-sky);
    margin-bottom: 10px;
}

.conversation-starter h4 {
    font-size: 20px;
    margin-bottom: 4px;
    font-weight: 700;
}

.conversation-starter p {
    font-size: 14px;
    color: var(--text-soft);
}

/* CHAT MESSAGES */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 2px 14px;
    max-height: 440px;
    min-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin;
    animation: fadeUp 0.35s ease;
}

    .chat-messages::-webkit-scrollbar {
        width: 6px;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: #c9d4e3;
        border-radius: 10px;
    }

/* CHAT BUBBLES */
.chat-bubble {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.55;
    animation: bubbleIn 0.28s ease;
}

    /* AI */
    .chat-bubble.ai {
        background: #f6f7ff;
        border: 1px solid #e0e6fc;
        align-self: flex-start;
    }

    /* USER */
    .chat-bubble.user {
        background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
        color: white;
        align-self: flex-end;
        box-shadow: 0 10px 28px rgba(99, 102, 241, 0.42);
    }

/* TYPING INDICATOR */
.typing-indicator {
    display: flex;
    gap: 5px;
}

    .typing-indicator .dot {
        width: 6px;
        height: 6px;
        background: #cbd5e1;
        border-radius: 50%;
        animation: guided-blink 1.3s infinite;
    }

/* INPUT BAR */
.chat-input-section {
    margin-top: auto;
    background: var(--surface-soft);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    padding: 10px 12px 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    .chat-input-section:focus-within {
        border-color: var(--brand-primary);
        background: #eef1ff;
        box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15);
    }

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 15px;
    outline: none;
    min-height: 40px;
}

    .chat-input::placeholder {
        color: #9eaab9;
    }

/* SEND BUTTON */
.send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-deep));
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(99, 102, 241, 0.5);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .send-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 18px 38px rgba(79, 70, 229, 0.6);
    }

    .send-btn:active:not(:disabled) {
        transform: translateY(0);
    }

    .send-btn:disabled {
        opacity: 0.45;
    }

/* SUPPORT BAR + ACTION BUTTONS */
.guide-support-box {
    background: #f7f9fd;
    border-radius: 14px;
    padding: 10px 16px;
    color: var(--text-soft);
    font-size: 13px;
    max-width: 620px;
    margin: 8px auto 0;
}

.action-row {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
}

.back-btn {
    border-radius: var(--radius-pill);
    padding: 8px 20px;
    border: 1px solid var(--border-strong);
    background: white;
    font-size: 13px;
    color: #4a5a6b;
    transition: 0.18s ease;
}

    .back-btn:hover {
        background: #eef3fa;
        transform: translateY(-1px);
    }

.capture-btn {
    border-radius: var(--radius-pill);
    padding: 10px 26px;
    background: #2563eb;
    color: white;
    font-size: 15px;
    font-weight: 600;
    border: none;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.55);
    transition: 0.18s ease;
}

    .capture-btn:hover {
        background: #1e49d7;
        transform: translateY(-2px);
    }

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes guided-blink {
    0%, 80%, 100% {
        opacity: 0.25;
    }

    40% {
        opacity: 0.9;
    }
}

/* RESPONSIVE – stack for smaller screens */
@media (max-width: 900px) {
    .guided-wrapper {
        margin: 18px auto 32px;
        padding: 16px 14px;
        border-radius: 0;
        box-shadow: none;
    }

    .guided-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .chat-card {
        min-height: 420px;
    }

    .action-row {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .back-btn,
    .capture-btn {
        width: 100%;
    }
}
