/* =====================================================
   UPSales Forms — Widget WhatsApp + Modal
   ===================================================== */

/* ----- Widget flutuante ----- */
#upsales-whatsapp-widget {
    position: fixed !important;
    bottom: 110px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 9990 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 6px;
}

.floating-btn {
    display: block;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
    line-height: 0;
}

.floating-btn:hover {
    transform: translateX(-3px);
    opacity: 0.9;
}

.floating-btn img {
    display: block;
    height: auto;
    max-width: 120px;
}

/* ----- Overlay do modal ----- */
#whatsappModal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(2px);
    box-sizing: border-box;
}

#whatsappModal.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ----- Conteúdo do modal ----- */
.whatsapp-modal-content {
    position: relative !important;
    background-color: #fff !important;
    background-image: url('../img/modal-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    padding: 28px 28px 24px;
    width: calc(100% - 32px);
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

/* ----- Botão fechar ----- */
.whatsapp-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.1s;
}

.whatsapp-close:hover {
    color: #374151;
}

/* ----- Header do modal ----- */
.whatsapp-modal-header {
    margin-bottom: 20px;
}

.whatsapp-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #111827;
    font-weight: 700;
}

/* ----- Campos do formulário ----- */
.whatsapp-field {
    margin-bottom: 14px;
}

.whatsapp-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.whatsapp-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    box-sizing: border-box;
    transition: border-color 0.15s;
    background: #fafafa;
}

.whatsapp-field input:focus {
    outline: none;
    border-color: #25d366;
    background: #fff;
}

/* ----- Botão enviar ----- */
.whatsapp-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
    padding: 13px;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.whatsapp-submit-btn:hover {
    background: #1ebe5b;
    transform: translateY(-1px);
}

.whatsapp-submit-btn img {
    width: 20px;
    height: 20px;
}

/* ----- Responsivo ----- */
@media (max-width: 480px) {
    #upsales-whatsapp-widget {
        bottom: 16px;
    }

    .floating-btn img {
        max-width: 130px;
    }

    .whatsapp-modal-content {
        padding: 22px 20px 20px;
    }
}
