:root{
    --ink:#07110f;
    --muted:#66736e;
    --paper:#f6f8f5;
    --white:#ffffff;

    --green:#0d7d52;
    --green2:#19a66d;

    --line:#dce4df;

    --shadow:
        0 28px 80px rgba(8,28,20,.12);
}

*{
    box-sizing:border-box;
}

html{
    min-height:100%;
}

body{
    margin:0;
    min-height:100vh;

    font-family:
        "DM Sans",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    color:var(--ink);

    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(25,166,109,.13),
            transparent 28%
        ),
        linear-gradient(
            145deg,
            #fafcf9,
            #eef4f0
        );
}

button,
a{
    font:inherit;
}

button{
    -webkit-tap-highlight-color:transparent;
}

.app-shell{
    width:min(1180px,calc(100% - 40px));
    min-height:100vh;

    margin:auto;

    display:flex;
    flex-direction:column;
}

.chat-header{
    min-height:90px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    border-bottom:
        1px solid rgba(7,17,15,.08);
}

.brand{
    display:flex;
    align-items:center;
    gap:11px;
}

.brand-mark{
    width:38px;
    height:38px;

    display:grid;
    place-items:center;

    border:
        1px solid var(--green);

    border-radius:11px;

    color:var(--green);

    font-weight:900;
    letter-spacing:-.07em;
}

.brand-name{
    font-size:13px;
    letter-spacing:.09em;
    font-weight:600;
}

.brand-name strong{
    font-weight:900;
}

.support-status{
    display:flex;
    align-items:center;
    gap:9px;

    color:#36443e;

    font-size:12px;
    font-weight:800;
}

.support-status small{
    display:block;

    margin-top:2px;

    color:#87938e;

    font-size:9px;
    font-weight:600;
}

.status-dot{
    width:9px;
    height:9px;

    border-radius:50%;

    background:#1da66d;

    box-shadow:
        0 0 0 5px rgba(29,166,109,.11);
}

.welcome{
    flex:1;

    display:grid;
    grid-template-columns:
        minmax(0,1fr)
        minmax(400px,.82fr);

    gap:80px;

    align-items:center;

    padding:
        65px 0 80px;
}

.eyebrow{
    margin:0 0 19px;

    color:var(--green);

    font-size:10px;
    font-weight:900;

    letter-spacing:.22em;
}

.welcome-copy h1{
    max-width:630px;

    margin:0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(52px,6.5vw,86px);

    line-height:.95;

    letter-spacing:-.055em;
}

.welcome-copy h1 em{
    display:block;

    color:var(--green);

    font-weight:inherit;
}

.intro{
    max-width:540px;

    margin:
        27px 0 25px;

    color:var(--muted);

    font-size:16px;
    line-height:1.75;
}

.trust-row{
    display:flex;
    flex-wrap:wrap;

    gap:18px;

    color:#66746e;

    font-size:10px;
    font-weight:700;
}

.language-card{
    padding:31px;

    background:
        rgba(255,255,255,.94);

    border:
        1px solid rgba(215,226,220,.95);

    border-radius:22px;

    box-shadow:var(--shadow);
}

.card-top{
    display:flex;
    justify-content:space-between;
    align-items:center;

    margin-bottom:22px;
}

.step{
    color:var(--green);

    font-size:9px;
    font-weight:900;

    letter-spacing:.18em;
}

.private-badge{
    padding:7px 9px;

    background:#edf7f1;

    color:#17734f;

    border-radius:999px;

    font-size:8px;
    font-weight:900;

    letter-spacing:.13em;
}

.language-card h2{
    margin:0 0 9px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:32px;

    letter-spacing:-.035em;
}

.language-card>p{
    margin:
        0 0 24px;

    color:var(--muted);

    font-size:12px;
    line-height:1.65;
}

.language-grid{
    display:grid;
    gap:10px;
}

