/**
 * IMUS Contact Form Widget - Estilos
 * Versão: 1.1.0
 */

/* ===== Container Principal ===== */
.imus-contact-form {
    background: #f7fafc;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Título e Descrição ===== */
.imus-form-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
}

.imus-form-description {
    margin: 0 0 25px;
    font-size: 14px;
    color: #718096;
    text-align: center;
    line-height: 1.6;
}

/* ===== Formulário ===== */
.imus-contact-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== Campos do Formulário ===== */
.imus-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.imus-form-field label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    display: block;
}

.imus-form-field label .required {
    color: #e53e3e;
    margin-left: 2px;
}

.imus-form-field input[type="text"],
.imus-form-field input[type="email"],
.imus-form-field input[type="tel"],
.imus-form-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
    color: #2d3748;
    background: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.imus-form-field input:focus,
.imus-form-field textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.imus-form-field input::placeholder,
.imus-form-field textarea::placeholder {
    color: #a0aec0;
}

.imus-form-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== Estados de Validação ===== */
.imus-form-field input.error,
.imus-form-field textarea.error {
    border-color: #fc8181;
    background: #fff5f5;
}

.imus-form-field input.success,
.imus-form-field textarea.success {
    border-color: #68d391;
}

.imus-form-field .error-message {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.imus-form-field.has-error .error-message {
    display: block;
}

/* ===== Botão Submit ===== */
.imus-submit-button {
    width: 100%;
    padding: 14px 24px;
    background: #2c5282;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.imus-submit-button:hover {
    background: #2a4365;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

.imus-submit-button:active {
    transform: translateY(0);
}

.imus-submit-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

.imus-submit-button i {
    font-size: 18px;
}

/* ===== Loading State ===== */
.imus-submit-button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.imus-submit-button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: imus-spinner 0.8s linear infinite;
}

@keyframes imus-spinner {
    to { transform: rotate(360deg); }
}

/* ===== Mensagens de Feedback ===== */
.imus-form-message {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    animation: imus-slide-down 0.3s ease;
}

.imus-form-message.show {
    display: flex;
}

.imus-form-message.success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid #38a169;
}

.imus-form-message.error {
    background: #fed7d7;
    color: #742a2a;
    border-left: 4px solid #e53e3e;
}

.imus-form-message i {
    font-size: 18px;
}

@keyframes imus-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Botão WhatsApp ===== */
.imus-whatsapp-button {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.imus-whatsapp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: #25d366;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.imus-whatsapp-link:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.imus-whatsapp-link i {
    font-size: 20px;
}

/* ===== Honeypot (oculto) ===== */
.imus-hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===== Responsividade ===== */
@media (max-width: 768px) {
    .imus-contact-form {
        padding: 20px;
    }

    .imus-form-title {
        font-size: 20px;
    }

    .imus-form-field input,
    .imus-form-field textarea {
        font-size: 16px; /* Previne zoom no iOS */
    }
}

@media (max-width: 480px) {
    .imus-contact-form {
        padding: 15px;
    }

    .imus-submit-button,
    .imus-whatsapp-link {
        font-size: 15px;
        padding: 12px 20px;
    }
}

/* ===== Acessibilidade ===== */
.imus-form-field input:focus-visible,
.imus-form-field textarea:focus-visible {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.imus-submit-button:focus-visible,
.imus-whatsapp-link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
    .imus-contact-form {
        background: #1a202c;
    }

    .imus-form-title {
        color: #f7fafc;
    }

    .imus-form-description {
        color: #a0aec0;
    }

    .imus-form-field label {
        color: #e2e8f0;
    }

    .imus-form-field input,
    .imus-form-field textarea {
        background: #2d3748;
        border-color: #4a5568;
        color: #f7fafc;
    }
}
