:root{
    --gcw-header:#1a73e8;
    --gcw-button:#1a73e8;
    --gcw-user:#1a73e8;
    --gcw-agent:#ffffff;
    --gcw-header-text:#ffffff;
}

#gcw-chat-button{
    position: fixed;
    right: 24px;
    bottom: 24px;

    display: flex;
    align-items: center;
    gap: 10px;

    height: 54px;
    padding: 0 18px;

    background: #ffffff;
    color: #1a73e8;

    border: 1px solid #d2d2d2;
    border-radius: 12px;

    box-shadow: 0 6px 20px rgba(0,0,0,.12);

    cursor: pointer;
    z-index: 999999;

    transition:
transform .2s,
box-shadow .2s,
background .2s;
}

#gcw-chat-button:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

#gcw-chat-window{

position:fixed;

right:24px;
bottom:100px;

width:460px;
height:720px;

background:#fff;

border-radius:18px;

box-shadow:0 12px 40px rgba(0,0,0,.25);

display:none;

flex-direction:column;

overflow:hidden;

z-index:999999;

font-family:Arial,sans-serif;

}

#gcw-chat-window.open{
display:flex;
}

.gcw-header{

background:var(--gcw-header);

color:var(--gcw-header-text);

padding:18px;

display:flex;

justify-content:space-between;

align-items:center;

}

.gcw-status{

font-size:12px;

opacity:.8;

margin-top:4px;

}

#gcw-close{

background:none;

border:none;

color:var(--gcw-header-text);

font-size:22px;

cursor:pointer;

}

.gcw-body{
    flex:1;
    padding:18px;
    overflow-y:auto;
    overflow-x:hidden;
    background:#f7f8fa;
}


.gcw-footer{
    display:flex;
    align-items:center;
    gap:10px;
    padding:14px;
    border-top:1px solid #eee;
    background:#fff;
}

.gcw-footer input{
    flex:1;
    min-width:0;
    width:100%;
    box-sizing:border-box;

    padding:12px;

    border:1px solid #ddd;
    border-radius:10px;
    outline:none;
}

.gcw-footer button{
    width:48px;
    border:none;
    background:var(--gcw-header);
    color:white;
    border-radius:10px;
    cursor:pointer;
}
/* Chat Rows */
.gcw-row{
    display:flex;
    width:100%;
    margin-bottom:12px;
}

.gcw-row-user{
    justify-content:flex-end;
}

.gcw-row-agent{
    justify-content:flex-start;
}

/* Message Bubbles */
.gcw-message{
    display:inline-block;
    box-sizing:border-box;
    max-width:80%;
    padding:12px 16px;
    border-radius:18px;
    word-break:break-word;
overflow-wrap:anywhere;
    line-height:1.4;
    box-shadow:0 1px 4px rgba(0,0,0,.08);
}

/* Visitor */
.gcw-user{
    background:var(--gcw-user);
    color:#fff;
    border-bottom-right-radius:6px;
}

/* Agent */
.gcw-agent{
    background:var(--gcw-agent);
    color:#222;
    border-bottom-left-radius:6px;
    border:1px solid #e5e5e5;
}
/* Message Time */
.gcw-time{
    margin-top:6px;
    font-size:11px;
    opacity:.75;
    text-align:right;
}

/* Visitor Time */
.gcw-user .gcw-time{
    color:rgba(255,255,255,.85);
}

/* Agent Time */
.gcw-agent .gcw-time{
    color:#777;
}
/* Agent Row */
.gcw-row-agent{
    display:flex;
    align-items:flex-end;
    gap:10px;
}

/* Avatar */
.gcw-avatar{
    width:38px;
    height:38px;
    border-radius:50%;
    object-fit:cover;
    flex-shrink:0;
    background:var(--gcw-button);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:bold;
    overflow:hidden;
}

/* Agent Name */
.gcw-agent-name{
    font-size:12px;
    font-weight:600;
    color:#666;
    margin-bottom:6px;
}
.gcw-agent-text{
    margin-top:8px;
}
@media (max-width:480px){

    #gcw-chat-window{

        position:fixed;
        inset:0;

        width:100vw;
        height:100dvh;

        max-width:none;
        max-height:none;

        top:0;
        left:0;
        right:0;
        bottom:0;

        margin:0;

        border-radius:0;

        display:none;

        flex-direction:column;
    }

    #gcw-chat-window.open{
        display:flex;
    }

    .gcw-header{
        padding:16px;
        flex-shrink:0;
    }

    .gcw-body{

        flex:1;

        overflow-y:auto;

        padding:14px;

        scroll-behavior:smooth;
    }

    .gcw-message{

        max-width:88%;

        box-sizing:border-box;

        word-break:break-word;

        overflow-wrap:anywhere;
    }

    .gcw-message img{

        max-width:100%;

        height:auto;

        border-radius:10px;

        display:block;
    }

    .gcw-footer{

        display:flex;

        align-items:center;

        gap:8px;

        padding:12px;

        border-top:1px solid #eee;

        background:#fff;

        flex-shrink:0;
    }

    .gcw-footer input{

        flex:1;

        width:100%;

        min-width:0;

        box-sizing:border-box;
    }

    .gcw-footer button{

        width:46px;

        height:46px;

        flex-shrink:0;
    }

    #gcw-chat-button{

        right:14px;

        bottom:14px;

        max-width:calc(100vw - 28px);

        height:52px;

        padding:0 16px;
    }

    .gcw-button-text{

        font-size:14px;

        overflow:hidden;

        text-overflow:ellipsis;

        white-space:nowrap;
    }

}
.gcw-header-left{
    display:flex;
    align-items:center;
    gap:12px;
}

.gcw-header-info{
    display:flex;
    flex-direction:column;
}

.gcw-company-logo{
    width:42px;
    height:42px;
    border-radius:10px;
    object-fit:cover;
    background:#fff;
    flex-shrink:0;
}

.gcw-company-logo-placeholder{
    width:42px;
    height:42px;
    border-radius:10px;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    flex-shrink:0;
}
.gcw-button-text{
    font-size:15px;
    font-weight:600;
    color:#1a73e8;
    white-space:nowrap;
}
.gcw-message img{
    max-width:100%;
    height:auto;
    border-radius:10px;
    display:block;
}
.gcw-body{
    scroll-behavior:smooth;
}
.gcw-message img{
    max-width:100%;
    height:auto;
    border-radius:10px;
    display:block;
}

.gcw-message a{
    word-break:break-word;
}