#whmcs-livechat-root {
    --lc-primary: #124a8b;
    --lc-primary-dark: #0c3568;
    --lc-border: #dce4ee;
    --lc-text: #172335;
    --lc-muted: #64748b;
    --lc-surface: #fff;
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99980;
    color: var(--lc-text);
    font: 14px/1.45 Arial, sans-serif;
}

#whmcs-livechat-root *,
#whmcs-livechat-root *::before,
#whmcs-livechat-root *::after {
    box-sizing: border-box;
}

.lc-launcher {
    min-height: 52px;
    padding: 0 20px;
    border: 0;
    border-radius: 28px;
    background: var(--lc-primary);
    box-shadow: 0 8px 26px rgba(13, 46, 85, .3);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.lc-launcher:hover,
.lc-launcher:focus {
    background: var(--lc-primary-dark);
}

.lc-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    display: flex;
    width: min(390px, calc(100vw - 28px));
    max-height: min(690px, calc(100vh - 105px));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--lc-border);
    border-radius: 16px;
    background: var(--lc-surface);
    box-shadow: 0 12px 45px rgba(15, 23, 42, .24);
}

.lc-panel[hidden],
.lc-panel [hidden],
#whmcs-livechat-root [hidden] {
    display: none !important;
}

.lc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    background: var(--lc-primary);
    color: #fff;
}

.lc-header h2 {
    margin: 0;
    color: #fff;
    font-size: 17px;
}

.lc-close {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 23px;
    line-height: 1;
}

.lc-body {
    overflow-y: auto;
    padding: 16px;
}

.lc-body h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.lc-body p {
    margin: 0 0 12px;
    color: var(--lc-muted);
}

.lc-field {
    margin: 0 0 12px;
}

.lc-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.lc-field input,
.lc-field select,
.lc-field textarea {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #b9c5d3;
    border-radius: 6px;
    background: #fff;
    color: var(--lc-text);
    font: inherit;
}

.lc-field textarea {
    min-height: 82px;
    resize: vertical;
}

.lc-button {
    min-height: 40px;
    padding: 9px 13px;
    border: 0;
    border-radius: 6px;
    background: var(--lc-primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.lc-button:hover,
.lc-button:focus {
    background: var(--lc-primary-dark);
}

.lc-button-secondary {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: var(--lc-text);
}

.lc-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.lc-articles {
    display: grid;
    gap: 9px;
    margin: 10px 0;
}

.lc-article {
    padding: 11px;
    border: 1px solid var(--lc-border);
    border-radius: 8px;
}

.lc-article a {
    color: var(--lc-primary);
    font-weight: 700;
}

.lc-article p {
    margin: 6px 0;
    font-size: 12px;
}

.lc-chat-messages {
    display: flex;
    max-height: 340px;
    min-height: 180px;
    flex-direction: column;
    gap: 9px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--lc-border);
    border-radius: 8px;
    background: #f8fafc;
}

.lc-message {
    max-width: 88%;
    padding: 9px 11px;
    border-radius: 10px;
    background: #e8eef6;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.lc-message[data-sender="visitor"] {
    align-self: flex-end;
    background: #dceafe;
}

.lc-message small {
    display: block;
    margin-top: 4px;
    color: var(--lc-muted);
    font-size: 10px;
}

.lc-error {
    min-height: 1.4em;
    margin: 8px 0 0 !important;
    color: #b42318 !important;
}

.lc-status {
    padding: 8px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--lc-text) !important;
    font-size: 12px;
}

.lc-privacy {
    margin-top: 12px !important;
    font-size: 11px;
}

.lc-channel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--lc-border);
}

.lc-channel-links h3 {
    width: 100%;
    margin-bottom: 0;
}

.lc-channel-links a {
    padding: 6px 9px;
    border: 1px solid var(--lc-border);
    border-radius: 20px;
    color: var(--lc-primary);
    font-size: 12px;
}

@media (max-width: 480px) {
    #whmcs-livechat-root {
        right: 12px;
        bottom: 12px;
    }

    .lc-panel {
        right: -2px;
        width: min(390px, calc(100vw - 20px));
    }
}
