/* public/modules/cadastro/style.css */

/* --- TABS ESTILO CYBERPUNK --- */

.tabs-container {
    display: flex;
    justify-content: center; /* Centralizado no Desktop */
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px; /* Para scrollbar não colar */
    
    /* Garante rolagem suave */
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; /* Opcional: esconde scrollbar no Firefox */
}

/* Oculta scrollbar no Chrome/Safari mas mantém funcionalidade */
.tabs-container::-webkit-scrollbar {
    display: none; 
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-gamer);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    --neon-color: var(--neon-blue); /* Cor padrão, sobrescrita no HTML */
    
    /* Impede que o botão encolha */
    flex-shrink: 0; 
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tab-btn.active {
    background: rgba(var(--neon-color), 0.15); /* Fallback se usar rgb puro, mas aqui usaremos cor direta */
    background: var(--bg-card);
    border-color: var(--neon-color);
    color: var(--neon-color);
    box-shadow: 0 0 15px rgba(0,0,0,0.5), inset 0 0 10px rgba(255,255,255,0.05);
    text-shadow: 0 0 8px var(--neon-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}
.tab-content.active { display: block; }

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

/* --- CORREÇÃO MOBILE: RESPONSIVIDADE DAS ABAS --- */
@media (max-width: 900px) {
    .tabs-container {
        justify-content: flex-start; /* Alinha à esquerda para permitir rolagem total */
        padding-left: 15px; /* Espaço extra na lateral */
        padding-right: 15px;
    }
}

/* --- INTERFACE DE IMPORTAÇÃO --- */
.action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

/* Botão de Upload Customizado */
.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
    border: 1px solid transparent;
}
.file-upload-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--neon-blue);
}
.file-upload-btn input { display: none; }
.file-upload-btn.small { padding: 5px 10px; font-size: 0.8rem; }

/* Botão de Ajuda (?) */
.help-btn {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.help-btn:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
}

.help-box {
    display: none;
    background: rgba(0, 243, 255, 0.05);
    border-left: 3px solid var(--neon-blue);
    padding: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- ÁREAS DE TEXTO E INPUTS --- */
textarea {
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-family: monospace;
}
textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
}

/* --- LISTAS SALVAS --- */
.section-title {
    margin-top: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    color: var(--text-secondary);
    font-weight: normal;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.saved-list {
    list-style: none;
    padding: 0;
}

.saved-list li {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 10px;
    padding: 15px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.saved-list li:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

.delete-btn {
    background: transparent;
    border: none;
    color: #ff4757;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: 0.2s;
}
.delete-btn:hover { opacity: 1; transform: scale(1.2); text-shadow: 0 0 10px red; }

/* --- QUIZ & COMPLETE --- */
.manual-insert-box {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(255,255,255,0.1);
    margin-top: 15px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.preview-area {
    margin-top: 20px;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: var(--radius-sm);
    max-height: 250px;
    overflow-y: auto;
}

.preview-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.preview-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Toggle Chips para "Complete a Frase" */
.word-toggle-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    min-height: 50px;
}

.toggle-chip {
    padding: 5px 12px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
}

.toggle-chip:hover { border-color: white; }

.toggle-chip.selected {
    background: rgba(255, 59, 59, 0.2); /* Vermelho Neon Translúcido */
    border-color: var(--neon-red);
    color: var(--neon-red);
    text-decoration: line-through;
    box-shadow: 0 0 8px rgba(255, 59, 59, 0.3);
}

/* Modal de Edição (Overlay Fundo Escuro) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none; /* Começa oculto */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

/* Caixa do Modal */
.modal-box {
    background: #111;
    border: 2px solid var(--neon-blue);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    padding: 20px;
}

.modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-title {
    color: var(--neon-yellow);
    font-family: var(--font-gamer);
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px; /* Espaço pro scroll */
}

/* Custom Scrollbar para o Modal */
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* Linhas de Edição dentro do Modal */
.edit-row {
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 5px;
    align-items: center;
}

.edit-input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 5px;
}
.edit-input:focus { outline: none; border-bottom-color: var(--neon-blue); }

.modal-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Botão de Editar (Lápis) na lista principal */
.btn-edit-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin-right: 5px;
    transition: transform 0.2s;
}
.btn-edit-icon:hover { transform: scale(1.2); }

/* --- Estilos para Importação e Ajuda --- */

.help-icon {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--neon-yellow);
    color: var(--neon-yellow);
    font-weight: bold; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.help-icon:hover {
    background: var(--neon-yellow); color: black;
    box-shadow: 0 0 10px var(--neon-yellow);
}

.info-box {
    background: rgba(255, 221, 0, 0.1);
    border: 1px solid var(--neon-yellow);
    border-radius: 8px; padding: 15px;
    margin-bottom: 15px; font-size: 0.9rem; color: #ddd;
    animation: fadeIn 0.3s ease;
}

.code-example {
    background: rgba(0,0,0,0.5);
    padding: 10px; border-radius: 5px;
    font-family: monospace; color: var(--neon-green);
    margin-top: 5px; line-height: 1.4;
}

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