/* === Core Layout & Body === */
html, body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}
body {
    background: #19191d;
    color: #faf8f6;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 18px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

/* === Chat Container & Panel === */
#chat-container {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #19191d;
}
#chat-panel {
    max-width: 420px;
    min-width: 300px;
    min-height: 540px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 24px;
    background: #232329;
    box-shadow: 0 0 32px 2px #181818c0, 0 6px 48px #e6950020;
    padding-bottom: 18px;
    margin: 35px 10px;
    overflow: hidden;
    border: 1.5px solid #2d2d2d;
    animation: fadeInUp 0.7s cubic-bezier(.23,1.39,.64,1) backwards;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
#chat-panel:hover {
    box-shadow: 0 8px 60px #e6950030, 0 2px 12px #000a;
}
#chat-panel.quote-active, #chat-panel.expanded-quote {
    max-width: 900px !important;
    min-width: 300px;
    min-height: 700px !important;
    background: #161616;
    box-shadow: 0 0 60px 8px #e6950040;
    border-radius: 30px;
    z-index: 10;
}

/* === Header === */
.chat-header {
    background: #18181b;
    color: #e69500;
    font-size: 1.16rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    border-bottom: 1.5px solid #23232c;
    border-radius: 24px 24px 0 0;
    padding: 18px 24px 18px 20px;
    user-select: none;
}
.chat-header img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-right: 15px;
    vertical-align: middle;
}

/* === Chat Box === */
#chat-box {
    flex: 1 1 auto;
    min-height: 320px;
    max-height: 60vh;
    padding: 22px 26px 6px 26px;
    overflow-y: auto;
    background: none;
    border-bottom: 1px solid #e69500;
    border-radius: 0 0 10px 10px;
    font-size: 1.07em;
    scroll-behavior: smooth;
}

#chat-box::-webkit-scrollbar {
    width: 7px;
    background: #222;
}
#chat-box::-webkit-scrollbar-thumb {
    background-color: #e69500;
    border-radius: 10px;
}

/* === Chat Bubble === */
.chat-bubble {
    background: #23232c;
    color: #faf8f6;
    padding: 12px 18px;
    margin: 8px 0 12px 0;
    border-radius: 17px;
    box-shadow: 0 1px 4px #0001;
    word-break: break-word;
    max-width: 86%;
    clear: both;
    font-size: 1em;
    line-height: 1.6;
    position: relative;
    opacity: 0;
    transform: translateY(15px);
    animation: chatFadeIn 0.4s forwards;
}
@keyframes chatFadeIn { to { opacity: 1; transform: translateY(0); } }
.chat-bubble.user {
    background: #e69500;
    color: #18181b;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 7px;
}
.chat-bubble.bot {
    background: #2b2b34;
    color: #faf8f6;
    border-bottom-left-radius: 7px;
}

/* === Special Quote Summary (for quote HTML) === */
.quote-summary, .chat-bubble.bot .quote-summary {
    background: #181820 !important;
    color: #ffd471 !important;
    border-radius: 18px;
    padding: 26px 18px;
    font-size: 1.13em;
    line-height: 1.65;
    box-shadow: 0 2px 24px #0003;
    margin-top: 18px;
    margin-bottom: 14px;
}
.quote-summary b, .quote-summary strong { color: #fff !important; }
.quote-summary .price, .quote-summary .total, .quote-summary .total-price {
    color: #3faaff !important;
    font-weight: bold;
    font-size: 1.3em;
}

/* === Chat Input Area (always visible and big on mobile) === */
#chat-form {
    display: flex;
    align-items: center;
    padding: 12px 16px 0 16px;
    background: transparent;
    gap: 0;
    border-top: 1.5px solid #26262c;
}
#chat-input {
    flex: 1 1 auto;
    padding: 12px 14px;
    font-size: 1em;
    background: #19191d;
    color: #e69500;
    border: 1.5px solid #e69500;
    border-radius: 12px;
    font-family: inherit;
    outline: none;
    min-width: 0;
}
#chat-input:focus {
    border-color: #ffd180;
    background: #23232c;
    color: #ffd180;
}
button#send-btn, button#restart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    background: #19191d;
    border: none;
    border-radius: 50%;
    margin: 0 2px;
    cursor: pointer;
    transition: background 0.14s, color 0.13s;
}
button#send-btn svg, button#restart-btn svg, button#restart-btn i {
    font-size: 22px;
    color: #e69500;
}
button#send-btn:active, button#restart-btn:active {
    background: #ffd180;
}
button#send-btn:hover, button#restart-btn:hover {
    background: #ffd180;
}
button#send-btn:hover svg, button#restart-btn:hover i {
    color: #23232c;
}

