/* Estilos temporários - serão movidos para inscricao.css */
.inscricao-container {
max-width: 800px;
margin: 2rem auto;
padding: 0 1rem;
}

.progress-bar {
display: flex;
justify-content: space-between;
margin-bottom: 2rem;
background: white;
padding: 1rem;
border-radius: 50px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.progress-step {
flex: 1;
text-align: center;
padding: 0.5rem;
color: #999;
font-weight: 500;
position: relative;
}

.progress-step.active {
color: #667eea;
font-weight: 600;
}

.progress-step.active::after {
content: '';
position: absolute;
bottom: -5px;
left: 50%;
transform: translateX(-50%);
width: 30px;
height: 3px;
background: #667eea;
border-radius: 3px;
}

.secao-inscricao {
display: none;
}

.secao-inscricao.active {
display: block;
}

.section-title {
color: white;
margin: 1.5rem 0 1rem;
font-size: 1.5rem;
}

.card-inscricao {
background: white;
border-radius: 20px;
padding: 2rem;
margin-bottom: 2rem;
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.botoes-tipo-inscricao {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
}

.btn-tipo-inscricao {
background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
border: 2px solid transparent;
border-radius: 15px;
padding: 1.5rem;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}

.btn-tipo-inscricao:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
border-color: #667eea;
}

.btn-tipo-inscricao.selected {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-color: white;
}

.btn-tipo-inscricao.selected .btn-titulo {
color: white;
}

.btn-tipo-inscricao.selected .btn-descricao {
color: rgba(255,255,255,0.9);
}

.btn-titulo {
font-weight: 700;
font-size: 1.1rem;
margin-bottom: 0.5rem;
color: #333;
}

.btn-descricao {
font-size: 0.9rem;
color: #666;
}

.campo-form {
margin-bottom: 1.5rem;
}

.campo-form label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: #333;
}

.campo-form input,
.campo-form textarea,
.campo-form select {
width: 100%;
padding: 0.75rem;
border: 2px solid #e0e0e0;
border-radius: 10px;
font-size: 1rem;
transition: all 0.3s ease;
}

.campo-form input:focus,
.campo-form textarea:focus,
.campo-form select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Estilos para o campo de instituição com busca */
.instituicao-container {
    position: relative;
    width: 100%;
}

.instituicao-input-wrapper input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.instituicao-input-wrapper input:focus {
    outline: none;
    border-color: #002244;
    box-shadow: 0 0 0 2px rgba(0,34,68,0.1);
}

.instituicao-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.instituicao-suggestions.show {
    display: block;
}

.instituicao-suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.instituicao-suggestion-item:hover,
.instituicao-suggestion-item.selected {
    background: #f0f0f0;
}

.instituicao-suggestion-item.outro-item {
    color: #002244;
    font-weight: 500;
    border-top: 1px solid #ddd;
    background: #f9f9f9;
}

.instituicao-outro-container {
    margin-top: 10px;
    display: none;
}

.instituicao-outro-container.show {
    display: block;
}

.instituicao-outro-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.instituicao-outro-container input:focus {
    outline: none;
    border-color: #002244;
    box-shadow: 0 0 0 2px rgba(0,34,68,0.1);
}

.campo-erro {
    color: red;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

input.error {
    border-color: red !important;
    background-color: #fff0f0 !important;
}

input.valid {
    border-color: green !important;
}

.hint {
display: block;
margin-top: 0.25rem;
color: #666;
font-size: 0.85rem;
}

.grid-2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}

.opcoes-instituicao,
.opcoes-sim-nao {
display: flex;
gap: 2rem;
margin-bottom: 1rem;
}

.radio-label,
.checkbox-label {
display: flex;
align-items: center;
gap: 0.2rem;
cursor: pointer;
}

.checkbox-label.termos {
background: #f8f9fa;
padding: 1rem;
border-radius: 10px;
}

.checkbox-label.termos a {
color: #667eea;
text-decoration: none;
font-weight: 600;
}

.opcoes-conhecimento {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
}

.navegacao-botoes {
display: flex;
justify-content: space-between;
margin-top: 2rem;
}

.btn-voltar,
.btn-avancar,
.btn-finalizar {
padding: 1rem 2rem;
border: none;
border-radius: 50px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}

.btn-voltar {
background: #f0f0f0;
color: #666;
}

.btn-voltar:hover {
background: #e0e0e0;
}

.btn-avancar,
.btn-finalizar {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}

.btn-avancar:hover,
.btn-finalizar:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-finalizar:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.quantidades-container {
margin-top: 2rem;
}

