/* Estilos personalizados que ya tenías o ajustes para Bootstrap 5 */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

.section-header h2 {
    color: #0d6efd;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.verdesito {
    color: #198754;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* Ajustes para el contenedor principal de la tarjeta/formulario */
.contact-form-box {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
}

.form-container-box {
    padding: 0;
}

/* Campos de formulario Bootstrap 5 */
.form-control,
.form-select {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #ced4da;
    width: 100%; /* Aseguramos que ocupen el 100% del ancho de su contenedor */
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-group.form-input-box {
    margin-bottom: 1rem;
}

.input-mayusc {
    text-transform: uppercase;
}

/* Botones */
.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    width: 100%; /* Aseguramos que los botones ocupen el 100% del ancho de su contenedor */
}

.bn-green {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

.bn-green:hover {
    background-color: #157347;
    border-color: #146c43;
}

.bn-yellow {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.bn-yellow:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.bn-blue {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.bn-blue:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.boton {
    height: calc(2.5rem + 2px) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tus media queries originales y clases */
@media (max-width: 767px) {
    .cambioxpantalla {
        margin-top: 5px !important;
    }

    .contact-form-box {
        padding: 1.5rem;
    }

    /* --- NUEVO: Estilos para la tabla en dispositivos pequeños --- */
    .table-responsive-custom th {
        font-size: 0.75rem; /* Fuente más pequeña para los encabezados de tabla en móviles */
    }
    /* Esto es clave: evitar saltos de línea en los encabezados */
    .table-responsive-custom th:nth-child(4), /* FOJ / FCH */
    .table-responsive-custom th:nth-child(5), /* NUM / RPTO */
    .table-responsive-custom th:nth-child(6) { /* AÑO */
        white-space: nowrap;
    }
    /* --- FIN NUEVO --- */
}

@media (min-width: 768px) {
    .cambioxpantalla {
        margin-top: -25px !important;
    }
}

@media screen and (max-width: 780px) {
    .lalala {
        margin-top: 10px !important;
    }

    .table-responsive-custom {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .table-responsive-custom table {
        min-width: 650px; /* Asegura que la tabla tenga un ancho mínimo si el contenido se desborda */
        width: 100%;
    }
}

/* Mantenidas tus clases originales */
.oculto {
    display: none;
}

.center {
    text-align: center !important;
}

/* Estilos para la tabla */
.table {
    margin-bottom: 0;
}

.table-sm th,
.table-sm td {
    padding: 0.75rem;
}

.tablesorter-head.table-light {
    background-color: #e9ecef;
}

.tablita {
    font-size: 0.875rem;
    color: #343a40;
}

/* Textos de info y advertencia */
.text-info-small {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: justify;
}

/* Título superior de la tabla "DOCUMENTOS A SOLICITAR" */
.titulo-tabla-docs {
    background-color: #e9ecef;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Columna VALOR de la tabla "DOCUMENTOS A SOLICITAR" (sólo informativa) */
.col-valor {
    white-space: nowrap;
    font-weight: 600;
    color: #14603d;
}

/* Actuaciones sin precio fijo: se valorizan al procesar la solicitud */
.valor-variable-celda {
    font-weight: 600;
    font-style: italic;
    color: #856404;
}

/* Aviso destacado bajo la tabla: los valores son informativos */
.aviso-valores {
    font-size: 0.9rem;
    color: #7a2418;
    background-color: #fdecea;
    border: 1px solid #f5c2bb;
    border-left: 5px solid #94301E;
    padding: 0.7rem 0.9rem;
    border-radius: 0.25rem;
    text-align: justify;
}

.aviso-valores strong {
    letter-spacing: 0.3px;
}

/* Aviso "debe presionar Agregar" debajo de los inputs del documento */
.aviso-agregar-texto {
    font-size: 0.82rem;
    color: #856404;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    margin-bottom: 0;
    text-align: justify;
}

.container.my-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Estilos para el botón de eliminar de la tabla */
.btn-remove-item {
    background-color: #dc3545; /* Color de fondo rojo de Bootstrap (danger) */
    border-color: #dc3545;
    color: #fff;
    font-size: 0.8rem; /* Tamaño de fuente más pequeño */
    padding: 0.25rem 0.5rem; /* Relleno más pequeño */
    border-radius: 0.3rem; /* Bordes ligeramente redondeados (mínimos) */
    display: flex; /* Para centrar el ícono */
    justify-content: center; /* Centra horizontalmente */
    align-items: center; /* Centra verticalmente */
    width: 30px; /* Ancho fijo para que sea pequeño */
    height: 30px; /* Alto fijo */
}

.btn-remove-item:hover {
    background-color: #c82333; /* Color de fondo más oscuro al pasar el mouse */
    border-color: #bd2130;
}

#comunaboleta + .select2-container .select2-selection--single {
    height: 37px !important;
    line-height: 45px !important;
}

/* Para centrar la flecha verticalmente */
#comunaboleta + .select2-container .select2-selection__arrow {
    height: 43px !important;
}