/* WhatsApp Luxo PRO - Frontend Styles */

/* Container do Botão Flutuante */
#whaluxo-button-container {
    position: fixed;
    bottom: 30px;
    z-index: 999999;
    display: none;
    animation: slideUp 0.5s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

#whaluxo-button-container.position-right {
    right: 30px;
}

#whaluxo-button-container.position-left {
    left: 30px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whaluxo-floating-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.whaluxo-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #20BA5A);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

.whaluxo-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.6);
}

.whaluxo-btn:active {
    transform: scale(0.95);
}

.whaluxo-btn svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.whaluxo-cta-bubble {
    background: white;
    color: #333;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    animation: fadeInLeft 0.5s ease-out 0.5s both;
    font-size: 15px;
    transition: all 0.3s ease;
}

.whaluxo-cta-bubble:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transform: translateX(-5px);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Popup Overlay */
#whaluxo-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000000;
    display: none;              /* sempre inicia oculto */
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease-out;
}



@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.whaluxo-popup-content {
    background: white;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;              /* scroll só se ultrapassar 90vh */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 auto;
}



@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Popup Header */
.whaluxo-popup-header {
    background: linear-gradient(135deg, #2d5016, #4a7c23);
    padding: 24px 24px;
    text-align: center;
    color: white;
    border-radius: 20px 20px 0 0;
    position: relative;
}


.whaluxo-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.whaluxo-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.whaluxo-popup-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.whaluxo-popup-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.whaluxo-popup-header h3 {
    font-size: 2rem;
    margin: 0 0 10px;
    font-weight: 800;
}

.whaluxo-popup-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.05rem;
}

/* Popup Body */
.whaluxo-popup-body {
    padding: 20px 24px;
}


.whaluxo-form-group {
    margin-bottom: 20px;
}

.whaluxo-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.whaluxo-form-group input,
.whaluxo-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.whaluxo-form-group input:focus,
.whaluxo-form-group textarea:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.whaluxo-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.whaluxo-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #25D366, #20BA5A);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.whaluxo-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whaluxo-submit-btn:active {
    transform: translateY(0);
}

/* Scrollbar personalizada para o popup */
.whaluxo-popup-content::-webkit-scrollbar {
    width: 8px;
}

.whaluxo-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.whaluxo-popup-content::-webkit-scrollbar-thumb {
    background: #25D366;
    border-radius: 4px;
}

.whaluxo-popup-content::-webkit-scrollbar-thumb:hover {
    background: #20BA5A;
}

/* Responsivo */
@media (max-width: 768px) {
    #whaluxo-button-container.hide-mobile {
        display: none !important;
    }

    #whaluxo-button-container {
        bottom: 20px;
        right: 20px !important;
        left: auto !important;
    }

    .whaluxo-btn {
        width: 56px;
        height: 56px;
    }

    .whaluxo-btn svg {
        width: 28px;
        height: 28px;
    }

/* CTA Mobile/Desktop - SUBSTITUIR O BLOCO ATUAL */
@media (max-width: 768px) {
    .whaluxo-cta-bubble.hide-mobile {
        display: none !important;
    }
    .whaluxo-cta-bubble.show-mobile {
        display: inline-block !important;
        font-size: 13px;
        padding: 8px 14px;
        white-space: nowrap;
    }
}

@media (min-width: 769px) {
    .whaluxo-cta-bubble.hide-desktop {
        display: none !important;
    }
}


/* Mostrar CTA no mobile se habilitado */
@media (max-width: 768px) {
    .whaluxo-cta-bubble.show-mobile {
        display: block !important;
        font-size: 14px;
        padding: 10px 16px;
        white-space: nowrap;
        animation: fadeInLeft 0.5s ease-out 0.5s both;
    }
}

/* Ocultar CTA no desktop se desabilitado */
@media (min-width: 769px) {
    .whaluxo-cta-bubble.hide-desktop {
        display: none !important;
    }
}


    .whaluxo-popup-content {
        width: 100%;
        border-radius: 15px;
        max-height: 85vh;
    }

    .whaluxo-popup-header {
        padding: 30px 20px;
    }

    .whaluxo-popup-header h3 {
        font-size: 1.6rem;
    }

    .whaluxo-popup-body {
        padding: 18px 16px;
    }

    .whaluxo-form-group input,
    .whaluxo-form-group textarea {
        padding: 12px 14px;
        font-size: 16px; /* Previne zoom no iOS */
    }
}

