/**
 * WhatsApp Capture Plugin - Estilos
 */

/* Modal Container */
.whatsapp-capture-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.whatsapp-capture-modal.hidden {
    display: none;
    opacity: 0;
}

/* Conteúdo da Modal */
.whatsapp-capture-modal-content {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

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

/* Botão Fechar */
.whatsapp-capture-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    transition: color 0.3s ease;
}

.whatsapp-capture-close:hover,
.whatsapp-capture-close:focus {
    color: #000;
}

/* Heading */
.whatsapp-capture-modal-content h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
    margin-top: 0;
    font-weight: 600;
}

/* Parágrafo */
.whatsapp-capture-modal-content p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Formulário */
#whatsapp-capture-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Grupo de Formulário */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-group input::placeholder {
    color: #999;
}

/* Botão Submit */
.whatsapp-capture-btn {
    padding: 12px 20px;
    background-color: #25d366;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.whatsapp-capture-btn:hover {
    background-color: #1fa855;
}

.whatsapp-capture-btn:active {
    transform: scale(0.98);
}

.whatsapp-capture-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Responsivo para Mobile */
@media (max-width: 600px) {
    .whatsapp-capture-modal-content {
        padding: 20px;
        max-width: 100%;
        margin: 10px;
    }

    .whatsapp-capture-modal-content h2 {
        font-size: 20px;
    }

    .whatsapp-capture-close {
        font-size: 24px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 16px; /* Previne zoom em iOS */
    }

    .whatsapp-capture-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Estados de Carregamento */
.whatsapp-capture-btn.loading {
    position: relative;
    color: transparent;
}

.whatsapp-capture-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
