/* 
 * Estilos customizados para integração Mailchimp Newsletter
 * Sobrepõe os estilos padrão para manter consistência com o design do tema
 */

/* Container principal do formulário */
.newsletter-form-custom {
    display: flex;
    flex-direction: column;
}

/* Reset dos estilos padrão do Mailchimp */
.newsletter-form-custom .form-group {
    margin-bottom: 0;
}

.newsletter-form-custom .form-control {
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.newsletter-form-custom .form-control:focus {
    outline: none;
    box-shadow: none;
}

/* Wrapper do input para manter o design existente */
.newsletter-form-custom .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
}

.newsletter-form-custom .input-wrapper .form-control {
    flex: 1;
    padding: 10px 40px 10px 0;
}

/* Ícone da seta (mantém o design original) */
.newsletter-form-custom .input-arrow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Botão de subscrição - adapta o design existente */
.newsletter-form-custom .btn {
    background-color: transparent;
    border: 1px solid #17181F;
    color: #17181F;
    padding: 12px 20px;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.newsletter-form-custom .btn:hover {
    background-color: #17181F;
    color: white;
}

.newsletter-form-custom .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mensagens de feedback - estilo discreto */
.newsletter-form-custom .mailchimp-message {
    margin-top: 10px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 13px;
    line-height: 1.4;
}

.newsletter-form-custom .mailchimp-message p {
    margin: 0;
    padding: 0;
}

.newsletter-form-custom .mailchimp-message.success,
.newsletter-form-custom .mailchimp-message.error,
.newsletter-form-custom .mailchimp-message.info {
    color: #17181f;
}

/* Responsividade */
@media (max-width: 768px) {
    .newsletter-form-custom .btn {
        width: 100%;
        margin-top: 10px;
    }
}

/* Integração com o tema escuro (se aplicável) */
.footer .newsletter-form-custom .form-control {
    color: white;
}

.footer .newsletter-form-custom .input-wrapper {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* Mensagens em tema escuro - usar branco */
.footer .newsletter-form-custom .mailchimp-message.success,
.footer .newsletter-form-custom .mailchimp-message.error,
.footer .newsletter-form-custom .mailchimp-message.info {
    color: white;
}

.footer .newsletter-form-custom .btn {
    border-color: white;
    color: white;
}

.footer .newsletter-form-custom .btn:hover {
    background-color: white;
    color: #17181F;
}

/* Loading state */
.newsletter-form-custom .btn.loading {
    position: relative;
    pointer-events: none;
}

.newsletter-form-custom .btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Input validation states */
.newsletter-form-custom .input-wrapper.focused {
    border-bottom-color: #007cba;
}

.newsletter-form-custom .input-wrapper.valid {
    border-bottom-color: #46b450;
}

.newsletter-form-custom .input-wrapper.invalid {
    border-bottom-color: #dc3232;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
