/* ===== TEMA CELESTE PARA INFORMACIÓN BÁSICA ===== */
#info-tab.active {
    color: #0dcaf0 !important; /* Celeste (Info) */
    font-weight: bold !important;
    border: 2px solid #0dcaf0 !important;
    border-bottom: none !important;
    background-color: #e7f8fc !important; /* Fondo celeste muy suave */
    border-radius: 6px 6px 0 0 !important;
    position: relative !important;
    z-index: 1 !important;
    margin-bottom: -2px !important;
}
/* Pestaña Información Básica - Inactiva */
#info-tab:not(.active) {
    color: #6c757d !important; /* Gris estándar Bootstrap */
    background-color: #f8f9fa !important; /* Fondo gris muy claro Bootstrap */
}
#info-tab:hover:not(.active) {
    background-color: #d1f2fa !important; /* Fondo celeste aún más suave para hover */
}
/* === FIN TEMA CELESTE INFO BÁSICA === */

/* Pestaña Código Manual - Estado inactivo (gris/plomo) */
#individual-tab:not(.active) {
    color: #6c757d !important; /* Color gris estándar de Bootstrap */
    background-color: #f0f0f0 !important; /* Fondo gris claro */
}

/* Pestaña Código Manual morada - MEJORADA (cuando está activa) */
#individual-tab.active {
    color: #6f42c1 !important;
    font-weight: bold !important;
    border: 2px solid #6f42c1 !important;
    /* border-bottom: none !important; */ /* Comentado o eliminado */
    border-bottom-color: #fff !important; /* <-- AÑADIDO: Borde inferior blanco */
    background-color: #f3f0fa !important; /* Fondo morado muy suave */
    border-radius: 6px 6px 0 0 !important; /* Esquinas redondeadas arriba */
    position: relative !important;
    z-index: 1 !important; /* Asegurar que esté por encima del contenido */
    margin-bottom: -2px !important; /* Compensar el borde (Regresado a -2px) */
}

/* Efecto hover en la pestaña */
#individual-tab:hover:not(.active) {
    background-color: #f8f6fc !important; /* Fondo morado aún más suave para hover */
}

/* Botón Agregar Otro Código */
#add-codigo {
    background-color: #6f42c1 !important;
    border-color: #6f42c1 !important;
    color: #fff !important;
}

#add-codigo:hover {
    background-color: #5a37a0 !important;
    border-color: #543494 !important;
}

/* Badge contador Código Manual - COPIADO EXACTO de los otros */
#contador-codigos-manual {
    /* Posicionamiento */
    margin-left: 0.5rem !important;
    vertical-align: middle !important;
    position: static !important;
    float: none !important;

    /* Tamaño y apariencia */
    font-size: 1.6em !important;
    padding: 0.2em 0.6em !important;
    min-width: 2.5em;
    border-radius: 1em;
    font-weight: bold;

    /* Centrado del número interno con Flexbox */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;

    /* Colores específicos */
    background-color: #6f42c1 !important; /* Mantenemos el morado */
    color: white !important;
}

/* Input grupo icono */
#individual .input-group .input-group-text {
    background-color: #6f42c1 !important;
    border-color: #6f42c1 !important;
    color: white !important;
}

/* Título e iconos */
#individual .bi-upc-scan {
    color: #6f42c1 !important;
}

#individual .codigo-item h6 {
    color: #6f42c1 !important;
}

/* Botón Limpiar más compacto */
#limpiar-codigos-manual {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
}

/* Efecto lines overlay para botón verde - SUTIL */
#generar-codigo-manual-btn {
    position: relative !important;
    overflow: hidden !important;
    background-color: #28a745 !important; /* Verde de Bootstrap */
    border-color: #28a745 !important;
    color: white !important;
}

#generar-codigo-manual-btn:hover {
    background-color: #218838 !important; /* Verde más oscuro al hover */
    border-color: #1e7e34 !important;
}

#generar-codigo-manual-btn::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: repeating-linear-gradient(
        60deg,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 8px,
        rgba(255, 255, 255, 0.1) 8px, /* Reduce la opacidad de 0.2 a 0.1 */
        rgba(255, 255, 255, 0.1) 16px /* Líneas más anchas */
    ) !important;
    /* Animación no infinita, solo una vez */
    animation: lines-slide-once 2s forwards !important;
}

/* Reemplazar la animación infinita con una que ocurre solo una vez */
@keyframes lines-slide-once {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(200%);
    }
}

/* ===== TEMA ROJO PARA ESCANEO MISMO CÓDIGO ===== */

/* Pestaña Escaneo Mismo - Inactiva */
#escaneo-mismo-tab:not(.active) {
    color: #6c757d !important; /* Gris */
    background-color: #f0f0f0 !important; /* Fondo gris claro */
}

/* Pestaña Escaneo Mismo - Activa */
#escaneo-mismo-tab.active {
    color: #dc3545 !important; /* Rojo */
    font-weight: bold !important;
    border: 2px solid #dc3545 !important;
    /* border-bottom: none !important; */ /* Comentado o eliminado */
    border-bottom-color: #fff !important; /* <-- AÑADIDO: Borde inferior blanco */
    background-color: #fce8eA !important; /* Fondo rojo muy suave */
    border-radius: 6px 6px 0 0 !important;
    position: relative !important;
    z-index: 1 !important;
    margin-bottom: -2px !important; /* (Regresado a -2px) */
}

/* Efecto hover en la pestaña Escaneo Mismo */
#escaneo-mismo-tab:hover:not(.active) {
    background-color: #fdf2f3 !important; /* Fondo rojo aún más suave */
}

/* Badge contador Mismo Código - COPIADO EXACTO de #contador-codigos-diferentes */
#contador-codigos-mismo {
    /* Posicionamiento */
    margin-left: 0.5rem !important;   
    vertical-align: middle !important;
    position: static !important;
    float: none !important; /* Añadido para asegurar */

    /* Tamaño y apariencia */
    font-size: 1.6em !important;
    padding: 0.2em 0.6em !important;
    min-width: 2.5em; 
    border-radius: 1em; 
    font-weight: bold;

    /* Centrado del número interno con Flexbox */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    
    /* Colores específicos */
    background-color: #dc3545 !important; /* Mantenemos el rojo */
    color: white !important;
}

/* Input grupo icono Mismo Código */
#escaneo-mismo .input-group .input-group-text {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

/* Indicador Listo Mismo Código */
#escaneo-mismo-status {
     background-color: #dc3545 !important;
     border-color: #dc3545 !important;
     color: white !important;
}

/* Título e iconos Mismo Código */
#escaneo-mismo .bi-list-check { /* Icono título lista */
     color: #dc3545 !important;
}
#escaneo-mismo h6 { /* Texto título lista */
    /* Podríamos hacerlo rojo también, pero podría ser mucho rojo */
    /* color: #dc3545 !important; */
}

/* == FIN TEMA ROJO == */

/* ===== TEMA AZUL PARA ESCANEO DIFERENTES ===== */

/* Pestaña Escaneo Diferentes - Inactiva */
#escaneo-diferentes-tab:not(.active) {
    color: #6c757d !important; /* Gris */
    background-color: #f0f0f0 !important; /* Fondo gris claro */
}

/* Pestaña Escaneo Diferentes - Activa (Azul primario Bootstrap) */
#escaneo-diferentes-tab.active {
    color: #0d6efd !important; /* Azul */
    font-weight: bold !important;
    border: 2px solid #0d6efd !important;
    /* border-bottom: none !important; */ /* Comentado o eliminado */
    border-bottom-color: #fff !important; /* <-- AÑADIDO: Borde inferior blanco */
    background-color: #e7f0ff !important; /* Fondo azul muy suave */
    border-radius: 6px 6px 0 0 !important;
    position: relative !important;
    z-index: 1 !important;
    margin-bottom: -2px !important; /* (Regresado a -2px) */
}

/* Efecto hover en la pestaña Escaneo Diferentes */
#escaneo-diferentes-tab:hover:not(.active) {
    background-color: #f0f5ff !important; /* Fondo azul aún más suave */
}

/* == FIN TEMA AZUL == */

/* Efecto hover en la pestaña Manual */
/* (Este comentario parece redundante o incompleto, se puede eliminar o revisar si falta algo) */


/* Forzar color en botón generar código */
#generar-codigo-manual-btn {
    /* Se duplica la definición, podemos priorizar la de arriba con el efecto hover */
    /* background-color: #6f42c1 !important; */ /* Comentado */
    /* color: white !important; */ /* Comentado */
    /* border-color: #6f42c1 !important; */ /* Comentado */
}

/* Forzar color en los títulos */
.titulo-purple {
    color: #6f42c1 !important;
    font-weight: bold;
}

/* Forzar color en la palabra morado */
.texto-morado {
    color: #6f42c1 !important;
    font-weight: bold;
} 