/* ============================================================
   PROJECT      : Ezi2travel Customer Engagement Hub
   MODULE       : Public Chat Premium UI
   FILE         : assets/widget.css
   VERSION      : v1.2.0
   BUILD        : 2026.09.15.006G2
   ============================================================ */

:root{
    --ezi-ink:#111827;
    --ezi-ink-2:#1f2937;
    --ezi-gold:#d6a51f;
    --ezi-gold-2:#f2cf63;
    --ezi-gold-soft:#fff8df;
    --ezi-bg:#f5f3ed;
    --ezi-card:#ffffff;
    --ezi-line:#e8e3d7;
    --ezi-muted:#7b8190;
    --ezi-green:#22c55e;
    --ezi-red:#ef4444;
    --ezi-shadow:0 18px 55px rgba(17,24,39,.16);
}

*{
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
    margin:0;
}

body{
    -webkit-font-smoothing:antialiased;
}

.wc-body{
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    color:var(--ezi-ink);
    background:transparent;
}

.wc-shell{
    position:relative;

    width:100%;
    height:100vh;
    min-height:480px;

    display:grid;
    grid-template-rows:
        auto
        auto
        1fr
        auto
        auto
        auto;

    overflow:hidden;

    background:
        radial-gradient(circle at 90% 6%, rgba(242,207,99,.16), transparent 24%),
        linear-gradient(180deg,#faf9f5 0%,#f4f3ef 100%);

    border:1px solid rgba(214,165,31,.26);
    box-shadow:var(--ezi-shadow);
}

.wc-header{
    position:relative;

    display:flex;
    align-items:center;
    gap:12px;

    min-height:68px;
    padding:12px 14px;

    color:#fff;

    background:
        radial-gradient(circle at 80% 0%, rgba(242,207,99,.18), transparent 30%),
        linear-gradient(135deg,#0b1018 0%,#171f2b 68%,#202b3a 100%);

    border-bottom:1px solid rgba(242,207,99,.22);
}

.wc-header::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    height:2px;
    background:linear-gradient(90deg,transparent,var(--ezi-gold),var(--ezi-gold-2),transparent);
    opacity:.85;
}

.wc-avatar-wrap{
    position:relative;
    flex:0 0 auto;
}

.wc-avatar{
    width:42px;
    height:42px;

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

    border-radius:14px;

    background:
        linear-gradient(145deg,#fffef8,#f2cf63);

    color:#111827;

    border:1px solid rgba(255,255,255,.55);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 7px 18px rgba(0,0,0,.18);

    font-size:15px;
    font-weight:900;
    letter-spacing:-.3px;
}

.wc-online-dot{
    position:absolute;
    right:-2px;
    bottom:-1px;

    width:12px;
    height:12px;

    border-radius:50%;
    background:var(--ezi-green);

    border:2px solid #151d29;

    box-shadow:0 0 0 2px rgba(34,197,94,.12);
}

.wc-header-info{
    flex:1;
    min-width:0;
}

.wc-header strong{
    display:block;
    margin:0;

    font-size:15px;
    font-weight:800;
    letter-spacing:.1px;
}

.wc-header small{
    display:block;
    margin-top:3px;

    color:#e7e9ee;
    opacity:.92;

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

.wc-menu-wrap{
    position:relative;
    margin-left:auto;
}

.wc-menu-btn{
    width:38px;
    min-width:38px;
    height:38px;
    min-height:38px;

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

    margin:0;
    padding:0;

    border:1px solid rgba(255,255,255,.12);
    border-radius:11px;

    background:rgba(255,255,255,.08);
    color:#fff;

    font-size:22px;
    line-height:1;

    cursor:pointer;

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

.wc-menu-btn:hover{
    background:rgba(242,207,99,.15);
    transform:translateY(-1px);
}

.wc-menu{
    position:absolute;
    top:45px;
    right:0;
    z-index:30;

    width:170px;
    padding:7px;

    border:1px solid #ece6d8;
    border-radius:13px;

    background:#fff;

    box-shadow:0 18px 42px rgba(17,24,39,.20);
}

.wc-menu button{
    width:100%;
    min-height:38px;

    margin:0;
    padding:9px 10px;

    border:0;
    border-radius:8px;

    background:#fff;
    color:#1f2937;

    text-align:left;
    font-size:12px;
    font-weight:700;

    cursor:pointer;
}

.wc-menu button:hover{
    background:var(--ezi-gold-soft);
}

.wc-trustbar{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;

    min-height:31px;
    padding:6px 12px;

    background:#fff;

    color:#7d6920;

    border-bottom:1px solid #eee8dc;

    font-size:10px;
    font-weight:650;
    letter-spacing:.05px;
}

.wc-trust-icon{
    color:var(--ezi-gold);
}

.wc-messages{
    min-height:0;
    overflow-y:auto;

    padding:16px 12px 20px;

    scroll-behavior:smooth;

    background:
        radial-gradient(circle at 18% 8%, rgba(214,165,31,.055), transparent 25%),
        linear-gradient(180deg,#f6f5f1 0%,#f2f2ef 100%);
}

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

.wc-messages::-webkit-scrollbar-thumb{
    border-radius:99px;
    background:#c9c6bc;
}

.wc-message{
    display:flex;
    align-items:flex-end;
    gap:7px;

    margin:0 0 12px;
}

.wc-message.customer{
    justify-content:flex-end;
}

.wc-message.assistant,
.wc-message.ai,
.wc-message.staff{
    justify-content:flex-start;
}

.wc-message-avatar{
    flex:0 0 auto;

    width:27px;
    height:27px;

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

    border-radius:9px;

    background:#fff;
    color:#7d6920;

    border:1px solid #e6ddc5;

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

.wc-message.staff .wc-message-avatar{
    background:linear-gradient(145deg,#f4d977,#d6a51f);
    color:#111827;
    border-color:#cf9e19;
}

.wc-message-content{
    max-width:84%;
}

.wc-message.customer .wc-message-content{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
}

.wc-role{
    display:flex;
    align-items:center;
    gap:5px;

    margin:0 0 4px 3px;

    color:#777d89;

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

.wc-message.customer .wc-role{
    margin-right:3px;
}

.wc-role-badge{
    display:inline-flex;
    align-items:center;

    padding:2px 6px;

    border-radius:999px;

    background:#fff7d8;
    color:#8a6b0b;

    border:1px solid #ead58b;

    font-size:8px;
    font-weight:800;
    letter-spacing:.2px;
}

.wc-message.staff .wc-role-badge{
    background:#111827;
    border-color:#111827;
    color:#f7d86d;
}

.wc-bubble{
    position:relative;

    max-width:100%;

    padding:10px 12px;

    border-radius:14px;

    line-height:1.48;
    white-space:pre-wrap;
    word-break:break-word;

    font-size:13px;

    box-shadow:0 5px 14px rgba(17,24,39,.045);
}

.wc-message.customer .wc-bubble{
    color:#fff;

    background:
        linear-gradient(145deg,#111827,#202b3a);

    border:1px solid rgba(255,255,255,.04);

    border-bottom-right-radius:4px;
}

.wc-message.assistant .wc-bubble,
.wc-message.ai .wc-bubble{
    color:#1f2937;
    background:#fff;

    border:1px solid #e6e2d8;

    border-bottom-left-radius:4px;
}

.wc-message.ai .wc-bubble{
    border-left:3px solid var(--ezi-gold);
}

.wc-message.staff .wc-bubble{
    color:#272112;

    background:
        linear-gradient(145deg,#fffdf6,#fff4c6);

    border:1px solid #e5c763;

    border-bottom-left-radius:4px;

    box-shadow:0 7px 18px rgba(178,137,25,.10);
}

.wc-time{
    display:block;
    margin-top:5px;

    font-size:9px;
    opacity:.54;
}

.wc-typing{
    display:flex;
    align-items:center;
    gap:8px;

    padding:8px 14px;

    background:#fff;
    color:#7b8190;

    border-top:1px solid #ebe7de;

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

.wc-typing[hidden]{
    display:none !important;
}

.wc-typing-dots{
    display:inline-flex;
    gap:3px;
}

.wc-typing-dots i{
    width:5px;
    height:5px;

    border-radius:50%;

    background:var(--ezi-gold);

    animation:eziTyping 1s infinite ease-in-out;
}

.wc-typing-dots i:nth-child(2){
    animation-delay:.12s;
}

.wc-typing-dots i:nth-child(3){
    animation-delay:.24s;
}

@keyframes eziTyping{
    0%,60%,100%{transform:translateY(0);opacity:.45}
    30%{transform:translateY(-3px);opacity:1}
}

.wc-compose{
    display:grid;
    grid-template-columns:1fr auto;
    gap:8px;

    padding:10px 10px 8px;

    background:#fff;

    border-top:1px solid #e7e3da;
}

.wc-compose textarea{
    width:100%;

    min-height:45px;
    max-height:110px;

    resize:none;

    padding:11px 12px;

    border:1px solid #d7d3c9;
    border-radius:12px;

    outline:none;

    background:#fbfbfa;
    color:#17202a;

    font:inherit;
    font-size:13px;

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

.wc-compose textarea::placeholder{
    color:#9b9fa8;
}

.wc-compose textarea:focus{
    border-color:#d7b23f;
    background:#fff;

    box-shadow:0 0 0 3px rgba(214,165,31,.10);
}

.wc-compose button{
    min-width:84px;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;

    padding:0 13px;

    border:1px solid #d4a11c;
    border-radius:12px;

    color:#15120a;

    background:
        linear-gradient(145deg,#f5d971,#d7a51f);

    font-weight:850;
    font-size:12px;

    cursor:pointer;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.65),
        0 6px 14px rgba(175,132,14,.15);

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

.wc-compose button:hover{
    transform:translateY(-1px);
    box-shadow:0 8px 18px rgba(175,132,14,.22);
}

.wc-compose button b{
    font-size:11px;
}

.wc-compose button:disabled,
.wc-compose textarea:disabled{
    opacity:.52;
    cursor:not-allowed;
    transform:none;
}

.wc-footer{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;

    padding:5px 10px 7px;

    background:#fff;
    color:#a0a3aa;

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

.wc-lock{
    color:#c89b22;
    font-size:7px;
}

.wc-ended{
    margin:18px 8px;
    padding:17px 14px;

    border:1px solid #e6d89f;
    border-radius:14px;

    background:#fffaf0;

    color:#6f6250;

    text-align:center;
    font-size:12px;
}

.wc-ended strong{
    color:#1f2937;
}

.wc-ended button{
    width:auto;
    margin-top:10px;
    padding:8px 12px;

    border:0;
    border-radius:9px;

    background:#111827;
    color:#fff;

    font-weight:700;
    cursor:pointer;
}

@media(max-width:480px){
    .wc-header{
        min-height:62px;
        padding:10px 12px;
    }

    .wc-avatar{
        width:39px;
        height:39px;
    }

    .wc-trustbar{
        font-size:9px;
    }

    .wc-message-content{
        max-width:88%;
    }

    .wc-bubble{
        font-size:12.5px;
    }

    .wc-compose button{
        min-width:70px;
        padding:0 10px;
    }

    .wc-compose button b{
        display:none;
    }
}

/* ============================================================
   BUILD 006E — Live staff typing indicator
   ============================================================ */
.wc-typing{
    min-height:34px;
}

#wcTypingText{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}


/* ============================================================
   BUILD 006G.2 — Customer Contact Gate
   ============================================================ */

.wc-contact-gate{
    position:absolute;
    z-index:60;

    left:0;
    right:0;
    top:100px;
    bottom:30px;

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

    padding:18px 14px;

    overflow-y:auto;

    background:
        radial-gradient(
            circle at 80% 0%,
            rgba(242,207,99,.16),
            transparent 30%
        ),
        rgba(246,245,241,.98);

    backdrop-filter:blur(4px);
}

.wc-contact-gate[hidden]{
    display:none !important;
}

.wc-contact-card{
    width:100%;
    max-width:390px;

    padding:16px;

    border:
        1px solid
        rgba(214,165,31,.30);

    border-radius:18px;

    background:#fff;

    box-shadow:
        0 18px 45px
        rgba(17,24,39,.12);
}

.wc-contact-icon{
    width:48px;
    height:48px;

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

    margin:0 auto 10px;

    border-radius:15px;

    background:
        linear-gradient(
            145deg,
            #fff9d7,
            #d8a821
        );

    color:#111827;

    border:
        1px solid
        #e3c66d;

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

.wc-contact-copy{
    text-align:center;
}

.wc-contact-copy strong{
    display:block;

    color:#161d28;

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

.wc-contact-copy span{
    display:block;

    margin-top:6px;

    color:#747b87;

    font-size:11px;
    line-height:1.5;
}

.wc-contact-form{
    margin-top:14px;
}

.wc-contact-form label:not(.wc-consent){
    display:block;

    margin:
        10px 0
        5px;

    color:#444b57;

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

.wc-contact-form input[type="text"],
.wc-contact-form input[type="tel"]{
    width:100%;
    min-height:43px;

    padding:10px 11px;

    border:
        1px solid
        #dcd7cc;

    border-radius:10px;

    background:#fbfbfa;
    color:#1f2937;

    outline:none;

    font:inherit;
    font-size:12px;
}

.wc-contact-form input[type="text"]:focus,
.wc-contact-form input[type="tel"]:focus{
    border-color:#d4a41d;
    background:#fff;

    box-shadow:
        0 0 0 3px
        rgba(212,164,29,.10);
}

.wc-phone-help{
    display:block;

    margin-top:5px;

    color:#969ba4;

    font-size:8.5px;
    line-height:1.4;
}

.wc-consent{
    display:flex;
    align-items:flex-start;
    gap:8px;

    margin-top:12px;

    color:#69707c;

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

    cursor:pointer;
}

.wc-consent input{
    flex:0 0 auto;

    margin-top:2px;

    accent-color:#d4a41d;
}

.wc-contact-error{
    margin-top:10px;

    padding:8px 9px;

    border:
        1px solid
        #f0c8c3;

    border-radius:9px;

    background:#fff1ef;
    color:#b42318;

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

.wc-contact-start{
    width:100%;
    min-height:44px;

    margin-top:12px;

    border:
        1px solid
        #bd8c13;

    border-radius:11px;

    background:
        linear-gradient(
            145deg,
            #f5d263,
            #dfa91f
        );

    color:#1b170c;

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

    cursor:pointer;

    box-shadow:
        0 8px 18px
        rgba(181,132,15,.16);
}

.wc-contact-start:disabled{
    opacity:.6;
    cursor:wait;
}

@media(max-width:460px){
    .wc-contact-gate{
        padding:12px 10px;
    }

    .wc-contact-card{
        padding:14px;
        border-radius:15px;
    }
}
