/* ─────────────────────────────────────────────────────────────────────────────
   Indicador de status de canais WhatsApp na topbar.
   Ícone circular + dot de status no canto. Click abre dropdown.
───────────────────────────────────────────────────────────────────────────── */

.wt-wa-status-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.wt-wa-status-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--wt-fg-3);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.wt-wa-status-btn:hover {
    background: var(--wt-bg-3);
    color: oklch(0.72 0.16 150);
}

/* Dot indicator no canto superior direito */
.wt-wa-status-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid var(--wt-bg);
    background: var(--wt-fg-4);
    transition: background 0.18s;
}

.wt-wa-status-dot.is-ok {
    background: oklch(0.72 0.16 150);
    box-shadow: 0 0 6px oklch(0.72 0.16 150 / 0.5);
}

.wt-wa-status-dot.is-warn {
    background: oklch(0.75 0.15 80);
    box-shadow: 0 0 6px oklch(0.75 0.15 80 / 0.5);
    animation: wt-wa-pulse 1.8s ease-in-out infinite;
}

.wt-wa-status-dot.is-err {
    background: oklch(0.65 0.22 25);
    box-shadow: 0 0 6px oklch(0.65 0.22 25 / 0.5);
}

.wt-wa-status-dot.is-empty {
    background: var(--wt-fg-4);
    opacity: 0.6;
}

@keyframes wt-wa-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Dropdown ───────────────────────────────────────────────────────────── */

.wt-wa-status-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
}

.wt-wa-status-popup {
    position: absolute;
    top: calc(100% + 6px);
    right: -4px;
    z-index: 200;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: var(--wt-card);
    border: 1px solid var(--wt-border);
    border-radius: 12px;
    box-shadow: var(--wt-shadow-lg);
    overflow: hidden;
}

.wt-wa-status-head {
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--wt-border);
    background: var(--wt-bg-2);
}

.wt-wa-status-head-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wt-fg);
}

.wt-wa-status-head-sub {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--wt-fg-3);
}

.wt-wa-status-empty {
    padding: 18px 14px;
    text-align: center;
    font-size: 12.5px;
    color: var(--wt-fg-3);
}

.wt-wa-status-empty a {
    display: inline-block;
    margin-top: 6px;
    color: var(--wt-primary);
    text-decoration: none;
    font-weight: 500;
}

.wt-wa-status-empty a:hover {
    text-decoration: underline;
}

.wt-wa-status-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 360px;
    overflow-y: auto;
}

.wt-wa-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 14px;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
}

.wt-wa-status-row:hover {
    background: var(--wt-bg-2);
}

.wt-wa-status-row-dot {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--wt-fg-4);
}

.wt-wa-status-row-dot.is-ok {
    background: oklch(0.72 0.16 150);
    box-shadow: 0 0 4px oklch(0.72 0.16 150 / 0.5);
}

.wt-wa-status-row-dot.is-warn {
    background: oklch(0.75 0.15 80);
}

.wt-wa-status-row-dot.is-err {
    background: oklch(0.65 0.22 25);
}

.wt-wa-status-row-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.wt-wa-status-row-name {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--wt-fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-wa-status-row-phone {
    font-family: var(--wt-font-mono, monospace);
    font-size: 11px;
    color: var(--wt-fg-4);
}

.wt-wa-status-row-state {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--wt-fg-3);
}

.wt-wa-status-foot {
    padding: 8px 14px;
    border-top: 1px solid var(--wt-border);
    text-align: center;
}

.wt-wa-status-foot a {
    font-size: 12px;
    color: var(--wt-primary);
    text-decoration: none;
    font-weight: 500;
}

.wt-wa-status-foot a:hover {
    text-decoration: underline;
}
