/* ============================================================================
   Modal de retorno do formulário de cadastro
   ----------------------------------------------------------------------------
   Se você já tem variáveis em variables.css (--laranja, --dark, etc.),
   troque os hex literais abaixo pelos seus var(--nome).
   ========================================================================== */

.form-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 25, 35, 0.72);
    backdrop-filter: blur(3px);
}

.form-modal[hidden] {
    display: none;
}

.form-modal-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #FFFFFF;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    animation: form-modal-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes form-modal-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* Faixa superior: laranja em sucesso, cinza-escuro em erro.
   A cor é o único sinal de estado — sem ícone, sem emoji. */
.form-modal-card::before {
    content: "";
    display: block;
    height: 4px;
    background: #FF5A1F;
}

.form-modal-card[data-type="erro"]::before {
    background: #0F1923;
}

.form-modal-body {
    padding: 36px 32px 28px;
}

.form-modal-eyebrow {
    margin: 0 0 10px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #FF5A1F;
}

.form-modal-card[data-type="erro"] .form-modal-eyebrow {
    color: #767676;
}

.form-modal-title {
    margin: 0 0 12px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: #0F1923;
}

.form-modal-text {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #4A4A4A;
}

.form-modal-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 32px 32px;
}

.form-modal-button {
    padding: 12px 28px;
    border: none;
    border-radius: 2px;
    background: #0F1923;
    color: #FFFFFF;
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 160ms ease;
}

.form-modal-button:hover {
    background: #FF5A1F;
}

.form-modal-button:focus-visible {
    outline: 2px solid #FF5A1F;
    outline-offset: 3px;
}

/* Botão de fechar no canto */
.form-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    color: #767676;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 2px;
    transition: color 160ms ease;
}

.form-modal-close:hover {
    color: #0F1923;
}

.form-modal-close:focus-visible {
    outline: 2px solid #FF5A1F;
    outline-offset: 2px;
}

/* Trava o scroll do fundo enquanto a modal está aberta */
body.form-modal-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .form-modal-body {
        padding: 30px 22px 22px;
    }

    .form-modal-actions {
        padding: 0 22px 26px;
    }

    .form-modal-title {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .form-modal-card {
        animation: none;
    }
}
