/* Selector */
#form-seleccion-entidad {
    margin-bottom: 2rem;
}

/* Tabla de necesidades */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}

table tbody td {
    padding: 10px;
    font-size: 14px;
}

table thead th {
    background: #808016 !important;
    color: #fff !important;
    font-size: 18px !important;
    padding: 10px;
    text-align: center;
    border-bottom: 2px solid #ccc;
}

table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

th.text-center, td.text-center {
	text-align:center !important;
    vertical-align: middle !important;
}

/* Toggle switch moderno */
.on-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.on-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.on-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 30px;
}

.on-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.on-switch input:checked + .on-slider {
    background-color: #808016;
}

.on-switch input:checked + .on-slider:before {
    transform: translateX(20px);
}

/* Spinner */ 
#on-contenido-formulario {
    position: relative;
    min-height: 200px; /* Opcional, para evitar que el contenedor colapse */
}

.on-spinner {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    pointer-events: none; /* Permite que los clics pasen a la tabla si el spinner no está visible */
}

.on-spinner-overlay {
    position: absolute;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.7);
    top: 0; left: 0;
    z-index: 1;
}

.on-spinner-circle {
    width: 48px;
    height: 48px;
    border: 6px solid #eee;
    border-top: 6px solid #808016;
    border-radius: 50%;
    animation: on-spin 1s linear infinite;
}
@keyframes on-spin {
    to { transform: rotate(360deg);}
}


#on-contenido-formulario {
    position: relative;
}

/* Ajustar automáticamente la columna ID */
th.column-id, td.column-id {
    width: 1%;
    white-space: nowrap;
    text-align: center;
    max-width: 80px;
}

/* Modal */
#on-modal-propuesta {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
#on-modal-propuesta.activo {
    display: flex;
}
#on-modal-contenido {
    background: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 0 20px #0002;
    text-align: center;
    max-width: 90vw;
    margin: auto;
}

.on-form-propuesta {
    margin-top: 20px;
    width: 100%;
}

.on-form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

.on-input {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.on-btn {
    padding: 8px 18px;
    font-size: 15px;
    background: #808016;
    color: #fff;
    border: none;
    border-radius: 5px !important;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .on-form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
}
