/* ==========================================================================
   WhatsPro - Botao Flutuante (Floating Widget)
   Carregado somente quando o botao flutuante e renderizado na pagina.
   ========================================================================== */

/* Protecao do SVG contra regras agressivas de temas */
#wlc-float svg {
    box-sizing: border-box !important;
    max-width: none !important;
    max-height: none !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* O glifo ocupa 80% da bola verde: o conjunto escala como um todo.
   O tamanho da bola vem do CSS dinamico (wp_add_inline_style). */
#wlc-float .wlc-float-btn svg {
    width: 80% !important;
    height: 80% !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

#wlc-float,
.wlc-float-container {
    position: fixed !important;
    bottom: 4rem !important;
    right: 1.5rem !important;
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

#wlc-float.wlc-position-left,
.wlc-float-container.wlc-position-left {
    right: auto !important;
    left: 1.5rem !important;
    flex-direction: row-reverse !important;
}

#wlc-float a,
.wlc-float-container a {
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
}

/* Specificity extra (ID do próprio pill) para vencer regras de tema
   agressivas (ex.: temas que aplicam background transparente em <a>
   com !important em IDs de wrapper). */
#wlc-float #wlc-float-pill {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

#wlc-float a.wlc-float-pill,
.wlc-float-container a.wlc-float-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.125rem !important;
    border-radius: 9999px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e2e8f0 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(1rem) scale(0.95) !important;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s !important;
    max-width: calc(100vw - 7rem) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#wlc-float a.wlc-float-pill.visible,
.wlc-float-container a.wlc-float-pill.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) scale(1) !important;
}

#wlc-float a.wlc-float-pill:hover,
.wlc-float-container a.wlc-float-pill:hover {
    color: #0f766e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.2) !important;
}

.wlc-float-dot {
    width: 0.5rem !important;
    height: 0.5rem !important;
    min-width: 0.5rem !important;
    min-height: 0.5rem !important;
    background-color: #22c55e !important;
    border-radius: 9999px !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2) !important;
    flex-shrink: 0 !important;
}

.wlc-float-text {
    color: #1e293b !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#wlc-float .wlc-float-btn,
.wlc-float-btn {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 3.75rem !important;
    height: 3.75rem !important;
    min-width: 3.75rem !important;
    min-height: 3.75rem !important;
    border-radius: 9999px !important;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(37, 211, 102, 0.4), 0 8px 10px -6px rgba(37, 211, 102, 0.2) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease !important;
}

#wlc-float .wlc-float-btn:hover,
.wlc-float-btn:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 14px 30px -4px rgba(37, 211, 102, 0.55) !important;
}

/* Legenda do botão flutuante é automaticamente oculta em telas pequenas */
@media (max-width: 639px) {

    #wlc-float .wlc-float-pill,
    .wlc-float-container a.wlc-float-pill {
        display: none !important;
    }

    /* Fallback mobile (o CSS dinamico sobrescreve com o tamanho configurado) */
    #wlc-float .wlc-float-btn,
    .wlc-float-btn {
        width: 3.5rem !important;
        height: 3.5rem !important;
        min-width: 3.5rem !important;
        min-height: 3.5rem !important;
    }
}

/* Respeita usuários que preferem menos movimento (vestibular/acessibilidade) */
@media (prefers-reduced-motion: reduce) {

    .wlc-float-pill,
    .wlc-float-btn {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* Foco visível para navegação por teclado (WCAG 2.4.7) */
#wlc-float .wlc-float-btn:focus-visible,
#wlc-float .wlc-float-pill:focus-visible {
    outline: 3px solid #0ea5e9 !important;
    outline-offset: 2px !important;
}
