.ywbb-re-chat {
    font-size: 16px;
    line-height: 1.6;
}

.ywbb-re-chat * {
    box-sizing: border-box;
}

.ywbb-re-chat-floating {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99999;
}

.ywbb-re-chat-launcher {
    position: static;
    width: 100%;
    max-width: 100%;
    margin: 0 0 18px;
}

.ywbb-re-chat-toggle {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    background: #03c4eb;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.ywbb-re-chat-launcher .ywbb-re-chat-toggle {
    width: 100%;
    box-shadow: none;
}

.ywbb-re-chat-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ywbb-re-chat-floating .ywbb-re-chat-panel,
.ywbb-re-chat-panel-floating {
    position: absolute;
    right: 0;
    bottom: 54px;
    width: 350px;
    max-width: calc(100vw - 28px);
    height: 520px;
    max-height: calc(100vh - 90px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}

.ywbb-re-chat-launcher .ywbb-re-chat-panel,
.ywbb-re-chat-panel-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 360px;
    max-width: calc(100vw - 28px);
    height: 520px;
    max-height: calc(100vh - 48px);
    z-index: 999999;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}

.ywbb-re-chat-panel-floating,
.ywbb-re-chat-panel-launcher {
    min-width: 320px;
    min-height: 420px;
    resize: both;
}

.ywbb-re-chat-panel-floating::after,
.ywbb-re-chat-panel-launcher::after {
    content: "";
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 12px;
    height: 12px;
    border-right: 2px solid #cbd5e1;
    border-bottom: 2px solid #cbd5e1;
    opacity: .9;
    pointer-events: none;
}

.ywbb-re-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #03c4eb;
    color: #fff;
}

.ywbb-re-chat-close {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ywbb-re-chat-messages {
    flex: 1 1 auto;
    min-height: 180px;
    height: auto;
    overflow-y: auto;
    padding: 12px;
    background: #f8fafc;
}


.ywbb-re-chat-msg {
    margin-bottom: 10px;
}

.ywbb-re-chat-msg-user {
    text-align: right;
}

.ywbb-re-chat-bubble {
    display: inline-block;
    max-width: 88%;
    padding: 9px 11px;
    border-radius: 12px;
    white-space: pre-wrap;
    text-align: left;
}

.ywbb-re-chat-msg-bot .ywbb-re-chat-bubble {
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.ywbb-re-chat-msg-user .ywbb-re-chat-bubble {
    background: #03c4eb;
    color: #fff;
}

.ywbb-re-chat-related {
    max-width: 88%;
    margin-top: 7px;
    padding: 9px 11px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.ywbb-re-chat-related-title {
    margin-bottom: 4px;
    font-weight: 700;
    color: #111827;
}

.ywbb-re-chat-related a {
    display: block;
    color: #0369a1;
    text-decoration: none;
    margin-top: 4px;
}

.ywbb-re-chat-related a:hover {
    text-decoration: underline;
}

.ywbb-re-chat-contact {
    display: inline-block;
    max-width: 88%;
    margin-top: 7px;
    padding: 8px 11px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0369a1;
    text-decoration: none;
    border: 1px solid #a5f3fc;
}

.ywbb-re-chat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    overflow: visible;
    align-items: stretch;
}

.ywbb-re-chat-quick button {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 70px;
    max-width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    padding: 6px 8px;
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ywbb-re-chat-quick button:hover {
    border-color: #03c4eb;
    color: #0369a1;
}

.ywbb-re-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.ywbb-re-chat-form textarea {
    flex: 1;
    width: auto;
    min-height: 42px;
    max-height: 82px;
    resize: vertical;
    border: 1px solid #d1d5db !important;
    border-radius: 10px;
    padding: 8px;
    font-size: 16px;
    line-height: 1.5;
    background: #fff !important;
    color: #111827 !important;
    box-shadow: none !important;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.ywbb-re-chat-form textarea:focus {
    background: #fff !important;
    color: #111827 !important;
    border-color: #03c4eb !important;
    box-shadow: 0 0 0 2px rgba(3, 196, 235, .14) !important;
}

.ywbb-re-chat-form textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}
.ywbb-re-chat-form button {
    border: 0;
    border-radius: 10px;
    background: #03c4eb;
    color: #fff;
    padding: 0 13px;
    cursor: pointer;
}

@media (max-width: 767px) {
    .ywbb-re-chat-floating {
        right: 12px;
        bottom: 12px;
    }

    .ywbb-re-chat-floating .ywbb-re-chat-panel,
    .ywbb-re-chat-panel-floating {
        width: calc(100vw - 24px) !important;
        min-width: 0;
        height: 500px !important;
        min-height: 0;
        bottom: 52px;
        resize: none;
    }

    .ywbb-re-chat-launcher .ywbb-re-chat-panel,
    .ywbb-re-chat-panel-launcher {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px) !important;
        min-width: 0;
        height: 500px !important;
        min-height: 0;
        max-height: calc(100vh - 24px);
        resize: none;
    }

    .ywbb-re-chat-panel-floating::after,
    .ywbb-re-chat-panel-launcher::after {
        display: none;
    }
}


.ywbb-re-chat-header {
    cursor: move;
    user-select: none;
    touch-action: none;
}

.ywbb-re-chat-panel.is-dragging {
    user-select: none;
}

.ywbb-re-chat-panel.is-dragging .ywbb-re-chat-header {
    cursor: grabbing;
}

.ywbb-re-chat-close {
    cursor: pointer;
}

@media (max-width: 767px) {
    .ywbb-re-chat-header {
        cursor: default;
        touch-action: auto;
    }
}

@media (max-width: 420px) {
    .ywbb-re-chat-quick {
        gap: 5px;
        padding: 7px 8px;
    }

    .ywbb-re-chat-quick button {
        flex-basis: calc(50% - 5px);
        min-width: 0;
        font-size: 13px;
        padding: 6px 7px;
    }
}

.ywbb-re-chat-msg-bot .ywbb-re-chat-bubble strong {
    font-weight: 700;
    color: #111827;
}

.ywbb-re-chat-subtitle {
    display: inline-block;
    margin: 6px 0 2px;
    font-weight: 700;
}
