/* --- Custom Card Styles --- */
.custom-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px; /* Espacio debajo de la tarjeta */
}

.custom-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa; /* Un color de fondo ligero para la cabecera */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.custom-card-header .card-title {
    margin-bottom: 0;
    font-size: 1.25rem; /* Tamaño de título típico */
    font-weight: 600;
    color: #343a40; /* Color oscuro para el texto */
}

.custom-card-body {
    padding: 20px;
}

/* --- Layout (emulando Bootstrap Grid) --- */
.custom-row {
    display: flex;
    flex-wrap: wrap; /* Permite que las columnas se envuelvan a la siguiente línea */
    margin-left: -15px; /* Compensa el padding de las columnas */
    margin-right: -15px; /* Compensa el padding de las columnas */
}

.custom-col {
    flex: 0 0 100%; /* Ocupa el 100% del ancho */
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box; /* Incluye padding en el width */
}

/* --- Form Control (Input Field) --- */
.custom-form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem; /* Padding generoso */
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem; /* Bordes ligeramente redondeados */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box; /* Importante para que el padding no afecte el width */
}

.custom-form-control::placeholder {
    color: #6c757d;
    opacity: 1; /* Para Firefox */
}

.custom-form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff; /* Un azul al enfocar */
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); /* Sombra azul al enfocar */
}

/* --- Custom List Group --- */
.custom-list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6; /* Borde general para la lista */
}

.custom-list-group-item {
    position: relative;
    display: block;
    padding: 0.75rem 1.25rem;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6; /* Borde entre ítems */
    color: #495057; /* Color de texto por defecto */
}

.custom-list-group-item:first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.custom-list-group-item:last-child {
    border-bottom-right-radius: inherit;
    border-bottom-left-radius: inherit;
    border-bottom: 0; /* No hay borde en el último elemento */
}

/* Flexbox para los ítems de cliente */
.custom-list-item-flex {
    display: flex;
    justify-content: space-between; /* Espacio entre el contenido y el botón */
    align-items: center; /* Alineación vertical */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-list-item-flex:hover {
    background-color: #f8f9fa; /* Fondo ligero al pasar el ratón */
}

/* Ítem activo/seleccionado */
.custom-active-item {
    background-color: #cce5ff; /* Color de fondo azul claro (similar a bg-info) */
    color: #004085; /* Color de texto más oscuro para contraste */
    border-color: #b8daff;
}

.custom-active-item .custom-text-primary {
    color: #004085 !important; /* Asegura que el texto del link también cambie de color */
}


/* --- Link y Texto --- */
.custom-text-primary {
    color: #007bff; /* Azul primario */
    text-decoration: none; /* Sin subrayado por defecto en enlaces */
}

.custom-text-primary:hover {
    color: #0056b3; /* Azul más oscuro al pasar el ratón */
    text-decoration: underline;
}

/* --- Badge Wrapper (para el botón del ícono) --- */
.custom-badge-wrapper {
    /* No hay estilos de Bootstrap badge, solo un contenedor si lo necesitas */
}

/* --- Custom Icon Button --- */
.custom-icon-button {
    display: inline-flex; /* Permite centrar el ícono */
    align-items: center;
    justify-content: center;
    padding: 8px 12px; /* Un poco de padding */
    font-size: 0.9em;
    font-weight: 400;
    color: #17a2b8; /* Color similar a btn-outline-info */
    background-color: transparent;
    border: 1px solid #17a2b8; /* Borde del mismo color */
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.custom-icon-button:hover {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.custom-icon-button:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25); /* Sombra de foco */
}

/* Color del ícono primario */
.custom-icon-primary {
    color: #007bff; /* Color azul para los íconos primarios, si no lo sobrescribes en el botón */
    /* Asegúrate de que el color del botón sobrescriba este si es necesario */
}

/* Mensaje "No hay coincidencias" */
.custom-no-match-message {
    display: block;
    text-align: center;
    padding: 10px 0;
    color: #6c757d;
    font-style: italic;
}
/* --- Nuevo Botón de Nuevo Cliente --- */
.custom-new-client-item {
    text-align: center;
    padding: 15px;
    border-top: 1px dashed #dee2e6; /* Separador sutil */
}

.custom-button-new-client {
    background-color: #28a745; /* Un verde para la acción "Nuevo" */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Espacio entre el icono y el texto */
}

.custom-button-new-client:hover {
    background-color: #218838; /* Verde más oscuro al pasar el ratón */
}

.custom-button-new-client i {
    font-size: 1.1em;
}
.custom-modal-dialog {
    /* Puedes ajustar el max-width, margin y transform según necesites */
    position: relative;
    width: auto;
    margin: 1.75rem auto; /* Margen superior/inferior para el modal */
    pointer-events: none; /* Asegura que el clic en el overlay pase a .custom-modal-overlay */
    max-width: 700px; /* Ancho máximo para el modal de cliente */
}

/* --- Contenido del Modal (el cuadro blanco) --- */
.custom-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem; /* Bordes redondeados */
    outline: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); /* Sombra suave */
}

/* --- Cabecera del Modal --- */
.custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Espacio entre título y botón de cerrar */
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
}

.custom-modal-header.custom-bg-info {
    background-color: #17a2b8; /* Un azul cian, similar a Bootstrap info */
    color: #fff; /* Texto blanco para contraste */
}

.custom-modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 1.25rem; /* Tamaño del título */
    font-weight: 600;
    color: inherit; /* Hereda el color del custom-bg-info (blanco) */
}

