.wa-conn-header-item {
    display: flex;
    align-items: center;
}

.wa-conn-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    background: #e9ecef;
    color: #495057;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    max-width: 140px;
}

.wa-conn-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.35);
}

.wa-conn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #adb5bd;
    flex-shrink: 0;
}

.wa-conn-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-conn-btn--loading .wa-conn-dot {
    animation: wa-conn-pulse 1.2s ease-in-out infinite;
}

.wa-conn-btn--active {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.45);
    color: #128c7e;
}

.wa-conn-btn--active .wa-conn-dot {
    background: #25d366;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    animation: wa-conn-pulse-green 1.8s ease-out infinite;
}

.wa-conn-btn--warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.5);
    color: #856404;
}

.wa-conn-btn--warning .wa-conn-dot {
    background: #ffc107;
    animation: wa-conn-pulse 1.4s ease-in-out infinite;
}

.wa-conn-btn--error {
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.4);
    color: #842029;
}

.wa-conn-btn--error .wa-conn-dot {
    background: #dc3545;
    animation: wa-conn-pulse 1s ease-in-out infinite;
}

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

@keyframes wa-conn-pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.wa-conn-modal-text {
    white-space: pre-line;
    font-size: 0.9rem;
}

.wa-conn-modal-json {
    font-size: 0.72rem;
    max-height: 240px;
    overflow: auto;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem;
}

@media (max-width: 991px) {
    .wa-conn-label {
        display: none;
    }

    .wa-conn-btn {
        padding: 0.45rem;
        max-width: none;
    }
}