/* === Send Button - Larger on Mobile === */
@media (max-width: 600px) {
    #chat-panel { min-width: 98vw; }
    #send-btn, #restart-btn {
        width: 54px;
        height: 54px;
        min-width: 54px;
        min-height: 54px;
        font-size: 1.6em;
        border-radius: 16px;
    }
    #chat-input {
        font-size: 1.2em;
        padding: 14px;
    }
    #chat-form {
        padding-left: 6px;
        padding-right: 6px;
    }
}

/* === Loader and Animation === */
.loading-spinner, .quote-loader-spinner {
    display: inline-block;
    width: 38px;
    height: 38px;
    vertical-align: middle;
    margin-right: 16px;
}
.loading-spinner:after, .quote-loader-spinner:after {
    content: " ";
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 4px solid #ffd180;
    border-color: #ffd180 transparent #ffd180 transparent;
    animation: quote-spin 1.15s linear infinite;
}
@keyframes quote-spin { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }

/* === Gen Quote Bubble === */
.gen-quote-bubble {
    font-style: italic;
    opacity: 0.97;
    font-size: 1.26em;
    text-align: center;
    margin: 34px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd180;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* === Light Mode === */
body.light-mode {
    background: #fcfcfa;
    color: #19191d;
}
body.light-mode #chat-panel {
    background: #fff8e7;
    color: #181818;
    box-shadow: 0 0 38px 6px #efdbac55;
}
body.light-mode .chat-header {
    background: #fff4d5;
    color: #181818;
    border-bottom: 1.5px solid #f0e6c1;
}
body.light-mode #chat-box { background: #fdf9ef; }
body.light-mode .chat-bubble.bot { background: #f2e4bf; color: #18181b; }
body.light-mode .chat-bubble.user { background: #e69500; color: #fff9e1; }
body.light-mode #chat-input { background: #f7eac9; color: #e69500; border-color: #e69500; }
body.light-mode #chat-input:focus { background: #fffbe8; color: #c77100; border-color: #ffd180; }
body.light-mode #send-btn, body.light-mode #restart-btn { background: #fffbe8; }
body.light-mode #restart-btn, body.light-mode #restart-btn:active { background: #f6e6b7; }
body.light-mode #restart-btn:hover, body.light-mode #send-btn:hover { background: #ffd180; }
body.light-mode #restart-btn i, body.light-mode #send-btn svg { color: #c77100; }
body.light-mode #chat-box::-webkit-scrollbar-thumb { background-color: #ffd47e; }
body.light-mode .quote-summary, body.light-mode .chat-bubble.bot .quote-summary {
    background: #fff8e7 !important;
    color: #222 !important;
}

/* === Utility Classes === */
.d-none { display: none !important; }

/* === Animations & Utility === */
@keyframes fadeInUp { from { transform: translateY(40px); opacity:0; } to   { transform: translateY(0);   opacity:1;} }

/* Spinner Bar (if used) */
#loading-bar {
    width: 100%;
    height: 4px;
    margin: 0;
    padding: 0;
    background: transparent;
    transition: opacity 0.25s;
}
#loading-bar .progress-bar {
    width: 100%;
    height: 4px;
    background: #e69500;
    animation: loadingIndeterminate 1.5s infinite linear;
}
@keyframes loadingIndeterminate {
    0% { width: 10%; left: 0; }
    50% { width: 100%; left: 0; }
    100% { width: 10%; left: 90%; }
}

