/* =================================================================
 * HOJA DE ESTILOS PARA EL GENERADOR DE REGISTROS (style.css)
 * Creado por: Juan Manuel Caicedo Oliva
 * Potenciado por: Gemini de Google
 * ================================================================= */

/* --- Variables Globales y Reseteo Básico --- */
:root {
    --primary-color: #4a90e2; /* Un azul profesional y amigable */
    --secondary-color: #50e3c2; /* Un verde menta para acentos */
    --dark-color: #333;
    --light-color: #f4f4f4;
    --grey-color: #ccc;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-color);
    color: var(--dark-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* --- Estructura Principal --- */
.container {
    width: 100%;
    max-width: 800px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 20px 30px;
    text-align: center;
}

header h1 {
    font-weight: 700;
    margin-bottom: 5px;
}

header .credits {
    font-size: 0.9em;
    opacity: 0.9;
}

/* --- Asistente y Barra de Progreso --- */
.wizard-form {
    padding: 30px;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    background-color: var(--grey-color);
    z-index: 1;
}

.progress-bar .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 25%;
    text-align: center;
}

.progress-bar .step span {
    width: 40px;
    height: 40px;
    background-color: var(--grey-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    transition: background-color 0.4s ease;
    border: 4px solid var(--light-color);
}

.progress-bar .step p {
    font-size: 0.9em;
    font-weight: 500;
    margin-top: 8px;
    color: var(--grey-color);
    transition: color 0.4s ease;
}

.progress-bar .step.active span {
    background-color: var(--primary-color);
}

.progress-bar .step.active p {
    color: var(--primary-color);
}

/* --- Pasos del Formulario --- */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

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

.step-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}
/* Hacer que algunos campos ocupen todo el ancho */
.form-group.full-width, .form-group:has(textarea) {
    grid-column: 1 / -1;
}


label {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95em;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--grey-color);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

input:disabled, select:disabled {
    background-color: #ebebeb;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
}

/* --- Botones y Grupos de Botones --- */
.button-group {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

.button-group:has(.btn-next:only-child) {
    justify-content: flex-end;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-next, .btn-generate {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-next:hover, .btn-generate:hover {
    background-color: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-prev {
    background-color: #e0e0e0;
    color: var(--dark-color);
}
.btn-prev:hover {
    background-color: #d0d0d0;
}

/* --- Paso 4: Generación y Estilos de Estado --- */
.generation-status {
    padding: 40px 20px;
    border: 2px dashed var(--grey-color);
    border-radius: 10px;
}

.generation-status .icon-ready {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.btn-generate {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    font-size: 1.1em;
    margin: 20px auto 0;
}

.btn-download {
    background-color: var(--success-color);
    color: white;
    width: 100%;
    max-width: 300px;
    justify-content: center;
    font-size: 1.1em;
    text-decoration: none;
}
.btn-download:hover{
    background-color: #27ae60;
}

#status-messages {
    margin-top: 20px;
    font-weight: 500;
}

.status-message {
    padding: 10px;
    border-radius: 5px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.5s;
}

.status-message.loading {
    background-color: #eaf2ff;
    color: #3a7bc8;
}

.status-message.success {
    background-color: #eafaf1;
    color: #27ae60;
}

.status-message.error {
    background-color: #fbecec;
    color: var(--danger-color);
}

/* Estilos para radios */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    border: 1px solid var(--grey-color);
    padding: 15px;
    border-radius: 8px;
}
.radio-group input[type="radio"] {
    display: none;
}
.radio-group label {
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    background: var(--light-color);
    transition: all 0.3s;
    font-weight: 500;
}
.radio-group input[type="radio"]:checked + label {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(74, 144, 226, 0.4);
}


/* --- Responsividad --- */
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .progress-bar .step p {
        display: none; /* Ocultar texto en móvil para más espacio */
    }
}