@media (min-width: 769px) {
    #whaluxo-button-container.hide-desktop {
        display: none !important;
    }
}

/* Prevenir scroll do body quando popup aberto */
body.whaluxo-lock {
    overflow: hidden;
}

/* === Ajustes solicitados === */
.whaluxo-popup-overlay {
    display:flex;
    align-items:center;
    justify-content:center;
}
.whaluxo-popup {
    max-height:90vh;
    overflow:hidden;
}
.whaluxo-popup input,
.whaluxo-popup textarea {
    background:#F8F9FA;
    border:1px solid #CED4DA;
}

/* Effects */
.whaluxo-effect-pulse { animation:pulse 1.5s infinite; }
.whaluxo-effect-float { animation:float 3s ease-in-out infinite; }
.whaluxo-effect-noice { animation:shake 1s infinite; }

@keyframes float {
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(-6px);}
}
@keyframes shake {
  0%,100%{transform:translateX(0);}
  25%{transform:translateX(-2px);}
  75%{transform:translateX(2px);}
}


/* Centralização absoluta do popup (desktop + mobile) */
.whaluxo-popup-overlay {
    position: fixed;
    inset: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 15px;
    z-index: 999999;
}

.whaluxo-popup {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow: hidden;
    margin: auto;
}

@media (max-width: 480px) {
    .whaluxo-popup {
        max-width: 100%;
        border-radius: 12px;
    }
}


/* === FIX CENTRALIZAÇÃO DEFINITIVA POPUP === */
.whaluxo-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    box-sizing: border-box;
}

.whaluxo-popup {
    position: relative !important;
    margin: 0 auto !important;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
}

/* SUBTÍTULO EXTRA */
.whaluxo-subtitle-extra {
    margin: 5px 0 0 0;
    font-size: 0.95rem;
    opacity: 0.85;
    font-style: italic;
}

/* EFEITOS DO BOTÃO */
.whaluxo-effect-pulse {
    animation: pulse 2s infinite;
}

.whaluxo-effect-float {
    animation: float 3s ease-in-out infinite;
}

.whaluxo-effect-shake {
    animation: shake 1s infinite;
}

.whaluxo-effect-none {
    animation: none;
}

/* Animações dos efeitos */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* CORREÇÃO CTA DESKTOP - ESPECIFICIDADE MAIOR */
@media (min-width: 769px) {
    #whaluxo-button-container .whaluxo-cta-bubble.hide-desktop {
        display: none !important;
    }
    
    /* Sempre mostrar no desktop quando habilitado */
    #whaluxo-button-container .whaluxo-cta-bubble:not(.hide-desktop) {
        display: inline-block !important;
    }
}

/* CORREÇÃO MOBILE - ESPECIFICIDADE MAIOR */
@media (max-width: 768px) {
    #whaluxo-button-container .whaluxo-cta-bubble.hide-mobile {
        display: none !important;
    }
    
    #whaluxo-button-container .whaluxo-cta-bubble.show-mobile {
        display: inline-block !important;
        font-size: 13px;
        padding: 8px 14px;
        white-space: nowrap;
        animation: fadeInLeft 0.5s ease-out 0.5s both;
    }
}

/* Ícone customizado do botão */
.whaluxo-custom-icon,
.whaluxo-svg-icon {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain;
    flex-shrink: 0;
}

.whaluxo-custom-icon {
    max-width: 32px;
    max-height: 32px;
}

/* Ícone customizado do POPUP */
.whaluxo-popup-custom-icon,
.whaluxo-popup-svg-icon {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain;
    flex-shrink: 0;
}

.whaluxo-popup-custom-icon {
    max-width: 64px;
    max-height: 64px;
    border-radius: 50%;
}

/* 🎨 CORES DINÂMICAS DO POPUP (via JS) */
.whaluxo-popup-header {
    transition: background 0.3s ease;
}

.whaluxo-submit-btn {
    transition: all 0.3s ease;
}

/* Scrollbar dinâmica (usa cor do botão) */
.whaluxo-popup-content::-webkit-scrollbar-thumb {
    background: var(--whaluxo-submit-bg, #25D366) !important;
    border-radius: 4px;
}

.whaluxo-popup-content::-webkit-scrollbar-thumb:hover {
    background: var(--whaluxo-submit-dark, #20BA5A) !important;
}
