/* Container principal - ajustado para integração com o tema */
.mfc-contact-form-container {
    width: 100%;
    height: 100%;
}

/* Formulário - estilos base */
.mfc-contact-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Campos do formulário */
.mfc-form-control,
.mfc-contact-form input[type="text"],
.mfc-contact-form input[type="email"],
.mfc-contact-form input[type="tel"],
.mfc-contact-form select,
.mfc-contact-form textarea {
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.mfc-form-control:focus,
.mfc-contact-form input[type="text"]:focus,
.mfc-contact-form input[type="email"]:focus,
.mfc-contact-form input[type="tel"]:focus,
.mfc-contact-form select:focus,
.mfc-contact-form textarea:focus {
    border-color: #2e86c1;
    box-shadow: 0 0 0 0.2rem rgba(46, 134, 193, 0.25);
    outline: none;
}

/* Rótulos */
.mfc-contact-form .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* Botão de envio - Formulário de Contato */
.mfc-btn-submit {
    background: linear-gradient(135deg, #2e86c1, #1a5276);
    border: none;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: inline-flex;  /* coloca texto + spinner lado a lado */
    align-items: center;   /* centraliza verticalmente */
    justify-content: center; /* mantém centralizado no botão */
}

.mfc-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(46, 134, 193, 0.3);
}

/* Loading animation - agora ao lado do texto */
.mfc-btn-submit .mfc-loading {
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
    margin-left: 10px; /* distância entre o texto e o spinner */
}



/* Validação e mensagens de erro */
.mfc-form-control.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.mfc-form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.mfc-form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Loading animation */
.mfc-loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.mfc-loading.active {
    display: inline-block;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Grid do formulário - compatível com Bootstrap */
.mfc-contact-form .row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.mfc-contact-form .row:last-child {
    margin-bottom: 0;
}

.mfc-contact-form .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 12px;
    padding-left: 12px;
    box-sizing: border-box;
}

.mfc-contact-form .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 12px;
    padding-left: 12px;
    box-sizing: border-box;
}

.mfc-contact-form .mb-3 {
    margin-bottom: 1rem !important;
}

/* Notificações estilizadas */
.mfc-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    background: #4CAF50;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
    display: flex;
    align-items: center;
    max-width: 350px;
}

.mfc-alert.show {
    transform: translateX(0);
}

.mfc-alert.error {
    background: #f44336;
}

.mfc-alert svg {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    fill: white;
}

/* Animação de checkmark */
.checkmark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin-right: 10px;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #fff;
    fill: none;
    animation: stroke .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes fill {
    100% { box-shadow: inset 0 0 0 100px rgba(76, 175, 80, 0); }
}

/* Loading animation no botão */
.mfc-btn-submit {
    position: relative;
}

.mfc-loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

.mfc-loading.active {
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mfc-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Ajustes para mobile */
@media (max-width: 768px) {
    .mfc-contact-form {
        padding: 25px;
    }
    
    .mfc-contact-form .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
    }
    
    .mfc-contact-form .row {
        margin-bottom: 0;
    }
    
    .mfc-form-control,
    .mfc-contact-form input[type="text"],
    .mfc-contact-form input[type="email"],
    .mfc-contact-form input[type="tel"],
    .mfc-contact-form select,
    .mfc-contact-form textarea {
        margin-bottom: 1rem;
    }
}