/**
 * Filter block — a centered, wrapping row of plain-text "quick filter" links
 * rendered by FilterBlockCell (rilassi menu-category style): uppercase grey
 * labels that turn red when selected. Every facet's options share one row
 * (e.g. "All  Malacca  1D  3D2N"); links are multi-select toggles, so several
 * can be active at once. On narrow screens the row stays on one line and
 * scrolls left/right instead of wrapping.
 */

.th2-filter-block { padding: 28px 0; }

/* Client-side filter (filter-block.js): cards that don't match the active pills
   are hidden outright. Matching cards fade in so the grid re-flows smoothly
   rather than snapping. */
.lc-filter-card.lc-hidden { display: none !important; }
.lc-filter-card { animation: lc-filter-fade-in .2s ease both; }
@keyframes lc-filter-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .lc-filter-card { animation: none; }
}

/* Per-block "nothing matches this filter" message. */
.lc-filter-empty {
    margin: 0;
    padding: 24px 0;
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}
.lc-filter-empty[hidden] { display: none; }

/* Embedded at the top of a products block (cards or landing style): drop the
   standalone vertical padding and the nested .container gutters so the pills
   line up with the section head and cards below rather than double-indenting. */
.th2-products-block .th2-filter-block,
.th2-landing-products .th2-filter-block { padding: 0 0 18px; }
.th2-products-block .th2-filter-block .container,
.th2-landing-products .th2-filter-block .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* All facets share a single row; keep a little gap if two groups ever render. */
.th2-filter-block .th2-filter-group + .th2-filter-group { margin-top: 8px; }

/* Centered, wrapping row of text links — no scroll, no pills. */
.th2-filter-block .th2-filter-scroll {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 28px;
    padding: 4px 2px;
}

.th2-filter-block .th2-filter-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    background: none;
    border: 0;
    padding: 2px 0;
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color .15s ease;
}
/* Use :focus-visible (not :focus) so a mouse click that DESELECTS a pill doesn't
   leave it looking active from the lingering focus accent — keyboard focus still
   shows it. Hover clears when the pointer leaves. */
.th2-filter-block .th2-filter-pill:hover,
.th2-filter-block .th2-filter-pill:focus-visible {
    color: var(--lc-filter-accent, #dc2626);
}

/* The currently selected facet(s) — stays red so the visitor can see what the
   page is filtered by. Clicking it again clears that value. */
.th2-filter-block .th2-filter-pill.is-active {
    color: var(--lc-filter-accent, #dc2626);
}

/* Mobile: keep everything on one line and scroll horizontally rather than
   wrapping into many rows. Scrollbar hidden; drag/swipe still works. */
@media (max-width: 768px) {
    .th2-filter-block .th2-filter-scroll {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .th2-filter-block .th2-filter-scroll::-webkit-scrollbar { display: none; }

    .th2-filter-block .th2-filter-pill {
        flex: 0 0 auto;
        /* Smaller, tighter labels so more pills fit per scroll row on phones. */
        font-size: 0.8rem;
        letter-spacing: 0.02em;
    }

    /* More breathing room between the Destination row and the Timeline row so
       the two unlabelled scroll rows read as distinct filters on mobile. */
    .th2-filter-block .th2-filter-group + .th2-filter-group { margin-top: 5px; }
}
