/* public/assets/css/inscricao.css */

/* ============================
   VARIÁVEIS & RESET
   ============================ */
:root {
    --primary-900: #2E1065;
    --secondary-500: #F97316;
    --secondary-600: #EA580C;
    --success: #10B981;
    --error: #EF4444;
    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --bg-light: #F3F4F6;
}

/* CORREÇÃO CRÍTICA DE ROLAGEM */
body {
    background-color: var(--bg-light);
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    /* Sobrescreve o style.css que trava a tela */
    min-height: 100vh;
    height: auto !important; 
    overflow-y: auto !important; 
    overflow-x: hidden;
}

/* ============================
   HEADER SIMPLIFICADO
   ============================ */
.simple-header {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    z-index: 100; /* Aumentado para garantir sobreposição */
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.btn-back:hover { color: var(--primary-900); }

/* ============================
   CONTAINER DO FORMULÁRIO
   ============================ */
.main-container {
    flex: 1; /* Faz ocupar o espaço restante empurrando rodapé */
    width: 100%;
    max-width: 850px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    padding-bottom: 4rem; /* Espaço extra no final */
}

.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E7EB;
    overflow: visible; /* Permite ver tooltips se houver */
    animation: fadeUp 0.5s ease-out;
    margin-bottom: 2rem;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-header-content {
    background: linear-gradient(135deg, #F9FAFB 0%, #FFFFFF 100%);
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
    border-radius: 16px 16px 0 0;
}

.campanha-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-900);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.campanha-desc {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.form-body { padding: 2.5rem; }

/* ============================
   INPUTS & GRID
   ============================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* Classes de Coluna */
.span-12 { grid-column: span 12; }
.span-8  { grid-column: span 8; }
.span-7  { grid-column: span 7; }
.span-6  { grid-column: span 6; }
.span-5  { grid-column: span 5; }
.span-4  { grid-column: span 4; }
.span-3  { grid-column: span 3; }
.span-2  { grid-column: span 2; }

@media (max-width: 768px) {
    .span-12, .span-8, .span-7, .span-6, .span-5, .span-4, .span-3, .span-2 { 
        grid-column: span 12 !important; 
    }
    .form-body { padding: 1.5rem; }
}

.input-group { display: flex; flex-direction: column; gap: 6px; position: relative; }

.label-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}
.required { color: var(--error); margin-left: 2px; }

.fale-input, .fale-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: #fff;
    transition: all 0.2s ease;
}

.fale-input:focus, .fale-select:focus {
    border-color: var(--secondary-500);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
    outline: none;
}

/* Readonly Inputs (Automáticos) */
.fale-input[readonly] { background-color: #F9FAFB; color: #6B7280; cursor: default; }

/* Estados de Validação */
.input-error { border-color: var(--error) !important; }
.error-msg { font-size: 0.75rem; color: var(--error); display: none; margin-top: 2px; }
.input-group.error .error-msg { display: block; }

/* Divisor de Seção */
.section-divider {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #9CA3AF;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 2rem 0 1.5rem 0;
}
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
    margin-left: 10px;
}

/* ============================
   SELEÇÃO DE CURSOS
   ============================ */
.course-selection-box {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.course-item-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
    transition: background 0.2s;
    background: white;
}

.course-item-label:last-child { border-bottom: none; }
.course-item-label:hover { background-color: #F9FAFB; }

.course-item-label.selected {
    background-color: #FFF7ED;
    border-left: 3px solid var(--secondary-500);
}

.course-item-label input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--secondary-500);
    cursor: pointer;
}

.course-info { flex: 1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px; }
.course-name { font-weight: 600; color: var(--text-dark); font-size: 0.95rem; }
.course-badge { font-size: 0.75rem; background: #F3F4F6; color: #6B7280; padding: 3px 8px; border-radius: 4px; font-weight: 600; }

/* ============================
   TERMOS E BOTÃO
   ============================ */
.terms-box {
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #4B5563;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #E5E7EB;
}
.terms-box input { margin-top: 3px; min-width: 16px; min-height: 16px; accent-color: var(--primary-900); }

.btn-submit {
    background-color: var(--secondary-500);
    color: white;
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(249, 115, 22, 0.2);
}

.btn-submit:hover { background-color: var(--secondary-600); transform: translateY(-2px); box-shadow: 0 8px 12px rgba(249, 115, 22, 0.25); }
.btn-submit:disabled { background-color: #D1D5DB; cursor: not-allowed; transform: none; box-shadow: none; }

/* Spinner */
.spinner {
    width: 20px; height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    display: none;
}
.btn-submit.loading .spinner { display: block; }
.btn-submit.loading span { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Mensagens de Alerta */
.status-message { padding: 1rem; border-radius: 8px; margin-bottom: 2rem; text-align: center; font-size: 0.95rem; line-height: 1.5; }
.msg-success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.msg-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.msg-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }