/* ============================================
   MODAL DE CADASTRO FONOVERSO
   ============================================ */

/* Overlay escuro */
.fnv-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 4, 40, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.fnv-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Container do modal */
.fnv-modal {
    background: #fff;
    border-radius: 20px;
    width: 94%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.1);
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}
.fnv-overlay.active .fnv-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Header do modal */
.fnv-modal-header {
    background: linear-gradient(135deg, #5e539f 0%, #C8448A 100%);
    padding: 28px 28px 22px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
}
.fnv-modal-header h2 {
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 4px;
    line-height: 1.3;
}
.fnv-modal-header p {
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    margin: 0;
    font-family: 'Nunito', sans-serif;
}

/* Botão fechar */
.fnv-close {
    position: absolute;
    top: 14px; right: 16px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}
.fnv-close:hover {
    background: rgba(255,255,255,0.35);
}

/* Body do modal */
.fnv-modal-body {
    padding: 28px;
}

/* Indicador de etapas */
.fnv-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}
.fnv-step-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #e0dce8;
    transition: all 0.3s ease;
}
.fnv-step-dot.active {
    background: linear-gradient(135deg, #5e539f, #C8448A);
    width: 28px;
    border-radius: 5px;
}
.fnv-step-label {
    font-size: 0.75rem;
    color: #8E8E9A;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Nunito', sans-serif;
}

/* Grupos de campos */
.fnv-field {
    margin-bottom: 18px;
}
.fnv-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #220F48;
    margin-bottom: 6px;
    font-family: 'Nunito', sans-serif;
}
.fnv-field label .req {
    color: #C8448A;
}
.fnv-field input,
.fnv-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #EBEBF0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Nunito', sans-serif;
    color: #220F48;
    background: #F9FAFC;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
}
.fnv-field input:focus,
.fnv-field select:focus {
    border-color: #5e539f;
    box-shadow: 0 0 0 4px rgba(94, 83, 159, 0.12);
    background: #fff;
}
.fnv-field input.error {
    border-color: #ff4d6a;
    box-shadow: 0 0 0 4px rgba(255, 77, 106, 0.1);
}
.fnv-field .fnv-error-msg {
    font-size: 0.75rem;
    color: #ff4d6a;
    margin-top: 4px;
    display: none;
    font-family: 'Nunito', sans-serif;
}

/* Linha dupla */
.fnv-row {
    display: flex;
    gap: 12px;
}
.fnv-row .fnv-field {
    flex: 1;
}

/* Seções colapsáveis */
.fnv-section-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #5e539f;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 24px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f2effa;
    font-family: 'Nunito', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Botão principal do modal */
.fnv-btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FFBA00 0%, #ff9500 100%);
    color: #220F48;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 186, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
}
.fnv-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 186, 0, 0.45);
    background: linear-gradient(135deg, #ffc629 0%, #ffab2e 100%);
}
.fnv-btn-submit:active {
    transform: translateY(0);
}
.fnv-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner de loading */
.fnv-spinner {
    display: none;
    width: 22px; height: 22px;
    border: 3px solid rgba(34,15,72,0.2);
    border-top-color: #220F48;
    border-radius: 50%;
    animation: fnvSpin 0.7s linear infinite;
}
@keyframes fnvSpin {
    to { transform: rotate(360deg); }
}

/* Badge de segurança */
.fnv-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.78rem;
    color: #8E8E9A;
    font-family: 'Nunito', sans-serif;
}
.fnv-security svg {
    width: 14px; height: 14px;
    stroke: #5e539f;
}

/* Vagas restantes badge */
.fnv-vagas {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    color: #856404;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 50px;
    margin-top: 12px;
    font-family: 'Nunito', sans-serif;
    animation: fnvPulse 2s infinite;
}
@keyframes fnvPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 186, 0, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 186, 0, 0); }
}

/* ============================================
   POPUP ESTOQUE ENCERRADO
   ============================================ */
