/* ============================================================
   WhatsApp Widget — Desktop QR Code Drawer
   Global — aplica a todos os temas/demos
   ============================================================ */

/* ── Oculto em mobile (≤768px) ─────────────────────────────── */
@media (max-width: 768px) {
    #wa-fab,
    #wa-overlay,
    #wa-panel {
        display: none !important;
    }
}

/* ── Botão Flutuante (FAB) ─────────────────────────────────── */
#wa-fab {
    position: fixed;
    z-index: 10000; /* acima de qualquer elemento Tailwind (z-[9999]) e do player (1100) */
    width: 60px;
    height: 60px;
    border-radius: 50%; /* padrão oficial circular */
    background: #25D366;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: none; /* JS define 'flex' quando número estiver configurado */
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    /* posição via classe abaixo */
}

#wa-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

#wa-fab svg {
    width: 30px;
    height: 30px;
    fill: #ffffff;
    display: block;
    pointer-events: none;
}

/* Anel de pulso: REMOVIDO — não combina com o formato quadrado brutalista */
#wa-fab::before,
#wa-fab::after {
    display: none !important;
    content: none !important;
    animation: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    visibility: hidden !important;
}

/* ── Classes de posição (geradas pelo PHP via config) ───────── */
/*
 * bottom-* : fica acima do player de áudio fixo (--player-height: 90px)
 * top-*    : fica abaixo do cabeçalho fixo (--header-height: ~80px)
 * O offset de 16px garante uma margem visual confortável.
 */
#wa-fab.wa-btn--bottom-left {
    bottom: calc(var(--player-height, 90px) + 16px);
    left: 28px;
}
#wa-fab.wa-btn--bottom-right {
    bottom: calc(var(--player-height, 90px) + 16px);
    right: 28px;
}
#wa-fab.wa-btn--top-left {
    top: calc(var(--header-height, 80px) + 16px);
    left: 28px;
}
#wa-fab.wa-btn--top-right {
    top: calc(var(--header-height, 80px) + 16px);
    right: 28px;
}

/* ── Overlay escuro ────────────────────────────────────────── */
#wa-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.44);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}

#wa-overlay.wa-open {
    opacity: 1;
    visibility: visible;
}

/* ── Painel Lateral (Drawer) ───────────────────────────────── */
#wa-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    height: 100dvh;
    background: #ffffff;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -6px 0 40px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

#wa-panel.wa-open {
    transform: translateX(0);
}

/* Cabeçalho verde */
#wa-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 14px;
    background: #25D366;
    flex-shrink: 0;
}

.wa-ph-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.2;
}

.wa-ph-title svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    flex-shrink: 0;
}

/* Botão fechar (X) */
#wa-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    color: #ffffff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    line-height: 1;
}

#wa-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Corpo do painel */
#wa-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    gap: 22px;
    text-align: center;
    background: #f7f7f7;
}

.wa-body-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.45;
    margin: 0;
    max-width: 240px;
}

/* Moldura do QR Code */
#wa-qr-wrap {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 232px;
    height: 232px;
    flex-shrink: 0;
}

#wa-qr-wrap canvas,
#wa-qr-wrap img {
    width: 200px;
    height: 200px;
    display: block;
}

/* Instrução */
.wa-body-hint {
    font-size: 0.84rem;
    color: #666666;
    line-height: 1.55;
    margin: 0;
    max-width: 220px;
}