/* Contenedor principal del modal */
.modal-wrapper-credito {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    font-family: Arial, sans-serif;
}

/* Fondo oscuro que se superpone */
.modal-overlay-credito {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparente */
}

/* Contenedor del contenido del modal */
.modal-container-credito {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    z-index: 1051;
    display: flex;
    flex-direction: column;
}

/* Encabezado del modal */
.modal-header-custom-credito {
    padding: 1rem;
    color: #fff;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Estilo para el estado 'PENDIENTE' */
.header-pendiente-credito {
    background-color: #ffc107; /* Amarillo */
}

/* Estilo para el estado 'PAGADO' (o 'EFECTIVO') */
.header-pagado-credito {
    background-color: #28a745; /* Verde */
}

/* Título del modal */
.modal-title-custom-credito {
    margin: 0;
    font-size: 1.25rem;
    font-weight: bold;
}

/* Botón de cierre */
.close-button-custom-credito {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-left: 1rem;
}

.close-button-custom-credito:hover {
    color: #f8f9fa;
}

/* Cuerpo del modal */
.modal-body-custom-credito {
    padding: 1.5rem;
    overflow-y: auto;
    color: #333;
}

/* Pie de página del modal */
.modal-footer-custom-credito {
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Estilos para los formularios (ajustados para Bootstrap) */
.form-group-credito {
    margin-bottom: 1rem;
}

.form-control-credito {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control-credito:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Estilos de botones generales */
.btn-credito {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-success-credito {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success-credito:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger-credito {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger-credito:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-w-m-credito {
    min-width: 80px;
}

/* ... (Mantén las clases CSS anteriores, pero reemplaza la sección de cuadrícula) ... */

/* Clases para el sistema de cuadrícula con Flexbox */
.row-credito-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem; /* Espaciado entre los elementos del formulario */
}

/* Clases de columna */
.col-6-credito {
    flex: 1; /* Permite que el elemento crezca y se adapte */
    min-width: 250px; /* Ancho mínimo para evitar que se comprima demasiado */
}

.col-12-credito {
    flex: 1 0 100%;
    min-width: 100%;
}

/* Media Query para móviles */
@media (max-width: 575px) {
    .row-credito-responsive {
        flex-direction: column; /* Apila los elementos verticalmente */
        gap: 0; /* Elimina el espacio entre elementos apilados */
    }

    .col-6-credito,
    .col-12-credito {
        min-width: 100%; /* Ocupa todo el ancho en móviles */
    }

    .form-group-credito {
        margin-bottom: 1.5rem; /* Espacio extra entre cada formulario */
    }
}
