/**
 * Path: libs/css/estilos.css
 * Autor: pyrukent (Alex / Pyru) - Asistido por IA
 * Versión: v0.1.0-local-dev
 * Descripción: Estilos CSS personalizados para el sistema Cotizador.
 * Añadidos estilos para header y footer rediseñados, y posicionamiento sticky.
 */

/* --- ESTILOS GENERALES --- */
body {
    font-family: 'Montserrat', sans-serif; 
    font-weight: 400; 
    background-image: url('../img/Fondo.png');
    
      background-size: cover;       /* Cubre todo el fondo */
      background-repeat: no-repeat;
      background-position: center center;
      background-attachment: fixed; /* Hace que el fondo no se mueva al hacer scroll */
      position: relative;
    }
    
    /* Opcional: fondo blanco semitransparente sobre la imagen para mejor legibilidad */
    body::before {
      content: "";
      position: absolute;
      top: 0; left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(255, 255, 255, 0.85); /* Ajusta la opacidad aquí */
      z-index: -1;
}
   /* background-color: #f8f9fa; 
    color: #212529; 
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
    margin: 0;
}

/* Contenedor principal */
.container-main {
    flex: 1; 
    padding-top: 1.5rem; 
    padding-bottom: 1.5rem;
}

/* Fuentes para Títulos */
h1, h2, h3, h4, h5, h6, .card-title {
    font-family: 'Poiret One', cursive; 
    font-weight: 400; 
}

/* --- ESTILOS PARA LA NAVEGACIÓN --- */
.navbar-brand {
    font-family: 'Poiret One', cursive;
    font-size: 1.6rem;
    letter-spacing: 1px;
}

.navbar .dropdown-header {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.navbar .dropdown-item {
    padding: 0.5rem 1rem;
}

.navbar .dropdown-item.active, 
.navbar .dropdown-item:active {
    background-color: #0d6efd;
    color: white;
}

.navbar .dropdown-item:hover {
    background-color: #f8f9fa;
}

/* --- ESTILOS PARA LAS CARDS --- */
.card-custom {
    border: 1px solid rgba(0, 0, 0, 0.125); 
    border-radius: 0.375rem; 
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); 
    background-color: #ffffff;
    margin-bottom: 1.5rem;
}

.card-header-custom {
    background-color: #0d6efd; 
    color: #fff;
    font-weight: 400;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-top-left-radius: calc(0.375rem - 1px); 
    border-top-right-radius: calc(0.375rem - 1px);
    padding: 0.75rem 1rem; 
}

/* --- ESTILOS PARA FORMULARIOS --- */
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe; 
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); 
}

.form-control, .form-select, .btn {
   font-family: 'Montserrat', sans-serif;
}

/* Estilo para campos readonly */
input[readonly],
input.form-control[readonly], 
textarea[readonly],
textarea.form-control[readonly] {
    background-color: #e9ecef !important;
    opacity: 0.85;
    cursor: not-allowed;
    border-color: #ced4da; 
}

/* Quitar sombra de foco en readonly */
input[readonly]:focus,
textarea[readonly]:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* --- ESTILOS PARA BOTONES --- */
.btn-primary-custom {
    background-color: #0d6efd;
    border-color: #0d6efd;
    padding: 0.375rem 0.75rem; 
    font-size: 1rem; 
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.btn-primary-custom:hover {
    background-color: #0b5ed7; 
    border-color: #0a58ca;
}

/* --- ESTILOS PARA EL FOOTER --- */
.footer {
    margin-top: auto;
    background-color: #212529;
    color: rgba(255, 255, 255, 0.75);
    padding: 1rem 0;
    font-size: 0.875rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- ESTILOS PARA EL TOGGLE DE CONTRASEÑA --- */
.password-wrapper { 
    position: relative; 
}

.toggle-password { 
    position: absolute; 
    top: 50%; 
    right: 12px; 
    transform: translateY(-50%); 
    cursor: pointer; 
    color: #6c757d; 
    z-index: 5; 
}

.toggle-password i { 
    font-size: 1.1rem; 
}

/* --- ESTILOS PARA CRITERIOS DE CONTRASEÑA --- */
#passwordCriteria .list-unstyled {
    padding-left: 0;
    margin-bottom: 0;
}

/* Clase para el texto del criterio cuando NO se cumple (rojo) */
#passwordCriteria .list-unstyled li.text-danger-criteria,
#passwordCriteria .list-unstyled li .fa-times-circle {
    color: #dc3545 !important;
}

/* Clase para el texto del criterio cuando SÍ se cumple (verde) */
#passwordCriteria .list-unstyled li.text-success-criteria,
#passwordCriteria .list-unstyled li .fa-check-circle {
    color: #198754 !important;
}

/* --- ESTILOS PARA TABLA DE ÍTEMS --- */
#items-table .item-producto,
#items-table .item-concepto {
    font-size: 0.8rem;
}

/* Ajuste altura textarea concepto */
#items-table .item-concepto {
     line-height: 1.3;
     resize: vertical;
}

/* --- ESTILOS PARA CHOICES.JS --- */
.choices {
    position: relative;
    margin-bottom: 0;
    width: 100%;
}

.choices__list--dropdown {
    z-index: 1056;
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    background-color: #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 2px;
}

.choices__list--dropdown .choices__item--choice {
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
}

/* Evitar que contenedores padres corten el dropdown */
.table-responsive, td {
    overflow: visible !important;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 767.98px) {
    .card-custom {
        margin-bottom: 1rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .text-md-end {
        text-align: center !important;
        margin-top: 0.5rem;
    }
}