@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root{
    --navy:#062a3b;
    --navy-dark:#041f2d;

    --brand:#a90f43;
    --brand2:#c21f57;

    --bg:#edf1f2;
    --white:#fff;

    --text:#17303d;
    --muted:#77868e;

    --line:#dfe5e8;

    --green:#24a26a;
}

*{
    box-sizing:border-box;
}

html,
body{
    margin:0;
    width:100%;
    height:100%;
}

body{
    overflow:hidden;
    background:#dfe5e7;
    font-family:Inter,Arial,sans-serif;
    color:var(--text);
}

button,
input,
select{
    font:inherit;
}

button{
    cursor:pointer;
}

.hidden{
    display:none !important;
}


/* CHAT SHELL */

.chat-shell{
    width:100%;
    max-width:520px;
    height:100dvh;

    margin:0 auto;

    display:flex;
    flex-direction:column;

    background:#f3f5f5;

    box-shadow:
        0 0 40px rgba(4,31,45,.12);
}


/* HEADER */

.chat-header{
    height:76px;
    flex:0 0 76px;

    padding:0 16px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    background:var(--navy-dark);

    color:#fff;
}

.brand-wrap{
    display:flex;
    align-items:center;
    gap:12px;
}

.logo-box{
    width:50px;
    height:50px;

    padding:5px;

    border-radius:9px;

    display:flex;
    align-items:center;
    justify-content:center;

    background:#fff;
}

.logo-box img{
    width:100%;
    max-height:40px;
    object-fit:contain;
}

.brand-text strong{
    display:block;
    font-size:14px;
}

.brand-text span{
    display:block;

    margin-top:4px;

    color:#8ee0ba;

    font-size:10px;
}

.restart-btn{
    width:38px;
    height:38px;

    border:0;
    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    color:#fff;

    background:rgba(255,255,255,.08);
}


/* CHAT BODY */

.chat-body{
    flex:1 1 auto;

    min-height:0;

    padding:18px 14px 30px;

    overflow-y:auto;
    overflow-x:hidden;

    scroll-behavior:smooth;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(169,15,67,.04),
            transparent 26%
        ),
        #eef2f3;
}

.chat-body > *{
    flex:0 0 auto;
}


/* BUBBLES */

.message-row{
    width:100%;
    display:flex;

    margin-bottom:10px;
}

.message-row.bot{
    justify-content:flex-start;
}

.message-row.user{
    justify-content:flex-end;
}

.bubble{
    max-width:88%;

    padding:11px 13px;

    border-radius:13px;

    font-size:13px;
    line-height:1.55;

    box-shadow:
        0 3px 12px rgba(5,31,42,.05);
}

.bot .bubble{
    background:#fff;

    border-top-left-radius:4px;
}

.user .bubble{
    color:#fff;
    background:var(--brand);

    border-top-right-radius:4px;
}

.bubble strong{
    color:var(--navy-dark);
}

.user .bubble strong{
    color:#fff;
}


/* WELCOME */

.welcome-card{
    margin:4px 0 14px;

    padding:18px;

    border-radius:15px;

    background:#fff;

    box-shadow:
        0 8px 25px rgba(5,31,42,.07);
}

.welcome-card h2{
    margin:0 0 8px;

    color:var(--navy-dark);

    font-size:20px;
}

.welcome-card p{
    margin:0;

    color:var(--muted);

    font-size:12px;
    line-height:1.65;
}


/* OPTIONS */

.option-grid{
    display:grid;

    grid-template-columns:
        1fr 1fr;

    gap:9px;

    margin:8px 0 16px;
}

.option-btn{
    min-height:58px;

    padding:11px 10px;

    border:1px solid var(--line);

    border-radius:11px;

    display:flex;
    align-items:center;

    gap:10px;

    text-align:left;

    color:var(--navy-dark);

    background:#fff;

    font-size:12px;
    font-weight:700;

    transition:.2s;
}

.option-btn:hover{
    border-color:var(--brand);
    color:var(--brand);
}

.option-btn i{
    width:28px;

    color:var(--brand);

    text-align:center;

    font-size:17px;
}

.option-btn.full{
    grid-column:1/-1;
}

.option-btn:disabled{
    opacity:.45;
    pointer-events:none;
}


/* LANGUAGE */

.language-box{
    display:grid;

    grid-template-columns:1fr 1fr;

    gap:10px;

    margin-top:10px;
}

.lang-btn{
    height:48px;

    border:1px solid var(--brand);

    border-radius:10px;

    color:var(--brand);

    background:#fff;

    font-size:13px;
    font-weight:800;
}

.lang-btn:hover{
    background:var(--brand);
    color:#fff;
}


/* FORM */

.form-card{
    margin:8px 0 16px;

    padding:15px;

    border-radius:13px;

    background:#fff;

    box-shadow:
        0 8px 25px rgba(5,31,42,.06);
}

.form-group{
    margin-bottom:13px;
}

.form-group:last-child{
    margin-bottom:0;
}

.form-group label{
    display:block;

    margin-bottom:7px;

    color:#526671;

    font-size:10px;
    font-weight:800;
}

.form-group input,
.form-group select{
    width:100%;
    height:46px;

    padding:0 12px;

    border:1px solid #dce3e6;
    border-radius:8px;

    outline:none;

    color:var(--text);

    background:#fff;

    font-size:12px;
}

.form-group input:focus,
.form-group select:focus{
    border-color:var(--brand);
}