.fnv-popup-esgotado {
    text-align: center;
    padding: 40px 28px;
}
.fnv-popup-esgotado .fnv-esgotado-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #ffe0ec, #fce8f2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.2rem;
}
.fnv-popup-esgotado h3 {
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #220F48;
    margin: 0 0 10px;
}
.fnv-popup-esgotado p {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: #504D4E;
    line-height: 1.6;
    margin: 0 0 24px;
}
.fnv-popup-esgotado .fnv-btn-reserva {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #5e539f 0%, #C8448A 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(94, 83, 159, 0.3);
}
.fnv-popup-esgotado .fnv-btn-reserva:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(94, 83, 159, 0.4);
}

/* Popup de sucesso na reserva */
.fnv-reserva-ok {
    text-align: center;
    padding: 40px 28px;
}
.fnv-reserva-ok .fnv-ok-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.2rem;
}
.fnv-reserva-ok h3 {
    font-family: 'Nunito', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #155724;
    margin: 0 0 10px;
}
.fnv-reserva-ok p {
    font-family: 'Nunito', sans-serif;
    font-size: 0.92rem;
    color: #504D4E;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   RESPONSIVIDADE MOBILE
   ============================================ */
@media (max-width: 600px) {
    .fnv-modal {
        width: 96%;
        max-height: 94vh;
        border-radius: 16px;
    }
    .fnv-modal-header {
        padding: 22px 20px 18px;
        border-radius: 16px 16px 0 0;
    }
    .fnv-modal-header h2 {
        font-size: 1.2rem;
    }
    .fnv-modal-body {
        padding: 20px;
    }
    .fnv-row {
        flex-direction: column;
        gap: 0;
    }
    .fnv-btn-submit {
        font-size: 1rem;
        padding: 14px;
    }
}

/* ============================================
   CUPOM DE DESCONTO
   ============================================ */
.fnv-cupom-wrapper {
    margin-bottom: 18px;
}
.fnv-cupom-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.fnv-cupom-input-row input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #EBEBF0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Nunito', sans-serif;
    color: #220F48;
    background: #F9FAFC;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    box-sizing: border-box;
    letter-spacing: 1px;
    font-weight: 700;
}
.fnv-cupom-input-row input:focus {
    border-color: #5e539f;
    box-shadow: 0 0 0 4px rgba(94, 83, 159, 0.12);
    background: #fff;
}
.fnv-cupom-input-row input:disabled {
    opacity: 0.85;
    cursor: not-allowed;
}
.fnv-btn-cupom {
    padding: 12px 20px;
    background: linear-gradient(135deg, #5e539f 0%, #C8448A 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(94, 83, 159, 0.25);
}
.fnv-btn-cupom:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(94, 83, 159, 0.35);
}
.fnv-btn-cupom:disabled {
    cursor: default;
    transform: none;
}
.fnv-cupom-feedback {
    display: none;
    margin-top: 8px;
    font-size: 0.82rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fafafa;
    animation: fnvFadeIn 0.3s ease;
}

/* ============================================
   RESUMO DO PEDIDO
   ============================================ */
.fnv-resumo {
    background: #f8f7fc;
    border: 1px solid #e8e5f2;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 18px;
    margin-bottom: 4px;
    font-family: 'Nunito', sans-serif;
    animation: fnvFadeIn 0.3s ease;
}
.fnv-resumo-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.88rem;
    color: #504D4E;
    font-weight: 600;
}
.fnv-resumo-linha + .fnv-resumo-linha {
    border-top: 1px solid #eeecf4;
}
.fnv-resumo-desconto span {
    color: #16a34a !important;
    font-weight: 700;
}
.fnv-resumo-total {
    font-size: 1.05rem;
    font-weight: 800;
    color: #220F48 !important;
    padding-top: 10px !important;
}
.fnv-resumo-total span {
    color: #220F48;
}

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