/* Modal */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 2000;
align-items: center;
justify-content: center;
}

.modal.show {
display: flex;
}

.modal-content {
background: white;
border-radius: 20px;
max-width: 800px;
max-height: 80vh;
overflow: hidden;
box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
}

.modal-header h2 {
margin: 0;
font-size: 1.5rem;
}

.modal-close {
background: none;
border: none;
color: white;
font-size: 2rem;
cursor: pointer;
padding: 0;
line-height: 1;
}

.modal-body {
padding: 2rem;
overflow-y: auto;
max-height: calc(80vh - 120px);
}

.modal-footer {
padding: 1rem 2rem;
border-top: 1px solid #e0e0e0;
text-align: right;
}

.btn-fechar-termos {
padding: 0.75rem 2rem;
background: #f0f0f0;
border: none;
border-radius: 50px;
cursor: pointer;
font-weight: 600;
}

.termos-content h3 {
margin: 1.5rem 0 0.5rem;
color: #333;
}

.termos-content p {
color: #666;
line-height: 1.6;
}

/* Delegados e Advisors dinâmicos */
.pessoa-card {
background: #f8f9fa;
border-radius: 15px;
padding: 1.5rem;
margin-bottom: 1.5rem;
border: 2px solid transparent;
transition: all 0.3s ease;
}

.pessoa-card:hover {
border-color: #667eea;
}

.pessoa-card h3 {
margin-bottom: 1rem;
color: #333;
font-size: 1.2rem;
}

.validacao-codigo {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
}

.card-validacao {
background: white;
border-radius: 20px;
padding: 3rem;
max-width: 500px;
width: 100%;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
text-align: center;
}

.card-validacao h2 {
color: #333;
margin-bottom: 1rem;
font-size: 1.8rem;
}

.card-validacao p {
color: #666;
margin-bottom: 2rem;
}

.btn-validar {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 1rem 2rem;
border-radius: 50px;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
width: 100%;
margin-top: 1rem;
transition: all 0.3s ease;
}

.btn-validar:hover {
transform: translateY(-2px);
box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.mensagem-erro {
background: #ff5252;
color: white;
padding: 1rem;
border-radius: 10px;
margin-top: 1rem;
animation: shake 0.5s ease;
}

@keyframes shake {
0%, 100% { transform: translateX(0); }
10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.campo-erro {
color: #ff5252;
font-size: 0.85rem;
margin-top: 0.25rem;
display: none;
}

.campo-erro.visible {
display: block;
}

input.error {
border-color: #ff5252 !important;
background-color: #fff8f8;
}

input.valid {
border-color: #00c853 !important;
}

@media (max-width: 768px) {
.grid-2 {
grid-template-columns: 1fr;
}

.botoes-tipo-inscricao {
grid-template-columns: 1fr;
}

.progress-bar {
flex-direction: column;
gap: 1rem;
}
}

/* Estilo para o título da seção de preferências */ 
.preferencias-title { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    margin: 2rem 0 1rem; 
    
} 
.preferencias-title h3 { 
    color: #2d3748; 
    font-size: 1.3rem; 
    margin: 0; 
    
} 
.preferencias-title .badge { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
    padding: 0.25rem 0.75rem; 
    border-radius: 20px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    
}
/* SELECTS DA TABELA DE PREFERÊNCIAS */

.tabela-preferencias select {
width: 100%;
padding: 0.75rem;
border: 2px solid #e0e0e0;
border-radius: 10px;
font-size: 1rem;
transition: all 0.3s ease;
background: white;

appearance: none;
-webkit-appearance: none;
-moz-appearance: none;

background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 12px center;
background-size: 16px;

cursor: pointer;
}

.tabela-preferencias select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.tabela-preferencias select:hover {
border-color: #667eea;
}
/* LOADER GLOBAL */

.loader-inscricao{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.45);
backdrop-filter:blur(4px);
display:none;
align-items:center;
justify-content:center;
z-index:9999;
}

.loader-box{
background:white;
padding:40px 50px;
border-radius:14px;
text-align:center;
box-shadow:0 15px 40px rgba(0,0,0,0.25);
font-family:'Montserrat', sans-serif;
animation:fadeLoader .3s ease;
}

.spinner{
width:55px;
height:55px;
border:6px solid #e6e6e6;
border-top:6px solid #1a4fa3;
border-radius:50%;
margin:auto;
margin-bottom:15px;
animation:spin 1s linear infinite;
}

.loader-box p{
font-size:18px;
font-weight:600;
margin:5px 0;
}

.loader-box small{
color:#666;
font-size:13px;
}

@keyframes spin{
0%{transform:rotate(0)}
100%{transform:rotate(360deg)}
}

@keyframes fadeLoader{
from{
opacity:0;
transform:scale(.9);
}
to{
opacity:1;
transform:scale(1);
}
}

/* Garante que o container não ultrapasse a tela e tenha padding interno */
.inscricao-container,
.card-inscricao,
.modal-content,
.card-validacao {
    width: 100%;
    max-width: 800px;
    box-sizing: border-box; /* importante para padding não quebrar layout */
}

/* Inputs e selects não ultrapassam a largura do container */
.campo-form input,
.campo-form textarea,
.campo-form select {
    max-width: 100%;
    box-sizing: border-box;
}

/* Grid responsivo já existente */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .botoes-tipo-inscricao {
        grid-template-columns: 1fr;
    }

    .progress-bar {
        flex-direction: column;
        gap: 1rem;
    }
}

