.global-wa-widget {
    position: fixed;
    bottom: 24px;
    z-index: 99999;
    font-family: 'Inter', system-ui, sans-serif;
}

.global-wa-widget--right {
    right: 24px;
}

.global-wa-widget--left {
    left: 24px;
}

.global-wa-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--wa-primary, #0E9F6E);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(14, 159, 110, 0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.global-wa-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 36px rgba(14, 159, 110, 0.55);
}

.global-wa-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--wa-secondary, #FFB703);
    color: #0F172A;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-wa-tooltip {
    position: absolute;
    bottom: 72px;
    right: 0;
    background: #fff;
    color: #0F172A;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.global-wa-widget--left .global-wa-tooltip {
    right: auto;
    left: 0;
}

.global-wa-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.global-wa-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 320px;
    max-width: calc(100vw - 48px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: globalWaIn 0.35s ease;
}

.global-wa-widget--left .global-wa-panel {
    right: auto;
    left: 0;
}

@keyframes globalWaIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.global-wa-panel__header {
    background: linear-gradient(135deg, var(--wa-primary, #0E9F6E), #14B8A6);
    color: #fff;
    padding: 20px;
    position: relative;
}

.global-wa-panel__header p {
    margin: 8px 0 0;
    font-size: 14px;
    opacity: 0.95;
}

.global-wa-panel__brand {
    font-size: 32px;
}

.global-wa-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

.global-wa-agents {
    padding: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.global-wa-agent {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    text-decoration: none;
    color: #0F172A;
    transition: background 0.2s;
    margin-bottom: 6px;
}

.global-wa-agent:hover {
    background: #F1F5F9;
}

.global-wa-agent img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.global-wa-agent__info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.global-wa-agent__info strong {
    font-size: 15px;
}

.global-wa-agent__info small {
    color: #64748B;
    font-size: 12px;
}

.global-wa-agent__status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94A3B8;
}

.global-wa-agent__status.is-online {
    background: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.global-wa-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.global-wa-quick-reply {
    border: 1px solid var(--wa-primary, #0E9F6E);
    background: rgba(14, 159, 110, 0.08);
    color: var(--wa-primary, #0E9F6E);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.global-wa-quick-reply:hover {
    background: var(--wa-primary, #0E9F6E);
    color: #fff;
}

@media (max-width: 768px) {
    .global-wa-widget--hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .global-wa-widget--hide-desktop {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .global-wa-widget {
        bottom: 16px;
    }
    .global-wa-widget--right {
        right: 16px;
    }
    .global-wa-panel {
        width: min(300px, calc(100vw - 32px));
    }
}