.custom-close-button {
    padding: 1rem 1rem; /* Padding para el área de clic */
    margin: -1rem -1rem -1rem auto; /* Mueve el botón a la esquina */
    background-color: transparent;
    border: 0;
    font-size: 1.5rem; /* Tamaño de la 'x' */
    font-weight: 700;
    line-height: 1;
    color: #fff; /* Color blanco para la 'x' en cabecera info */
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    opacity: 0.75;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.custom-close-button:hover {
    opacity: 1;
}

/* --- Cuerpo del Modal --- */
.custom-modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.25rem;
}

/* --- Pie del Modal --- */
.custom-modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end; /* Alinea los botones a la derecha */
    padding: 1rem 1.25rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.3rem - 1px);
    border-bottom-left-radius: calc(0.3rem - 1px);
}

.custom-modal-footer > * {
    margin-left: 0.5rem; /* Espacio entre los botones */
}

/* --- Estilos para Form Groups (etiquetas y inputs) --- */
.custom-form-group {
    margin-bottom: 1rem; /* Espacio entre grupos de formulario */
}

.custom-form-group label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #343a40;
}

/* Reutiliza custom-form-control para inputs/selects/textareas */
/* .custom-form-control { ... ya definido antes ... } */


/* --- Estilos para Input Group (con botón de búsqueda) --- */
.custom-input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap; /* Para que los elementos fluyan */
    align-items: stretch;
    width: 100%;
}

.custom-input-group > .custom-form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%; /* Importante para que el input se adapte */
    min-width: 0;
    margin-bottom: 0;
}

.custom-input-group-append {
    display: flex;
    margin-left: -1px; /* Para que el borde se comparta */
}

.custom-input-group-prepend { /* Para el select de código de país */
    display: flex;
    margin-right: -1px; /* Para que el borde se comparta */
}

.custom-input-group > .custom-input-group-append > .custom-button-outline-info,
.custom-input-group > .custom-input-group-prepend > .custom-form-control {
    /* Ajustes específicos de borde para elementos dentro del input-group */
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.custom-input-group > .custom-form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.custom-input-group > .custom-input-group-prepend > .custom-form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.custom-input-group > .custom-input-group-append > .custom-button-outline-info {
     border-top-left-radius: 0;
     border-bottom-left-radius: 0;
}

/* Estilos para el botón de búsqueda de cédula */
.custom-button-outline-info {
    color: #17a2b8;
    background-color: transparent;
    background-image: none;
    border-color: #17a2b8;
    padding: 0.375rem 0.75rem; /* Padding estándar de botón */
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    cursor: pointer;
    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;
}

.custom-button-outline-info:hover {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.custom-button-outline-info:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* --- Botones de Guardar/Cancelar en el Footer --- */
.custom-btn {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    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;
    cursor: pointer;
}

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

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

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

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

.custom-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Margin-bottom utilities */
.custom-mb-3 {
    margin-bottom: 1rem !important; /* Aproximación a mb-3 de Bootstrap */
}

/* Columnas */
.custom-col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

.custom-col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Media Queries para responsividad (similares a Bootstrap) */
@media (min-width: 768px) { /* Medium devices (md) */
    .custom-col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .custom-col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 992px) { /* Large devices (lg) */
    .custom-col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .custom-col-lg-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
/* Asegúrate de que vue-select/dist/vue-select.css esté importado */

/* Ejemplo de cómo podrías hacer que se parezca a tu custom-form-control */
.style-for-vue-select.vs--single .vs__control,
.style-for-vue-select.vs--multiple .vs__control {
    border: 1px solid #ced4da; /* Color de borde similar a custom-form-control */
    border-radius: 0.25rem; /* Bordes redondeados */
    height: calc(1.5em + 0.75rem + 2px); /* Altura similar a custom-form-control */
    font-size: 1rem;
    line-height: 1.5;

    padding: 0.75rem 1rem; /* Padding generoso */
    /*padding: 0.375rem 0.75rem; */
    background-color: #fff;
    color: #495057;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.style-for-vue-select.vs--single .vs__control {
    padding: 0; /* v-select maneja su propio padding interno */
}

.style-for-vue-select .vs__search::placeholder,
.style-for-vue-select .vs__dropdown-toggle,
.style-for-vue-select .vs__dropdown-menu {
    font-family: inherit; /* Asegura que use tu fuente principal */
}

/* Estilos cuando está enfocado */
.style-for-vue-select.vs--single.vs--open .vs__control,
.style-for-vue-select.vs--single.vs--open .vs__control:hover {
    border-color: #80bdff; /* Color de enfoque azul */
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Estilos de las opciones en la lista desplegable */
.style-for-vue-select .vs__dropdown-menu {
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1060; /* Asegura que esté por encima del modal si el modal tiene z-index alto */
}

.style-for-vue-select .vs__dropdown-option {
    padding: 0.75rem 1.25rem;
    color: #212529;
}

.style-for-vue-select .vs__dropdown-option--highlight {
    background: #007bff; /* Color de resaltado al pasar el ratón */
    color: #fff;
}

.style-for-vue-select.vs--disabled .vs__control {
    background-color: #e9ecef; /* Color de fondo cuando está deshabilitado */
    opacity: 1; /* Para que el texto no se vea atenuado */
}

.style-for-vue-select .vs__actions {
    padding: 0 0.5rem 0 0; /* Ajustar padding de los iconos (clear, arrow) */
}

/* Para que se alinee bien con input-group-prepend */
.custom-input-group-prepend .vs__dropdown-toggle {
    border-top-left-radius: 0.25rem !important; /* Mantener redondeado el lado izquierdo */
    border-bottom-left-radius: 0.25rem !important;
    border-top-right-radius: 0 !important; /* Quitar redondeado del lado derecho */
    border-bottom-right-radius: 0 !important;
}

/* Ajuste del margen del input para alinearse en el input-group */
.custom-input-group-prepend .vs__control {
    margin-bottom: 0 !important;
}
