/* ============================================================
   filters.css
   Barra de filtros global — prefijo .gst-filter-
   Depende de las variables definidas en rootcolors.css y gesint.css
   ============================================================ */

/* ===== BARRA PRINCIPAL ===== */
.gst-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

/* ── Agrupador de controles ── */
.gst-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    flex-wrap: wrap;
}

/* ── Separador visual ── */
.gst-filter-sep {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    flex-shrink: 0;
}

/* ── Etiqueta de sección ── */
.gst-filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--slate-500) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}


/* ===== SELECT ===== */
.gst-filter-select {
    height: 38px;
    padding: 0 2rem 0 0.875rem;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-clr);
    color: var(--dark-text-clr);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;

    /* flecha personalizada */
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%2364748b' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
}
.gst-filter-select:hover  { border-color: var(--slate-400); }
.gst-filter-select:focus  {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    outline: none;
}


/* ===== INPUT DE BÚSQUEDA ===== */
.gst-filter-search-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
}
.gst-filter-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--slate-400);
    pointer-events: none;
}
.gst-filter-search {
    width: 100%;
    height: 38px;
    padding: 0 0.875rem 0 2.25rem;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-clr);
    color: var(--dark-text-clr);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.gst-filter-search::placeholder { color: var(--slate-400); }
.gst-filter-search:hover  { border-color: var(--slate-400); }
.gst-filter-search:focus  {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}


/* ===== BOTÓN DE ACCIÓN ===== */
.gst-filter-btn {
    height: 38px;
    min-width: 38px;
    padding: 0 0.875rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: white !important;
    font-size: 1.15rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 2px 8px rgba(37,99,235,0.28);
    flex-shrink: 0;
}
.gst-filter-btn:hover  {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37,99,235,0.38);
}
.gst-filter-btn:active { transform: translateY(0); }
.gst-filter-btn i { line-height: 1; }

/* Variante ghost */
.gst-filter-btn--ghost {
    background: transparent;
    color: var(--slate-500) !important;
    border: 1.5px solid var(--border-color);
    box-shadow: none;
}
.gst-filter-btn--ghost:hover {
    background: var(--bg-clr);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}


/* ===== DARK MODE ===== */
body.dark-mode .gst-filter-select,
body.dark-mode .gst-filter-search {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}
body.dark-mode .gst-filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%2394a3b8' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .gst-filter-bar { padding: 0.75rem; gap: 0.4rem; }
    .gst-filter-select { flex: 1 1 calc(50% - 0.25rem); }
    .gst-filter-search-wrap { flex: 1 1 100%; }
}
@media (max-width: 576px) {
    .gst-filter-select { flex: 1 1 100%; } 
}