.language-option{
    width:100%;

    display:grid;
    grid-template-columns:
        46px 1fr auto;

    align-items:center;

    gap:13px;

    padding:14px;

    border:
        1px solid var(--line);

    border-radius:13px;

    background:#fbfcfb;

    color:var(--ink);

    text-align:left;

    cursor:pointer;

    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.language-option:hover{
    transform:translateY(-2px);

    border-color:
        rgba(13,125,82,.5);

    background:#fff;

    box-shadow:
        0 12px 28px rgba(8,28,20,.07);
}

.language-option:focus-visible{
    outline:
        3px solid rgba(13,125,82,.18);

    outline-offset:2px;
}

.language-option.selected{
    border-color:var(--green);

    background:#f1f8f4;
}

.language-icon{
    width:43px;
    height:43px;

    display:grid;
    place-items:center;

    border-radius:11px;

    background:#e9f4ee;

    color:var(--green);

    font-size:12px;
    font-weight:900;
}

.language-text strong{
    display:block;

    margin-bottom:3px;

    font-size:13px;
}

.language-text small{
    color:#7a8781;

    font-size:10px;
}

.arrow{
    color:var(--green);

    font-size:19px;
}

.selection-message{
    min-height:18px;

    margin-top:12px;

    color:var(--green);

    font-size:11px;
    font-weight:700;
}

.privacy-line{
    display:flex;
    align-items:flex-start;

    gap:9px;

    margin-top:18px;
    padding-top:17px;

    border-top:
        1px solid var(--line);
}

.privacy-line span{
    font-size:12px;
}

.privacy-line p{
    margin:0;

    color:#829089;

    font-size:9px;
    line-height:1.55;
}

.chat-footer{
    min-height:55px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    border-top:
        1px solid rgba(7,17,15,.07);

    color:#819089;

    font-size:9px;

    letter-spacing:.04em;
}


/* MAINTENANCE */

.maintenance-body{
    min-height:100vh;

    display:grid;
    place-items:center;

    padding:22px;
}

.maintenance-card{
    width:min(520px,100%);

    padding:42px;

    background:#fff;

    border:
        1px solid var(--line);

    border-radius:22px;

    box-shadow:var(--shadow);

    text-align:center;
}

.maintenance-card .brand{
    justify-content:center;

    margin-bottom:38px;
}

.maintenance-icon{
    width:55px;
    height:55px;

    display:grid;
    place-items:center;

    margin:
        0 auto 25px;

    border-radius:50%;

    background:#e9f6ef;

    color:var(--green);

    font-size:22px;
    font-weight:900;
}

.maintenance-card h1{
    margin:
        0 0 18px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(35px,7vw,48px);

    line-height:1;

    letter-spacing:-.045em;
}

.maintenance-copy{
    margin:
        0 auto 27px;

    color:var(--muted);

    font-size:13px;
    line-height:1.7;
}

.primary-button{
    min-height:48px;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding:
        0 21px;

    border-radius:10px;

    background:var(--green);

    color:#fff;

    text-decoration:none;

    font-size:12px;
    font-weight:900;
}

.security-note{
    margin:
        24px 0 0;

    color:#929e99;

    font-size:9px;
}


/* MOBILE */

@media(max-width:850px){

    .app-shell{
        width:
            min(100% - 28px,680px);
    }

    .welcome{
        grid-template-columns:1fr;

        gap:38px;

        padding:
            45px 0 55px;
    }

    .welcome-copy{
        text-align:center;
    }

    .welcome-copy h1,
    .intro{
        margin-left:auto;
        margin-right:auto;
    }

    .trust-row{
        justify-content:center;
    }

}

@media(max-width:520px){

    .chat-header{
        min-height:72px;
    }

    .brand-mark{
        width:34px;
        height:34px;
    }

    .brand-name{
        font-size:11px;
    }

    .support-status span:not(.status-dot){
        display:none;
    }

    .welcome{
        padding-top:35px;
    }

    .welcome-copy h1{
        font-size:50px;
    }

    .intro{
        font-size:14px;
    }

    .language-card{
        padding:20px;

        border-radius:18px;
    }

    .language-card h2{
        font-size:27px;
    }

    .language-option{
        min-height:72px;
    }

    .chat-footer{
        flex-direction:column;

        justify-content:center;

        gap:5px;

        padding:15px 0;
    }

    .maintenance-card{
        padding:
            32px 22px;
    }

}


/* ============================================================
   CUSTOMER DETAILS — STEP 02
   ============================================================ */

.customer-details-step{
    margin-top:8px;
}

.customer-details-step[hidden]{
    display:none !important;
}

.step-divider{
    height:1px;

    margin:20px 0 22px;

    background:var(--line);
}

.details-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;

    gap:15px;
}

.details-heading h3{
    margin:7px 0 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:26px;

    letter-spacing:-.035em;
}

.text-button{
    padding:4px 0;

    border:0;
    background:transparent;

    color:var(--green);

    font-size:9px;
    font-weight:900;

    cursor:pointer;
}

.details-intro{
    margin:10px 0 20px !important;

    color:var(--muted);

    font-size:11px !important;
    line-height:1.55 !important;
}

.field{
    margin-bottom:14px;
}

.field label{
    display:block;

    margin-bottom:7px;

    color:#34423c;

    font-size:10px;
    font-weight:800;
}

