.support-widget {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 9000;
    font-family: system-ui, -apple-system, sans-serif;
}

.support-fab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #0d9488, #0f766e);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.15rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(15, 118, 110, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.support-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(15, 118, 110, 0.55);
}

.support-fab-icon {
    display: flex;
    align-items: center;
}

.support-fab-dot {
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: support-pulse 2s ease-in-out infinite;
}

@keyframes support-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.support-unread {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.support-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    width: min(380px, calc(100vw - 2rem));
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    padding: 1rem 1rem 0.85rem;
    max-height: min(520px, 78vh);
    display: flex;
    flex-direction: column;
    animation: support-slide-up 0.2s ease;
}

@keyframes support-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.support-panel[hidden] { display: none !important; }

.support-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.35rem;
}

.support-panel-head strong {
    display: block;
    font-size: 1.05rem;
    color: #0f172a;
}

.support-online {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #16a34a;
    font-weight: 600;
    margin-top: 0.15rem;
}

.support-online::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
}

.support-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.35rem;
    cursor: pointer;
    line-height: 1;
    color: #64748b;
}

.support-intro {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0 0 0.75rem;
    line-height: 1.45;
}

.support-chat-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 160px;
    max-height: 280px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.65rem;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    background: #f8fafc;
}

.support-chat-form {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.support-chat-form input {
    flex: 1;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.9rem;
}

.support-send-btn {
    padding: 0.5rem 0.75rem !important;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-msg {
    margin: 0.4rem 0;
    padding: 0.5rem 0.65rem;
    border-radius: 12px;
    max-width: 88%;
    line-height: 1.4;
    word-break: break-word;
}

.support-msg.user {
    background: #d1fae5;
    color: #065f46;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.support-msg.staff {
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.support-msg-meta {
    display: block;
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

.support-chat-guest {
    text-align: center;
    padding: 1rem 0.5rem;
    margin-bottom: 0.65rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.support-chat-guest p {
    font-size: 0.88rem;
    color: #475569;
    margin-bottom: 0.75rem;
}

.support-guest-btn {
    display: block;
    width: 100%;
    margin-bottom: 0.45rem;
    text-align: center;
    text-decoration: none;
}

.support-channels {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
}

.support-channel-btn {
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    background: #f1f5f9;
    color: #334155;
}

.support-channel-btn.wa {
    background: #25d366;
    color: #fff;
}

.support-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0.45rem 0 0;
    text-align: center;
}

.support-chat-empty {
    color: #94a3b8;
    font-size: 0.82rem;
    text-align: center;
    padding: 1.5rem 0.5rem;
}
