.woc-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    font-family: Arial, sans-serif;
    color: #172033
}

.woc-widget * {
    box-sizing: border-box
}

.woc-launcher {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease
}

.woc-launcher:hover {
    background: #128C7E;
    transform: scale(1.05)
}

.woc-launcher span:last-child {
    display: none
}

.woc-launcher-icon {
    font-size: 28px
}

.woc-panel {
    display: flex;
    flex-direction: column;
    width: 360px;
    height: min(600px, calc(100vh - 100px));
    margin-bottom: 16px;
    overflow: hidden;
    border: none;
    border-radius: 12px;
    background: #E5DDD5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2)
}

.woc-panel[hidden] {
    display: none
}

.woc-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #075E54;
    color: #fff
}

.woc-widget-head>div {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.woc-widget-head strong {
    font-size: 16px
}

.woc-widget-head span {
    font-size: 12px;
    opacity: .88
}

.woc-visitor-lead-form {
    display: grid;
    gap: 12px;
    flex: 0 0 auto;
    align-self: flex-start;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 15px;
    border: 1px solid #e5eaf2;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(20,38,73,.06)
}

.woc-visitor-lead-form[hidden],
.woc-visitor-form[hidden],
.woc-visitor-messages[hidden] {
    display: none
}

.woc-visitor-lead-title {
    margin: 0;
    color: #344054;
    font-size: 13px;
    line-height: 1.55
}

.woc-visitor-lead-form label {
    display: grid;
    gap: 6px;
    color: #475467;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .01em
}

.woc-visitor-lead-form input {
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d9e0ea;
    border-radius: 9px;
    background: #fff;
    color: #172033;
    font: 13px/1.4 Arial, sans-serif;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease
}

.woc-visitor-lead-form input:focus {
    border-color: #2563eb;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12)
}

.woc-visitor-lead-form input::placeholder {
    color: #a0a8b7;
    opacity: 1
}

.woc-phone-hint {
    color: #8a94a6;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.4
}

.woc-lead-error {
    margin: 0;
    padding: 9px 10px;
    border-radius: 7px;
    background: #fff2f0;
    color: #b42318;
    font-size: 12px
}

.woc-lead-error[hidden] {
    display: none
}

.woc-lead-submit {
    min-height: 43px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font: 600 13px/1 Arial, sans-serif;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease
}

.woc-lead-submit:hover {
    background: #1d4ed8;
    color: #fff
}

.woc-lead-submit:active {
    transform: translateY(1px)
}

.woc-lead-submit:disabled {
    opacity: .6;
    cursor: wait
}

.woc-lead-privacy {
    color: #8a94a6;
    font-size: 10px;
    line-height: 1.45;
    text-align: center
}

.woc-widget-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 24px;
    cursor: pointer
}

.woc-widget-close:hover {
    background: rgba(255, 255, 255, .15)
}

.woc-visitor-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding: 20px 16px;
    background-image: url('https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=whatsapp%20chat%20background%20pattern%20subtle&image_size=square');
    background-color: #E5DDD5;
    background-blend-mode: overlay
}

.woc-widget-welcome,
.woc-widget-message {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff;
    font-size: 14.5px;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
    margin-bottom: 4px
}

.woc-widget-message.is-mine {
    align-self: flex-end;
    background: #DCF8C6;
    color: #172033;
    border-top-right-radius: 0;
    margin-right: 8px
}

.woc-widget-message.is-mine::after {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-top-color: #DCF8C6;
    border-left-color: #DCF8C6;
    border-radius: 4px
}

.woc-widget-message:not(.is-mine) {
    align-self: flex-start;
    border-top-left-radius: 0;
    margin-left: 8px
}

.woc-widget-message:not(.is-mine)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-top-color: #fff;
    border-right-color: #fff;
    border-radius: 4px
}

.woc-widget-welcome {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    flex: 0 0 auto;
    align-self: flex-start;
    width: 100%;
    max-width: 94%;
    padding: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none
}

.woc-welcome-avatar {
    display: block;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8ecf3
}

.woc-welcome-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.woc-welcome-content {
    display: flex;
    flex: 0 1 auto;
    min-width: 0;
    height: fit-content;
    min-height: 0;
    flex-direction: column;
    max-width: calc(100% - 38px);
    padding: 10px 12px;
    border: 1px solid #e8ecf3;
    border-radius: 4px 13px 13px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(20,38,73,.05)
}

.woc-welcome-content > * {
    margin-block: 0
}

.woc-welcome-content strong {
    display: block;
    margin-bottom: 5px;
    color: #344054;
    font-size: 11px;
    font-weight: 600
}

.woc-welcome-content p {
    color: #344054;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere
}

.woc-welcome-content time {
    display: block;
    margin-top: 6px;
    color: #98a2b3;
    font-size: 10px;
    text-align: right
}

.woc-widget-message.is-pending {
    opacity: .82
}

.woc-visitor-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #F0F0F0;
    border: none
}

.woc-visitor-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    max-height: 120px;
    resize: none;
    padding: 10px 18px;
    border: none;
    border-radius: 21px;
    background: #fff;
    color: #172033;
    font: 15px/22px Arial, sans-serif;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08)
}

.woc-visitor-input:focus {
    outline: none
}

.woc-visitor-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #128C7E;
    color: #fff;
    font-size: 0;
    cursor: pointer;
    flex: none
}

.woc-visitor-send::before {
    content: '➤';
    font-size: 18px;
    display: block
}

.woc-visitor-send:disabled {
    opacity: .6;
    cursor: wait
}

.woc-widget-error {
    padding: 8px 12px;
    background: #fff2f0;
    color: #b42318;
    font-size: 13px
}

.woc-inline-launcher {
    padding: 12px 18px;
    border: 0;
    border-radius: 24px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    cursor: pointer
}

.woc-inline-launcher:hover {
    background: #1d4ed8;
    color: #fff
}

@media(max-width:480px) {
    .woc-widget {
        right: 12px;
        bottom: 12px
    }

    .woc-panel {
        width: min(350px, calc(100vw - 24px));
        height: min(500px, calc(100dvh - 90px))
    }

    .woc-launcher {
        padding: 12px 16px
    }
}