.field input{
    width:100%;
    height:48px;

    padding:0 14px;

    border:1px solid var(--line);
    border-radius:10px;

    background:#fbfcfb;

    color:var(--ink);

    font-size:12px;

    outline:none;

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.field input:focus{
    border-color:var(--green);

    background:#fff;

    box-shadow:
        0 0 0 3px rgba(13,125,82,.08);
}

.field input.invalid{
    border-color:#b74343;

    box-shadow:
        0 0 0 3px rgba(183,67,67,.07);
}

.phone-field{
    display:grid;

    grid-template-columns:
        58px 1fr;

    border:
        1px solid var(--line);

    border-radius:10px;

    overflow:hidden;

    background:#fbfcfb;

    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.phone-field:focus-within{
    border-color:var(--green);

    box-shadow:
        0 0 0 3px rgba(13,125,82,.08);
}

.phone-field .country-code{
    display:flex;
    align-items:center;
    justify-content:center;

    border-right:
        1px solid var(--line);

    color:#53625b;

    font-size:11px;
    font-weight:800;
}

.phone-field input{
    border:0;
    border-radius:0;

    box-shadow:none !important;
}

.phone-field.invalid{
    border-color:#b74343;
}

.field-error{
    display:block;

    min-height:14px;

    margin-top:4px;

    color:#a93c3c;

    font-size:9px;
    font-weight:700;
}

.continue-button{
    width:100%;
    min-height:49px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    margin-top:4px;

    padding:0 17px;

    border:0;
    border-radius:10px;

    background:var(--green);

    color:#fff;

    font-size:11px;
    font-weight:900;

    cursor:pointer;

    transition:
        transform .18s ease,
        background .18s ease;
}

.continue-button:hover{
    transform:translateY(-1px);

    background:#0a7048;
}

.continue-button:focus-visible{
    outline:
        3px solid rgba(13,125,82,.2);

    outline-offset:2px;
}

.form-status{
    min-height:16px;

    margin-top:8px;

    color:var(--green);

    font-size:9px;
    font-weight:700;

    text-align:center;
}


/*
 * Once Step 02 is active we keep the selected language
 * visible but collapse the unselected choices.
 */

.language-card.details-active
.language-option:not(.selected){
    display:none;
}

.language-card.details-active
.selection-message{
    display:none;
}


@media(max-width:520px){

    .details-heading h3{
        font-size:24px;
    }

    .field input{
        font-size:16px;
    }

    .continue-button{
        min-height:52px;
    }

}


/* ============================================================
   SUPPORT CATEGORY — STEP 03
   ============================================================ */

#supportCategoryStep h3{
    margin:7px 0 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:26px;

    letter-spacing:-.035em;
}

.category-list{
    display:grid;
    gap:10px;
}

.category-option{
    width:100%;

    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:16px;

    padding:15px 16px;

    border:1px solid var(--line);
    border-radius:11px;

    background:#fbfcfb;

    color:var(--ink);

    text-align:left;

    cursor:pointer;

    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.category-option:hover,
.category-option:focus-visible{
    border-color:var(--green);

    background:#f3faf6;

    transform:translateY(-1px);

    outline:none;
}

.category-option strong{
    display:block;

    margin-bottom:3px;

    font-size:11px;
}

.category-option small{
    display:block;

    color:var(--muted);

    font-size:9px;
    line-height:1.45;
}

.category-option > span:last-child{
    color:var(--green);

    font-size:15px;
    font-weight:800;
}


/*
 * Once customer identity is accepted,
 * Step 01/02 become compact context rather
 * than keeping the entire form visible.
 */

.language-card.session-created
#customerDetailsForm{
    display:none;
}

.language-card.session-created
.details-intro{
    margin-bottom:12px !important;
}


@media(max-width:520px){

    #supportCategoryStep h3{
        font-size:24px;
    }

    .category-option{
        min-height:64px;
    }

}


/* ============================================================
   BROKER DETAILS
   ============================================================ */

.field select{
    width:100%;
    height:48px;

    padding:0 40px 0 14px;

    border:1px solid var(--line);
    border-radius:10px;

    background:
        #fbfcfb;

    color:var(--ink);

    font-size:12px;

    outline:none;
    cursor:pointer;

    appearance:none;
    -webkit-appearance:none;

    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            #617068 50%
        ),
        linear-gradient(
            135deg,
            #617068 50%,
            transparent 50%
        );

    background-position:
        calc(100% - 18px) 21px,
        calc(100% - 13px) 21px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat:no-repeat;

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease;
}

.field select:focus{
    border-color:var(--green);

    background-color:#fff;

    box-shadow:
        0 0 0 3px rgba(13,125,82,.08);
}

.field select.invalid{
    border-color:#b74343;

    box-shadow:
        0 0 0 3px rgba(183,67,67,.07);
}

@media(max-width:520px){

    .field select{
        font-size:16px;
    }

}


/* ============================================================
   LIVE CHAT COMPOSER — PATCH A
   ============================================================ */

.live-conversation{
    margin-top:18px;
}

