/* ================================
   FirmaDoc Forms and Documents Styles
   ================================ */

/* ============ GENERAL CONTAINERS ============ */

.verificacion-container,
.busqueda-container {
    max-width: 900px;
    padding: 30px;
    margin: 20px auto;
}

/* ============ TITLES ============ */

.verificacion-titulo,
.busqueda-titulo {
    color: #003399;
    font-size: 2.2em;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 3px solid #003399;
    padding-bottom: 15px;
}

/* ============ INFO BOXES ============ */

.csv-info,
.csv-instrucciones {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-left: 5px solid #003399;
    padding: 20px;
    margin: 25px 0;
    border-radius: 4px;
    color: #333333;
}

.csv-info {
    font-size: 1.15em;
}

.csv-instrucciones {
    font-size: 1.3em;
}

.csv-info strong {
    color: #003399;
    font-size: 1.2em;
}

.info-csv {
    background: #e7f3ff;
    border-left: 5px solid #003399;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    font-size: 0.95em;
    color: #004085;
}

/* ============ ERROR MESSAGES ============ */

.error-message {
    background: #f8d7da;
    border-left: 5px solid #dc3545;
    padding: 20px;
    margin: 25px 0;
    border-radius: 4px;
    color: #721c24;
    font-size: 1.1em;
}

.sin-acceso {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 20px;
    margin: 25px 0;
    border-radius: 4px;
    color: #856404;
    font-size: 1.1em;
}

/* ============ RESULT MESSAGES ============ */

.resultado-mensaje {
    margin: 25px 0;
    border-radius: 4px;
    padding: 20px;
    border-left: 5px solid #dc3545;
    background: #f8d7da;
    color: #721c24;
    font-size: 1.1em;
}

.resultado-mensaje p,
.resultado-mensaje span,
.resultado-mensaje div {
    color: #721c24;
    margin: 0;
    font-weight: 500;
    line-height: 1.6;
}

/* ============ FORMS ============ */

.formulario-csv {
    background: #f9fafb;
    border: 2px solid #dde3e9;
    padding: 25px;
    margin: 25px 0;
    border-radius: 6px;
}