/* BUTTONS */

.primary-btn,
.secondary-btn{
    min-height:46px;

    padding:0 17px;

    border-radius:8px;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    gap:7px;

    font-size:11px;
    font-weight:800;

    text-transform:uppercase;
}

.primary-btn{
    border:0;

    color:#fff;

    background:var(--brand);
}

.primary-btn:hover{
    background:var(--brand2);
}

.secondary-btn{
    border:1px solid var(--line);

    color:var(--navy-dark);

    background:#fff;
}

.button-row{
    display:flex;
    flex-wrap:wrap;

    gap:8px;

    margin-top:12px;
}


/* CARS */

.cars-start{
    width:100%;
    height:1px;
}

.cars-heading{
    margin:14px 0 10px;

    display:flex;
    justify-content:space-between;
    align-items:center;
}

.cars-heading strong{
    color:var(--navy-dark);

    font-size:14px;
}

.cars-heading span{
    color:var(--muted);

    font-size:10px;
}

.car-carousel{
    width:100%;

    overflow-x:auto;

    display:flex;

    gap:10px;

    padding:3px 2px 12px;

    scroll-snap-type:x mandatory;

    scrollbar-width:none;
}

.car-carousel::-webkit-scrollbar{
    display:none;
}

.car-card{
    flex:0 0 82%;

    overflow:hidden;

    border:1px solid var(--line);

    border-radius:13px;

    scroll-snap-align:start;

    background:#fff;

    box-shadow:
        0 7px 22px rgba(5,31,42,.06);
}

.car-image{
    width:100%;
    height:168px;

    background:#e9edef;
}

.car-image img{
    width:100%;
    height:100%;

    display:block;

    object-fit:cover;
}

.car-info{
    padding:14px;
}

.car-info h3{
    margin:0 0 5px;

    color:var(--navy-dark);

    font-size:14px;
}

.car-meta{
    color:var(--muted);

    font-size:10px;
}

.car-price{
    margin-top:11px;

    display:flex;
    justify-content:space-between;
    align-items:flex-end;
}

.car-price strong{
    color:var(--brand);

    font-size:16px;
}

.car-price span{
    color:var(--muted);

    font-size:9px;
}

.car-actions{
    display:flex;

    gap:7px;

    margin-top:12px;
}

.car-actions button{
    flex:1;

    min-height:40px;

    border-radius:7px;

    font-size:10px;
    font-weight:800;
}

.select-car{
    border:0;

    color:#fff;

    background:var(--brand);
}

.view-car{
    border:1px solid var(--line);

    color:var(--navy);

    background:#fff;
}


/* SUMMARY */

.summary-card{
    margin:10px 0;

    padding:16px;

    border-radius:13px;

    background:#fff;

    box-shadow:
        0 8px 24px rgba(5,31,42,.06);
}

.summary-card h3{
    margin:0 0 14px;

    color:var(--navy-dark);

    font-size:15px;
}

.summary-row{
    display:flex;

    justify-content:space-between;

    gap:20px;

    padding:7px 0;

    border-bottom:1px solid #edf0f1;

    font-size:11px;
}

.summary-row:last-child{
    border-bottom:0;
}

.summary-row span{
    color:var(--muted);
}

.summary-row strong{
    text-align:right;
    color:var(--navy-dark);
}


/* SUCCESS */

.success-card{
    margin:12px 0;

    padding:18px;

    border:1px solid #cce8db;
    border-radius:13px;

    text-align:center;

    background:#f1fbf6;
}

.success-icon{
    width:48px;
    height:48px;

    margin:0 auto 10px;

    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    color:#fff;

    background:var(--green);

    font-size:20px;
}

.success-card h3{
    margin:0 0 7px;

    color:#155b3f;

    font-size:15px;
}

.success-card p{
    margin:0;

    color:#557369;

    font-size:11px;
    line-height:1.6;
}


/* LIVE CHAT INPUT */

.chat-input-wrap{
    flex:0 0 66px;

    min-height:66px;

    padding:10px 12px;

    display:flex;
    align-items:center;

    gap:8px;

    border-top:1px solid var(--line);

    background:#fff;
}

.chat-input-wrap input{
    flex:1;

    height:45px;

    padding:0 15px;

    border:1px solid var(--line);
    border-radius:30px;

    outline:none;

    font-size:12px;
}

.chat-input-wrap button{
    width:45px;
    height:45px;

    flex:0 0 45px;

    border:0;
    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    color:#fff;

    background:var(--brand);
}


/* CONFIRMED LOCK */

.confirmed .summary-card .button-row,
.confirmed .navrow,
.confirmed .change-actions{
    display:none !important;
}


/* RTL */

body.rtl{
    direction:rtl;
}

body.rtl .option-btn{
    text-align:right;
}

body.rtl .user .bubble{
    border-top-right-radius:13px;
    border-top-left-radius:4px;
}

body.rtl .bot .bubble{
    border-top-left-radius:13px;
    border-top-right-radius:4px;
}

body.rtl .summary-row strong{
    text-align:left;
}


/* MOBILE */

@media(max-width:520px){

    .chat-shell{
        max-width:none;
    }

    .chat-body{
        padding-left:11px;
        padding-right:11px;
    }

    .car-card{
        flex-basis:88%;
    }

}

@media(max-width:380px){

    .option-grid{
        grid-template-columns:1fr;
    }

    .option-btn.full{
        grid-column:auto;
    }

}