﻿
.barra-busqueda-wrapper {
    position: relative;
}

/* Fondo invisible para click fuera */
.overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 998;
}

/* Panel flotante estilo Odoo */
.panel-filtros-container {
    position: absolute;
    top: 48px; /* debajo de la barra */
    left: 0;
    z-index: 999;
    margin-bottom: 6px;
    display: block;
}

    .panel-filtros-container .form-control,
    .panel-filtros-container .form-select {
        font-size: 13px;
        padding: 4px 8px;
    }

.filter-panel {
    width: 360px;
    max-width: 360px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
    padding: 12px;
}

.filtro-item {
    width: 100%;
    margin-bottom: 6px;
}

    /* Inputs compactos */
    .filtro-item .form-control,
    .filtro-item .form-select {
        width: 100%;
        font-size: 13px;
        padding: 4px 8px;
    }

    /* Check inline */
    .filtro-item .form-check {
        margin: 0;
    }

/* Fecha en una fila */
.filtro-fecha {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filtro-fecha-label {
    flex: 1;
    white-space: nowrap;
}

.filtro-fecha .form-control {
    max-width: 140px;
}

.searchbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    min-width: 340px;
    padding: 0;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    cursor: text;
}

    .searchbox-wrapper:focus-within {
        border-color: #86b7fe;
        box-shadow: 0 0 0 2px rgba(13,110,253,.25);
    }

/* Botones integrados */
.search-btn {
    border: none;
    background: transparent;
    padding: 0 8px;
    height: 100%;
    cursor: pointer;
    font-size: 14px;
}

    .search-btn.left {
        border-right: 1px solid #dee2e6;
        border-radius: 6px 0 0 6px;
    }

    .search-btn.right {
        border-left: 1px solid #dee2e6;
        border-radius: 0 6px 6px 0;
    }

/* Chips */
.search-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    font-size: 12px;
    background: #e9ecef;
    border-radius: 4px;
    white-space: nowrap;
}

/* Cerrar chip */
.chip-close {
    cursor: pointer;
    font-weight: bold;
}

/* Input invisible */
.search-input {
    flex: 1;
    min-width: 120px;
    border: none;
    outline: none;
    background: transparent;
    padding: 4px;
}

.filtro-fecha label {
    font-weight: 500;
    cursor: pointer;
}

.filtro-fecha input[type="checkbox"] {
    cursor: pointer;
}

.arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

    .arrow.open {
        transform: rotate(180deg);
    }

/* ========== ScroolBar Detalle - Productos ==========*/
.scrool-detalle {
    overflow-y: auto; /* Habilita la barra de desplazamiento horizontal */
    /*white-space: nowrap;*/ /* Evita que el contenido se ajuste automáticamente */
}

    /* Estilos de la barra de desplazamiento */
    .scrool-detalle::-webkit-scrollbar {
        width: 6px; /* Establece la altura de la barra de desplazamiento */
    }

    .scrool-detalle::-webkit-scrollbar-thumb {
        background-color: silver; /* Color del pulgar de la barra de desplazamiento */
    }

    .scrool-detalle::-webkit-scrollbar-track {
        background-color: #f1f1f1; /* Color de la pista de la barra de desplazamiento */
    }