.pessoa-card,
.opcoes-conhecimento,
.opcoes-instituicao,
.opcoes-sim-nao {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ==================== ESTILOS RESPONSIVOS PARA TABELA DE PREFERÊNCIAS ==================== */

/* Container da tabela com overflow para scroll horizontal no mobile */
.preferencias-comite {
    width: 100%;
    overflow-x: auto;
    margin: 1.5rem 0;
    -webkit-overflow-scrolling: touch; /* Scroll suave no iOS */
}

/* Tabela com largura mínima para desktop, mas ajustável */
.tabela-preferencias {
    width: 100%;
    min-width: 700px; /* Largura mínima para desktop */
    border-collapse: collapse;
    font-size: 0.9rem;
}

/* Estilo das células da tabela */
.tabela-preferencias th,
.tabela-preferencias td {
    padding: 10px 8px;
    border: 1px solid #ddd;
    vertical-align: middle;
    min-width: 120px; /* Largura mínima para cada célula */
}

/* Cabeçalho fixo para melhor visualização */
.tabela-preferencias th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Primeira coluna (comitê) com fundo diferenciado */
.tabela-preferencias td:first-child,
.tabela-preferencias th:first-child {
    position: sticky;
    left: 0;
    background-color: white;
    z-index: 5;
    font-weight: 600;
    background: #f8f9fa;
}

.tabela-preferencias th:first-child {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 15;
}

/* Ajuste dos selects dentro da tabela */
.tabela-preferencias select {
    width: 100%;
    min-width: 110px;
    padding: 8px 6px;
    font-size: 0.85rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
}

.tabela-preferencias select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.tabela-preferencias select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ==================== VERSÃO MOBILE (REORGANIZAÇÃO EM BLOCOS) ==================== */
/*@media (max-width: 768px) {*/
/*    .preferencias-comite {*/
/*        overflow-x: visible;*/
/*    }*/
    
    /* Transforma a tabela em blocos no mobile */
/*    .tabela-preferencias,*/
/*    .tabela-preferencias thead,*/
/*    .tabela-preferencias tbody,*/
/*    .tabela-preferencias th,*/
/*    .tabela-preferencias td,*/
/*    .tabela-preferencias tr {*/
/*        display: block;*/
/*    }*/
    
    
    /* Esconde o cabeçalho original no mobile */
/*    .tabela-preferencias thead tr {*/
/*        position: absolute;*/
/*        top: -9999px;*/
/*        left: -9999px;*/
/*    }*/
    
    /* Cada linha vira um card */
/*    .tabela-preferencias tr {*/
/*        margin-bottom: 1.5rem;*/
/*        border: 1px solid #e0e0e0;*/
/*        border-radius: 12px;*/
/*        padding: 0.5rem;*/
/*        background: white;*/
/*        box-shadow: 0 2px 8px rgba(0,0,0,0.05);*/
/*    }*/
    
    /* Cada célula vira uma linha com label */
/*    .tabela-preferencias td {*/
/*        display: flex;*/
/*        align-items: center;*/
/*        justify-content: space-between;*/
/*        gap: 10px;*/
/*        padding: 12px 10px;*/
/*        border: none;*/
/*        border-bottom: 1px solid #f0f0f0;*/
/*        min-width: auto;*/
/*    }*/
    
/*    .tabela-preferencias td:last-child {*/
/*        border-bottom: none;*/
/*    }*/
    
    /* Adiciona label antes do conteúdo */
/*    .tabela-preferencias td:before {*/
/*        content: attr(data-label);*/
/*        font-weight: 600;*/
/*        color: #667eea;*/
/*        min-width: 110px;*/
/*        font-size: 0.85rem;*/
/*    }*/
    
    /* Estilo específico para a coluna do comitê */
/*    .tabela-preferencias td:first-child {*/
/*        background: #f8f9fa;*/
/*        border-radius: 8px 8px 0 0;*/
/*        position: static;*/
/*    }*/
    
/*    .tabela-preferencias td:first-child:before {*/
/*        content: "Comitê";*/
/*    }*/
    
    /* Labels para cada representação */
/*    .tabela-preferencias td:nth-child(2):before {*/
/*        content: "1ª Representação";*/
/*    }*/
    
/*    .tabela-preferencias td:nth-child(3):before {*/
/*        content: "2ª Representação";*/
/*    }*/
    
/*    .tabela-preferencias td:nth-child(4):before {*/
/*        content: "3ª Representação";*/
/*    }*/
    
/*    .tabela-preferencias td:nth-child(5):before {*/
/*        content: "4ª Representação";*/
/*    }*/
    
/*    .tabela-preferencias td:nth-child(6):before {*/
/*        content: "5ª Representação";*/
/*    }*/
    
    /* Ajuste dos selects no mobile */
/*    .tabela-preferencias select {*/
/*        width: 60%;*/
/*        min-width: auto;*/
/*        font-size: 0.85rem;*/
/*        padding: 8px 10px;*/
/*    }*/
    
    /* Mensagem informativa */
/*    .preferencias-comite::before {*/
/*        content: "📱 Deslize para ver mais opções se necessário";*/
/*        display: block;*/
/*        text-align: center;*/
/*        font-size: 0.75rem;*/
/*        color: #666;*/
/*        margin-bottom: 10px;*/
/*        background: #f8f9fa;*/
/*        padding: 8px;*/
/*        border-radius: 8px;*/
/*    }*/
/*}*/

/* ==================== VERSÃO TABLET (AJUSTES INTERMEDIÁRIOS) ==================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .tabela-preferencias {
        min-width: 650px;
    }
    
    .tabela-preferencias th,
    .tabela-preferencias td {
        padding: 8px 6px;
        min-width: 100px;
    }
    
    .tabela-preferencias select {
        min-width: 90px;
        font-size: 0.8rem;
        padding: 6px 4px;
    }
}

/* ==================== DESKTOP GRANDE ==================== */
@media (min-width: 1200px) {
    .tabela-preferencias {
        min-width: 800px;
    }
    
    .tabela-preferencias th,
    .tabela-preferencias td {
        padding: 12px 10px;
    }
    
    .tabela-preferencias select {
        min-width: 130px;
        font-size: 0.9rem;
    }
}

/* Estilo para o container principal garantir que não ultrapasse */
.card-inscricao {
    overflow-x: auto;
    padding: 1.5rem;
}

/* Mensagem de ajuda para CSNU */
.csnu-confirmacao {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 10px;
    padding: 12px 15px;
    margin: 10px 0;
    font-size: 0.4rem;
}

.csnu-confirmacao p {
    color: #856404;
    margin-bottom: 10px;
}

.csnu-confirmacao label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.csnu-confirmacao input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ==================== AJUSTE DO TAMANHO DOS TEXTOS DOS RADIOS ==================== */

/* Ajuste geral para todos os labels de radio dentro de opcoes-instituicao */
.opcoes-instituicao label,
.opcoes-sim-nao label,
.campo-form .opcoes-experiencia label {
    font-size: 0.85rem; /* Tamanho padrão para todos */
}

/* Ajuste específico para os radios de experiência em MUN */
.campo-form .opcoes-experiencia label {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

/* Ajuste para os radios de idioma */
.opcoes-instituicao label {
    font-size: 0.9rem;
}

/* Para mobile, ajustar para ficar legível */
@media (max-width: 768px) {
    .opcoes-instituicao label,
    .opcoes-sim-nao label,
    .campo-form .opcoes-experiencia label {
        font-size: 0.5rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* Ajuste específico para os textos mais longos */
    .campo-form .opcoes-experiencia label {
        font-size: 0.5rem;
        padding: 0.4rem 0.3rem;
        white-space: normal;
        word-break: break-word;
    }
}

/* Se quiser aumentar ainda mais no desktop */
@media (min-width: 1024px) {
    .opcoes-instituicao label,
    .opcoes-sim-nao label {
        font-size: 1rem;
    }
    
    .campo-form .opcoes-experiencia label {
        font-size: 0.95rem;
    }
}