.conversation-divider{
    height:1px;
    margin:18px 0;
    background:var(--line);
}

.conversation-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:12px;
}

.conversation-kicker{
    display:block;
    margin-bottom:4px;
    color:var(--green);
    font-size:8px;
    font-weight:800;
    letter-spacing:.12em;
}

.conversation-heading h4{
    margin:0;
    color:var(--ink);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size:20px;
    letter-spacing:-.025em;
}

.conversation-status{
    flex:0 0 auto;
    padding:5px 9px;
    border:1px solid rgba(13,125,82,.18);
    border-radius:999px;
    background:#f2faf6;
    color:var(--green);
    font-size:8px;
    font-weight:800;
}

.chat-messages{
    max-height:360px;
    min-height:100px;
    overflow-y:auto;
    padding:12px;
    border:1px solid var(--line);
    border-bottom:0;
    border-radius:13px 13px 0 0;
    background:#f6f8f7;
    scroll-behavior:smooth;
}

.chat-welcome{
    max-width:88%;
    padding:10px 12px;
    border:1px solid #e2e7e4;
    border-radius:4px 12px 12px 12px;
    background:#fff;
    box-shadow:0 2px 8px rgba(20,40,30,.04);
}

.chat-welcome strong{
    display:block;
    margin-bottom:4px;
    color:var(--green);
    font-size:9px;
}

.chat-welcome span{
    display:block;
    color:var(--ink);
    font-size:10px;
    line-height:1.55;
}

.chat-bubble-row{
    display:flex;
    width:100%;
    margin-top:10px;
}

.chat-bubble-row.customer{
    justify-content:flex-end;
}

.chat-bubble-row.bot{
    justify-content:flex-start;
}

.chat-bubble{
    max-width:82%;
    padding:9px 11px;
    border-radius:12px;
    font-size:10px;
    line-height:1.5;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}

.chat-bubble-row.customer .chat-bubble{
    border-radius:12px 4px 12px 12px;
    background:var(--green);
    color:#fff;
}

.chat-bubble-row.bot .chat-bubble{
    border:1px solid #e2e7e4;
    border-radius:4px 12px 12px 12px;
    background:#fff;
    color:var(--ink);
}

.human-confirm-box{
    padding:12px;
    border-right:1px solid var(--line);
    border-left:1px solid var(--line);
    background:#fffdf6;
}

.human-confirm-box p{
    margin:0 0 9px;
    color:var(--ink);
    font-size:9px;
    line-height:1.5;
}

.human-request-button{
    width:100%;
    min-height:40px;
    border:0;
    border-radius:9px;
    background:var(--green);
    color:#fff;
    font-size:9px;
    font-weight:800;
    cursor:pointer;
}

.human-request-button:disabled{
    opacity:.45;
    cursor:not-allowed;
}

.chat-composer{
    border:1px solid var(--line);
    border-radius:0 0 13px 13px;
    background:#fff;
    overflow:hidden;
}

.chat-composer textarea{
    display:block;
    width:100%;
    min-height:52px;
    max-height:150px;
    resize:none;
    overflow-y:auto;
    padding:13px 14px 8px;
    border:0;
    background:#fff;
    color:var(--ink);
    font:inherit;
    font-size:11px;
    line-height:1.5;
    outline:none;
    box-sizing:border-box;
}

.chat-composer textarea::placeholder{
    color:#87938d;
}

.composer-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:7px 9px 9px;
}

.screenshot-button{
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-height:34px;
    padding:0 8px;
    border:0;
    background:transparent;
    color:#6e7a74;
    font-size:9px;
    font-weight:700;
}

.screenshot-button:disabled{
    opacity:.5;
    cursor:not-allowed;
}

.composer-right{
    display:flex;
    align-items:center;
    gap:8px;
}

.message-length{
    color:#87938d;
    font-size:8px;
}

.send-message-button{
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:50%;
    background:var(--green);
    color:#fff;
    font-size:15px;
    cursor:pointer;
    box-shadow:
        0 4px 12px rgba(13,125,82,.18);
    transition:
        transform .15s ease,
        opacity .15s ease,
        background .15s ease;
}

.send-message-button:hover{
    transform:translateY(-1px);
    background:#0a7048;
}

.send-message-button:disabled{
    opacity:.45;
    cursor:not-allowed;
    transform:none;
}

.chat-composer-status{
    min-height:16px;
    padding-top:7px;
    color:#b74343;
    font-size:9px;
    font-weight:700;
    text-align:center;
}

@media(max-width:520px){

    .chat-messages{
        max-height:330px;
    }

    .chat-bubble{
        max-width:88%;
        font-size:11px;
    }

    .chat-composer textarea{
        min-height:56px;
        font-size:16px;
    }

    .send-message-button{
        width:42px;
        height:42px;
    }

}
