/* css/filtros_avanzados.css */

/* Overlay del Bottom Sheet */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Contenido del panel que sube */
.bottom-sheet-content {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.bottom-sheet-overlay.active .bottom-sheet-content {
    transform: translateY(0);
}

/* Header */
.bs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.bs-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #111827;
    font-weight: 700;
}

.bs-close {
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.bs-close:hover {
    background: #e5e7eb;
}

/* Cuerpo scrollable */
.bs-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.bs-section {
    margin-bottom: 16px;
}

.bs-section label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.bs-section input[type="text"],
.bs-section select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: #f9fafb;
    color: #111827;
    outline: none;
    transition: border-color 0.2s;
}

.bs-section input[type="text"]:focus,
.bs-section select:focus {
    border-color: #0c569d;
    background: #ffffff;
}

/* Grid para opciones más cortas */
.bs-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Footer (Botones) */
.bs-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    background: #f9fafb;
}

.bs-btn-clear {
    flex: 1;
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #4b5563;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.bs-btn-clear:hover {
    background: #f3f4f6;
}

.bs-btn-apply {
    flex: 2;
    background: #0c569d;
    border: none;
    color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(12, 86, 157, 0.2);
    transition: background 0.2s, transform 0.1s;
}

.bs-btn-apply:hover {
    background: #094074;
}
.bs-btn-apply:active {
    transform: scale(0.98);
}

/* Chips Activos */
.filtros-activos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding: 0 4px;
}

.chip-filtro {
    display: inline-flex;
    align-items: center;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    animation: slideIn 0.2s ease-out;
}

.chip-filtro button {
    background: none;
    border: none;
    color: #0284c7;
    margin-left: 6px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.chip-filtro button:hover {
    color: #0c569d;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .bs-grid-2 {
        grid-template-columns: 1fr;
    }
}