/* === Special Quote Summary (for quote HTML) === */
.quote-summary, .chat-bubble.bot .quote-summary {
    background: #fff7db !important;       /* Soft, bright gold-beige */
    color: #18181b !important;            /* Deep dark text for contrast */
    border-radius: 18px;
    padding: 26px 18px;
    font-size: 1.13em;
    line-height: 1.65;
    box-shadow: 0 2px 24px #0003;
    margin-top: 18px;
    margin-bottom: 14px;
}
.quote-summary b, .quote-summary strong { color: #18181b !important; }
.quote-summary .price, .quote-summary .total, .quote-summary .total-price {
    color: #3faaff !important;
    font-weight: bold;
    font-size: 1.3em;
}


.chat-header {
    background: #f7f3ed;
    color: #181818;
    font-size: 1.16rem;
    font-weight: 600;
    border-bottom: 1.5px solid #f7f3ed;
    box-shadow: 0 2px 8px #e6950018;

}

.chat-bubble {
    padding: 16px 20px;
    border-radius: 16px;
    margin: 14px 0;
    font-size: 1.06em;
    background: #23232c;
    color: #fff;
    max-width: 90%;
    box-shadow: 0 3px 12px #18181b22;
    line-height: 1.6;
    word-break: break-word;
}
.chat-bubble.user {
    background: #e69500;
    color: #18181b;
    align-self: flex-end;
}
.chat-bubble.bot {
    background: #23232c;
    color: #fff;
    align-self: flex-start;
}
.download-btn {
    margin: 28px auto 0 auto;
    display: block;
    background: #e69500;
    color: #18181b;
    font-size: 1.13em;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 14px 36px;
    cursor: pointer;
    box-shadow: 0 1px 7px #0002;
    transition: background 0.18s, color 0.13s;
}
.download-btn:hover {
    background: #ffc766;
}

/* Style for returning user action buttons */
.returning-btn {
    background: linear-gradient(90deg, #e69500 0%, #fbbf24 100%);
    color: #23232c;
    border: none;
    border-radius: 30px;
    font-size: 1.05em;
    font-weight: 600;
    padding: 10px 24px;
    margin: 8px 8px 0 0;
    cursor: pointer;
    box-shadow: 0 2px 16px 0 rgba(230, 149, 0, 0.08);
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.returning-btn:hover,
.returning-btn:focus {
    background: linear-gradient(90deg, #23232c 0%, #e69500 100%);
    color: #fff8e7;
    transform: translateY(-2px) scale(1.04);
}

.returning-btn {
    background: #e69500;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 1.08em;
    margin: 6px 10px 0 0;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 7px rgba(230,149,0,0.08);
    font-weight: 600;
    outline: none;
}
.returning-btn:hover,
.returning-btn:focus {
    background: #b87700;
    color: #fff;
}

.returning-btn {
    background: #e69500;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 1.08em;
    margin: 6px 10px 0 0;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 7px rgba(230,149,0,0.08);
    font-weight: 600;
    outline: none;
}
.returning-btn:hover,
.returning-btn:focus {
    background: #b87700;
    color: #fff;
}

@keyframes spin {
    100% { transform: rotate(360deg);}
}

.action-btn {
    margin: 10px;
    padding: 14px 28px;
    font-size: 1.13rem;
    border-radius: 7px;
    background: #fff;
    color: #23232c;
    border: 2px solid #e69500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}
.red-check {
    font-size: 1.7em;
    color: red;
}

.next-actions {
    display: flex;
    gap: 18px;
    margin: 22px 0 10px 0;
    justify-content: center;
}
.action-btn {
    font-family: inherit;
    padding: 12px 30px;
    border-radius: 7px;
    border: none;
    background: #fff8e7;
    color: #e69500;
    font-size: 1.11rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 6px #e6950036;
    transition: background .12s, color .12s;
}
.action-btn:disabled {
    opacity: .60;
    cursor: not-allowed;
}

.pcd-action-btns {
    display: flex;
    gap: 22px;
    justify-content: center;
    margin: 22px 0 0 0;
    flex-wrap: wrap;
}
.pcd-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 175px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px #e6950035;
    border: none;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 500;
    padding: 24px 20px;
    color: #21222c;
    transition: background .2s, transform .15s;
    cursor: pointer;
    margin-bottom: 8px;
}
.pcd-btn:hover {
    background: #fff7ea;
    transform: scale(1.04);
}
.pcd-btn .pcd-btn-icon {
    font-size: 2.1rem;
    margin-right: 14px;
    display: flex;
    align-items: center;
}
.pcd-btn-red { color: #ed3a3a; }
.pcd-btn-green { color: #18af55; }
@media (max-width: 650px) {
    .pcd-action-btns { flex-direction: column; gap: 14px; }
    .pcd-btn { min-width: 140px; font-size: 1rem; padding: 16px 8px; }
}

.pcd-next-message {
    margin-top: 24px;
    color: #e69500;
    font-size: 1.07rem;
    text-align: center;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f5ef;
    padding: 22px 32px 18px 26px;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 2px 12px #e6950020;
    position: relative;
    min-height: 60px;
}

.chat-logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    margin-right: 18px;
    box-shadow: 0 2px 8px #e6950026;
    background: #fff8e7;
}

.chat-title-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    margin-left: 8px;
}

.chat-title {
    font-size: 1.43rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: #23232c;
    line-height: 1.18;
}

.chat-title .accent {
    color: #e69500;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.chat-brand {
    font-size: 0.97rem;
    color: #444;
    margin-top: 1px;
    margin-left: 2px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.theme-toggle-btn {
    background: #fff8e7;
    border: 1.5px solid #f5e2b5;
    border-radius: 10px;
    box-shadow: 0 2px 10px #e6950022;
    cursor: pointer;
    padding: 7px 10px;
    margin-left: 18px;
    transition: box-shadow 0.18s;
    display: flex;
    align-items: center;
}

.theme-toggle-btn:hover {
    box-shadow: 0 2px 16px #e6950055;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: #141418;
    color: #fff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.hero-section {
    text-align: center;
    background: #101014;
    padding: 64px 24px 32px 24px;
}

.hero-section h1 {
    font-size: 2.6rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    letter-spacing: 2px;
    color: #fff;
}

.hero-section p {
    color: #ececec;
    font-size: 1.18rem;
    margin-bottom: 14px;
    line-height: 1.5;
    max-width: 740px;
    margin-left: auto;
    margin-right: auto;
}

.sub-cta {
    font-weight: 500;
    color: #e69500;
    background: #231b12;
    padding: 8px 16px;
    border-radius: 7px;
    margin-bottom: 32px;
    display: inline-block;
    margin-top: 12px;
    letter-spacing: 0.4px;
}

#chat-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 0 80px 0;
}

.accent { color: #e69500; }

@media (max-width: 700px) {
    .hero-section { padding: 48px 10px 20px 10px; }
    #chat-container { padding: 0 0 40px 0; }
}

/* You can keep all other styles for chat UI as-is in this file! */

/* =========================================================
   STEP PROGRESS BAR
   ========================================================= */
.step-progress-bar {
    padding: 7px 18px 5px;
    background: rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.spr-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 4px;
    overflow: hidden;
}
.spr-fill {
    height: 100%;
    background: linear-gradient(90deg, #e69500, #ffb800);
    border-radius: 4px;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.spr-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.38);
    text-align: right;
    margin-top: 3px;
    text-transform: uppercase;
}

/* Light mode */
body.light-mode .step-progress-bar {
    background: rgba(0, 0, 0, 0.05);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.light-mode .spr-track {
    background: rgba(0, 0, 0, 0.10);
}
body.light-mode .spr-label {
    color: rgba(0, 0, 0, 0.38);
}

/* =========================================================
   QUICK-REPLY CHIPS
   ========================================================= */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 14px 6px;
    animation: fadeInUp 0.2s ease;
}

.quick-reply-chip {
    background: rgba(230, 149, 0, 0.10);
    border: 1.5px solid rgba(230, 149, 0, 0.30);
    color: #e69500;
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
    font-family: 'Poppins', Arial, sans-serif;
    line-height: 1.3;
    white-space: nowrap;
}
.quick-reply-chip:hover {
    background: rgba(230, 149, 0, 0.22);
    border-color: #e69500;
    transform: translateY(-1px);
}
.quick-reply-chip:active {
    transform: translateY(0);
}
.quick-reply-chip.chip-selected {
    background: rgba(230, 149, 0, 0.30);
    border-color: #e69500;
}
.quick-reply-send {
    background: #e69500 !important;
    color: #111 !important;
    border-color: #e69500 !important;
    font-weight: 900 !important;
}
.quick-reply-send:hover {
    background: #ffb800 !important;
}

/* Light mode chips */
body.light-mode .quick-reply-chip {
    background: rgba(230, 149, 0, 0.08);
    border-color: rgba(180, 100, 0, 0.30);
    color: #b46400;
}
body.light-mode .quick-reply-chip:hover {
    background: rgba(230, 149, 0, 0.18);
    border-color: #b46400;
}
body.light-mode .quick-reply-chip.chip-selected {
    background: rgba(230, 149, 0, 0.25);
    border-color: #b46400;
}

/* ---- Support Details Toggle ---- */
.support-details-wrap {
    margin: 6px 0 4px 0;
    padding: 0 4px;
}
.support-details-toggle {
    background: none;
    border: 1px solid rgba(230,149,0,0.35);
    color: #e69500;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    letter-spacing: 0.01em;
}
.support-details-toggle:hover {
    background: rgba(230,149,0,0.10);
    border-color: #e69500;
}
.support-details-panel {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.support-detail-row {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    padding: 12px 14px;
}
.support-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.support-detail-label {
    font-weight: 800;
    font-size: 13px;
    color: #f5f5f5;
}
.support-detail-price {
    font-weight: 900;
    font-size: 13px;
    color: #e69500;
    white-space: nowrap;
    margin-left: 10px;
}
.support-detail-desc {
    font-size: 12.5px;
    color: rgba(220,220,220,0.75);
    line-height: 1.5;
}

/* Light mode */
body.light-mode .support-details-toggle {
    border-color: rgba(180,100,0,0.35);
    color: #b46400;
}
body.light-mode .support-details-toggle:hover {
    background: rgba(230,149,0,0.08);
}
body.light-mode .support-detail-row {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.10);
}
body.light-mode .support-detail-label { color: #1a1a1a; }
body.light-mode .support-detail-desc  { color: #555; }

@media (max-width: 480px) {
    .quick-reply-chip {
        font-size: 12px;
        padding: 6px 12px;
    }
}