:root {
    --or-support-z: 2147483000;
    --or-support-primary: #0f766e;
    --or-support-primary-dark: #0c5f59;
    --or-support-bg: #ffffff;
    --or-support-border: #d0d5dd;
    --or-support-muted: #475467;
    --or-support-surface: #f8fafc;
    --or-support-user: #0f766e;
    --or-support-agent: #ffffff;
    --or-support-shadow: 0 18px 44px rgba(16, 24, 40, 0.22);
}

.or-support-launcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--or-support-primary), #1f9f96);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--or-support-shadow);
    z-index: var(--or-support-z);
}

.or-support-launcher:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.35);
    outline-offset: 2px;
}

.or-support-panel {
    position: fixed;
    right: 18px;
    bottom: 86px;
    width: min(380px, calc(100vw - 18px * 2));
    height: min(620px, calc(100vh - 18px * 2 - 86px));
    border: 1px solid var(--or-support-border);
    border-radius: 14px;
    background: var(--or-support-bg);
    box-shadow: var(--or-support-shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: var(--or-support-z);
}

.or-support-panel.open {
    display: flex;
}

.or-support-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--or-support-border);
    background: linear-gradient(135deg, #0f766e, #115e59);
    color: #fff;
}

.or-support-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.or-support-close {
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
}

.or-support-messages {
    flex: 1;
    padding: 12px;
    background: var(--or-support-surface);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.or-support-message {
    max-width: 92%;
    border-radius: 12px;
    padding: 10px 12px;
    line-height: 1.4;
    font-size: 14px;
    border: 1px solid var(--or-support-border);
    word-wrap: break-word;
    white-space: pre-wrap;
}

.or-support-message.user {
    align-self: flex-end;
    background: var(--or-support-user);
    color: #fff;
    border-color: var(--or-support-user);
}

.or-support-message.agent {
    align-self: flex-start;
    background: var(--or-support-agent);
    color: #0f172a;
}

.or-support-meta {
    font-size: 11px;
    margin-top: 6px;
    color: var(--or-support-muted);
}

.or-support-composer {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border-top: 1px solid var(--or-support-border);
    background: #fff;
}

.or-support-input {
    flex: 1;
    resize: none;
    border: 1px solid var(--or-support-border);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 14px;
    min-height: 38px;
    max-height: 120px;
}

.or-support-input:focus {
    outline: 2px solid rgba(15, 118, 110, 0.25);
    border-color: #0f766e;
}

.or-support-send {
    border: 0;
    border-radius: 10px;
    background: var(--or-support-primary);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    min-width: 68px;
    height: 38px;
    cursor: pointer;
}

.or-support-send[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}

.or-support-loading {
    display: none;
    padding: 0 12px 10px;
    color: var(--or-support-muted);
    font-size: 12px;
    background: #fff;
}

.or-support-loading.active {
    display: block;
}

@media (max-width: 640px) {
    .or-support-launcher {
        right: 12px;
        bottom: 12px;
        width: 54px;
        height: 54px;
    }

    .or-support-panel {
        right: 8px;
        left: 8px;
        width: auto;
        bottom: 74px;
        height: min(72vh, 560px);
    }
}
