.support-chat-widget {
    position: fixed;
    bottom: 86px;
    z-index: 2100;
    display: flex;
    flex-direction: column-reverse;
    gap: 14px;
}

.support-chat-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.support-chat-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.support-chat-widget--right {
    right: 16px;
    left: auto;
    align-items: flex-end;
}

.support-chat-widget--left {
    left: 16px;
    right: auto;
    align-items: flex-start;
}

.support-chat-toggle {
    position: relative;
    z-index: 2;
    min-height: 54px;
    min-width: 54px;
    padding: 0 18px !important;
    border-radius: 999px !important;
    box-shadow: 0 18px 36px rgba(239, 68, 68, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: visible;
}

.support-chat-toggle.el-button {
    --el-button-bg-color: #ef4444;
    --el-button-border-color: #ef4444;
    --el-button-text-color: #fff;
    --el-button-hover-bg-color: #f87171;
    --el-button-hover-border-color: #f87171;
    --el-button-hover-text-color: #fff;
    --el-button-active-bg-color: #dc2626;
    --el-button-active-border-color: #dc2626;
    --el-button-active-text-color: #fff;
}

.support-chat-toggle-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.support-chat-toggle-icon {
    font-size: 22px;
    line-height: 1;
}

.support-chat-toggle-text {
    font-weight: 700;
    white-space: nowrap;
}

.support-chat-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #22c55e;
    border: 2px solid #fff;
}

.support-chat-widget--left .support-chat-dot {
    left: -4px;
    right: auto;
}

.support-chat-panel {
    width: min(388px, calc(100vw - 24px));
    height: min(640px, calc(100vh - 120px));
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.24);
    overflow: hidden;
    display: none;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.support-chat-panel.is-open {
    display: flex;
}

.support-chat-header {
    padding: 16px 18px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.support-chat-header strong {
    display: block;
    font-size: 16px;
}

.support-chat-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
}

.support-chat-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.support-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background:
        radial-gradient(circle at top right, rgba(248, 113, 113, 0.14), transparent 35%),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-chat-row {
    display: flex;
    width: 100%;
}

.support-chat-row.is-user {
    justify-content: flex-end;
}

.support-chat-row.is-admin,
.support-chat-row.is-bot,
.support-chat-row.is-system {
    justify-content: flex-start;
}

.support-chat-bubble {
    max-width: 86%;
    padding: 12px 14px;
    border-radius: 20px;
    background: #fff;
    color: #111827;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.95);
    white-space: normal;
    word-break: break-word;
}

.support-chat-bubble.is-user {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border-color: rgba(37, 99, 235, 0.65);
    border-bottom-right-radius: 8px;
}

.support-chat-bubble.is-admin {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: rgba(16, 185, 129, 0.24);
    border-bottom-left-radius: 8px;
}

.support-chat-bubble.is-bot {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-color: rgba(148, 163, 184, 0.24);
    border-bottom-left-radius: 8px;
}

.support-chat-bubble.is-system {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-color: rgba(251, 146, 60, 0.26);
    border-bottom-left-radius: 8px;
}

.support-chat-bubble-head {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 7px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
}

.support-chat-bubble.is-user .support-chat-bubble-head {
    color: rgba(255, 255, 255, 0.78);
}

.support-chat-bubble-body {
    display: block;
    font-size: 14px;
    line-height: 1.55;
}

.support-chat-empty {
    padding: 18px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.support-chat-empty-text {
    font-size: 14px;
    line-height: 1.55;
}

.support-chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.support-chat-quick-btn {
    border: 1px solid #dbe4ee;
    background: #fff;
    color: #0f172a;
    border-radius: 999px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.support-chat-quick-btn:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.12);
}

.support-chat-quick-btn[disabled] {
    opacity: 0.68;
    cursor: not-allowed;
    box-shadow: none;
}

.support-chat-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.support-chat-link:hover {
    color: #1e40af;
    text-decoration: none;
}

.support-chat-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.support-chat-image-link {
    display: inline-flex;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

.support-chat-image-preview {
    display: block;
    width: 100%;
    max-width: 220px;
    max-height: 180px;
    object-fit: cover;
    background: #fff;
}

.support-chat-guest {
    padding: 14px 14px 0;
    background: #fff;
}

.support-chat-composer {
    padding: 14px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.support-chat-request-box {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #dbe4ee;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.support-chat-request-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.support-chat-request-head strong {
    font-size: 14px;
    color: #0f172a;
}

.support-chat-request-close {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.support-chat-request-actions {
    margin-top: 10px;
}

.support-chat-request-submit {
    width: 100%;
}

.support-chat-label-spaced {
    margin-top: 10px;
}

.support-chat-file-input {
    width: 100%;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    font-size: 13px;
    color: #334155;
}

.support-chat-file-note {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

.support-chat-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.support-chat-input,
.support-chat-textarea {
    width: 100%;
    border: 1px solid #dbe4ee;
    border-radius: 14px;
    padding: 12px 14px;
    outline: 0;
    font-size: 14px;
    background: #fff;
    color: #111827;
}

.support-chat-input:focus,
.support-chat-textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.support-chat-textarea {
    min-height: 92px;
    resize: none;
}

.support-chat-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 10px;
}

.support-chat-primary,
.support-chat-secondary {
    flex: 1;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 11px 12px;
    font-weight: 700;
    cursor: pointer;
}

.support-chat-menu {
    position: relative;
    flex: 1 1 0;
}

.support-chat-menu-toggle {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: none;
}

.support-chat-menu-toggle-icon {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.support-chat-menu.is-open .support-chat-menu-toggle-icon {
    transform: rotate(180deg);
}

.support-chat-menu-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
    z-index: 5;
}

.support-chat-menu.is-open .support-chat-menu-dropdown {
    display: flex;
}

.support-chat-menu-item {
    border: 0;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 12px;
    padding: 11px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.support-chat-menu-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.support-chat-menu-item[disabled] {
    opacity: 0.68;
    cursor: not-allowed;
}

.support-chat-primary {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.support-chat-secondary {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}

.support-chat-secondary[disabled] {
    opacity: 0.68;
    cursor: not-allowed;
}

.support-chat-status {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    min-height: 18px;
}

.support-chat-notice {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    font-size: 12px;
    color: #b91c1c;
    line-height: 1.5;
}

.support-chat-notice.is-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.support-chat-notice.is-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

@media (max-width: 767.98px) {
    .support-chat-widget {
        bottom: 96px;
    }

    .support-chat-widget--right {
        right: 12px;
    }

    .support-chat-widget--left {
        left: 12px;
    }

    .support-chat-toggle {
        width: 54px;
        min-width: 54px;
        padding: 0 !important;
    }

    .support-chat-toggle-text {
        display: none;
    }

    .support-chat-toggle-inner {
        gap: 0;
    }

    .support-chat-panel {
        width: min(100vw - 24px, 380px);
        height: min(76vh, 620px);
    }

    .support-chat-actions {
        flex-direction: column;
    }

    .support-chat-bubble {
        max-width: 92%;
    }
}