.campos-csv {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.campos-csv input[type="file"] {
    font-size: 0.85rem;
}

.campo-csv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.campo-csv label {
    font-weight: bold;
    color: #003399;
    margin-bottom: 3px;
    font-size: 0.75em;
}

.campo-csv input {
    width: 100%;
    height: 40px;
    padding: 8px 3px;
    border: 1px solid #dde3e9;
    border-radius: 4px;
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.campo-csv input:focus {
    outline: none;
    border-color: #003399;
    box-shadow: 0 0 5px rgba(0, 51, 153, 0.3);
}

.campo-csv input[readonly] {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

/* ============ DUPLICATED STYLES FOR DOCUMENT UPLOAD ============ */

.campos-documento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.campos-documento input[type="file"] {
    font-size: 1rem;
}

.campo-documento {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.campo-documento label {
    font-weight: bold;
    color: #003399;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.campo-documento input {
    padding: 10px;
    border: 1px solid #dde3e9;
    border-radius: 4px;
    font-size: 1.5em;
    transition: border-color 0.3s ease;
}

.campo-documento input:focus {
    outline: none;
    border-color: #003399;
    box-shadow: 0 0 5px rgba(0, 51, 153, 0.3);
}

.campo-documento input[readonly] {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

.campo-documento .checkbox-label {
    align-self: flex-start;
    width: 100%;
    margin-top: 10px;
}

.campo-documento-file {
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

.campo-especial {
    grid-column: 1 / -1;
}

.campo-info {
    font-weight: bold;
    font-size: 15px !important;
    color: #666666;
    margin-top: 5px;
}

.campo-info b {
    color: #003399;
    text-decoration: underline;
}

.secuencia-wrapper {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
}

.secuencia-wrapper label {
    font-weight: bold;
    color: #003399;
    margin-bottom: 5px;
    margin-top: 10px;
    font-size: 0.9em;
}

.secuencia-wrapper input {
    padding: 10px;
    border: 1px solid #dde3e9;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.secuencia-wrapper input:focus {
    outline: none;
    border-color: #003399;
    box-shadow: 0 0 5px rgba(0, 51, 153, 0.3);
}

/* ============ DOWNLOAD OPTIONS ============ */

.opciones-descarga {
    margin: 35px 0;
}

.opcion-descarga {
    background: #f9fafb;
    border: 2px solid #dde3e9;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.opcion-descarga:hover {
    border-color: #003399;
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.12);
    background: #f0f4f9;
}

.opcion-numero {
    display: inline-block;
    background: #003399;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    margin-right: 15px;
    vertical-align: top;
}

.opcion-contenido {
    display: inline-block;
    width: calc(100% - 50px);
    vertical-align: top;
}

.opcion-titulo {
    color: #003399;
    font-weight: bold;
    font-size: 1.25em;
    margin-bottom: 8px;
}

.opcion-descripcion {
    color: #666666;
    font-size: 1.25em;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* ============ BUTTONS ============ */

.boton-descarga,
.boton-buscar {
    display: inline-block;
    background: #003399;
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.boton-descarga {
    padding: 10px 20px;
}

.boton-buscar {
    padding: 12px 30px;
    font-size: 1.05em;
}

.boton-descarga:hover,
.boton-buscar:hover {
    background: #002277;
    box-shadow: 0 2px 8px rgba(0, 34, 119, 0.3);
}

.icono-descarga {
    margin-right: 5px;
}

.botones-acciones {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* ============ CHECKBOX STYLES ============ */

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 1em;
    gap: 10px;
    cursor: pointer;
    font-size: 12px !important;
}

.campo-csv .checkbox-label {
    align-self: flex-start;
    width: 100%;
    margin-top: 10px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 1px solid #dde3e9;
    border-radius: 3px;
}

.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    border-color: #003399;
    box-shadow: 0 0 5px rgba(0, 51, 153, 0.3);
}

/* ============ RESPONSIVE DESIGN ============ */

@media (max-width: 768px) {
    .verificacion-container,
    .busqueda-container {
        padding: 20px;
        margin: 10px auto;
    }
    
    .busqueda-titulo,
    .verificacion-titulo {
        font-size: 1.8em;
        padding-bottom: 10px;
    }
    
    .campos-csv {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .opcion-descripcion {
        font-size: 1.1em;
    }
    
    .boton-descarga,
    .boton-buscar {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .verificacion-container,
    .busqueda-container {
        padding: 15px;
    }
    
    .busqueda-titulo,
    .verificacion-titulo {
        font-size: 1.5em;
        margin-bottom: 5px;
        padding-bottom: 10px;
    }
    
    .campos-csv {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .opcion-numero {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 0.9em;
    }
    
    .opcion-contenido {
        width: calc(100% - 45px);
    }
    
    .opcion-titulo {
        font-size: 1.1em;
    }
    
    .opcion-descripcion {
        font-size: 1em;
    }
    
    .botones-acciones {
        flex-direction: column;
    }
    
    .boton-descarga,
    .boton-buscar {
        width: 100%;
        text-align: center;
    }
}

/* ============ ACCORDION STYLES ============ */

.acordeon-contenedor {
    max-width: 900px;
    padding: 0;
    margin: 20px 0;
    border: 1px solid #dde3e9;
    border-radius: 6px;
    overflow: hidden;
}

.acordeon-item {
    border-bottom: 1px solid #dde3e9;
    font-size: 1.3em;
}

.acordeon-item:last-child {
    border-bottom: none;
}

.acordeon-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #003399;
    font-size: 1.3em;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
}

.acordeon-header:hover {
    background: linear-gradient(135deg, #e8ecf1 0%, #dde3e9 100%);
    box-shadow: 0 2px 4px rgba(0, 51, 153, 0.1);
}

.acordeon-header.activo {
    background: linear-gradient(135deg, #003399 0%, #002277 100%);
    color: white;
}

.acordeon-header.activo::after {
    content: "▲";
}

.acordeon-header::after {
    content: "▼";
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.acordeon-contenido {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.acordeon-contenido.activo {
    max-height: 2000px;
    overflow: visible;
}

.acordeon-body {
    padding: 25px 0px 25px 0px;
}

.acordeon-body .formulario-normal {
    background: transparent;
    border: none;
    padding: 0;
}

.acordeon-body p,
#cuerpo-firmadoc .acordeon-body p {
    font-size: 1.3em;
    color: #666666;
    margin: 0 0 15px 0;
}

.acordeon-body input[type="text"],
.acordeon-body button {
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .acordeon-header {
        padding: 15px;
        font-size: 1em;
    }
    
    .acordeon-body {
        padding: 15px;
    }
}
