/* JamaicanSounds filter bar (videos.php + artists.php): search, paging, phone "Filters" toggle, chips, multi-select */

/* Search input styling — match the look of .js-filter-select */
.js-filter-search {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  min-width: 200px;
}
.js-filter-search:focus {
  outline: none;
  border-color: #f5b01a;
  box-shadow: 0 0 0 2px rgba(245,176,26,0.25);
}
@media (max-width: 600px) {
  .js-filter-search { min-width: 0; width: 100%; }
  .js-filter-group-search { flex: 1 1 100%; }
}

/* ── Pagination Prev/Next + mobile collapsible filter bar ───────────── */
.js-filter-group-page { display: flex; align-items: center; gap: .35rem; }
.js-page-btn { background: #fff; border: 1px solid #c6c6c6; color: #2e2e2e; padding: .35rem .6rem; border-radius: 6px; cursor: pointer; font-size: .9rem; transition: background .15s ease, border-color .15s ease; }
.js-page-btn:hover:not(:disabled) { background: #f3f3f3; border-color: #2e7d32; color: #2e7d32; }
.js-page-btn:disabled { opacity: .45; cursor: not-allowed; }
.js-filter-page-input { width: 4.5rem; padding: .35rem .4rem; border: 1px solid #c6c6c6; border-radius: 6px; font-size: .9rem; text-align: center; }
.js-filter-page-input:focus { outline: 2px solid #c4a661; outline-offset: 1px; border-color: #c4a661; }
.js-filter-page-info { color: #555; font-size: .85rem; padding: 0 .15rem; }

.js-filter-toggle { display: none; }
@media (max-width: 768px), (orientation: landscape) and (max-height: 500px) {
  .js-filter-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    width: 100%; padding: .6rem .85rem;
    background: #2e7d32; color: #fff; border: 0; border-radius: 8px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    margin-bottom: .5rem;
  }
  .js-filter-toggle:focus { outline: 2px solid #c4a661; outline-offset: 2px; }
  .js-filter-toggle-icon { transition: transform .2s ease; display: inline-block; }
  .js-filter-bar[data-collapsible="1"]:not(.is-open) .js-filter-inner { display: block; } .js-filter-bar[data-collapsible="1"]:not(.is-open) .js-filter-inner form { display: block; } .js-filter-bar[data-collapsible="1"]:not(.is-open) .js-filter-inner .js-filter-group { display: none !important; } .js-filter-bar[data-collapsible="1"]:not(.is-open) .js-filter-inner .js-filter-group-page { display: flex !important; align-items: center; gap: .35rem; flex-wrap: wrap; }
  .js-filter-bar.is-open .js-filter-toggle-icon { transform: rotate(180deg); }
  /* Align filter-inner padding to match #videos-content (.js-section) padding so right edges line up */
  .js-filter-inner { padding-left: 1rem !important; padding-right: 1rem !important; }
  /* Ensure both forms wrap on mobile so the pagination group doesn't cause horizontal overflow */
  .js-filter-inner form { display: flex; flex-wrap: wrap; gap: .5rem; }
  /* Prevent the pagination group itself from forcing overflow on very narrow screens */
  .js-filter-group-page { flex-wrap: wrap; max-width: 100%; }
}

/* ── Active filter chips ───────────── */
.js-active-filters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .5rem .75rem; margin: 0 0 .75rem 0; background: #f6f6f6; border: 1px solid #e0e0e0; border-radius: 8px; }
.js-active-label { font-weight: 600; color: #444; font-size: .85rem; margin-right: .15rem; }
.js-chip { display: inline-flex; align-items: center; gap: .35rem; background: #fff; border: 1px solid #c4a661; color: #2e2e2e; padding: .2rem .35rem .2rem .55rem; border-radius: 999px; font-size: .85rem; }
.js-chip-x { background: transparent; border: 0; color: #777; font-size: 1.1rem; line-height: 1; padding: 0 .25rem; cursor: pointer; border-radius: 50%; }
.js-chip-x:hover { background: #c4a661; color: #fff; }
.js-clear-all { background: transparent; border: 0; color: #2e7d32; text-decoration: underline; cursor: pointer; font-size: .85rem; padding: .2rem .4rem; margin-left: auto; }
.js-clear-all:hover { color: #1b5e20; }

/* ── Compact multi-select dropdown for Type ───────────── */
.js-multiselect { position: relative; display: inline-block; }
.js-multiselect-toggle { display: inline-flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 9rem; max-width: 14rem; padding: .35rem .55rem; background: #fff; border: 1px solid #c6c6c6; border-radius: 6px; font-size: .9rem; color: #2e2e2e; cursor: pointer; text-align: left; }
.js-multiselect-toggle:hover { border-color: #2e7d32; }
.js-multiselect-toggle[aria-expanded="true"] { border-color: #2e7d32; box-shadow: 0 0 0 2px rgba(46,125,50,.18); }
.js-multiselect-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; }
.js-multiselect-caret { font-size: .8rem; color: #555; transition: transform .15s ease; }
.js-multiselect-toggle[aria-expanded="true"] .js-multiselect-caret { transform: rotate(180deg); }
.js-multiselect-panel { display: none; position: fixed; top: 0; left: 0; min-width: 16rem; max-width: 22rem; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid #c6c6c6; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.13); z-index: 9999; padding: .25rem 0; }
.js-multiselect.is-open .js-multiselect-panel { display: block; }
.js-filter-group .js-multiselect-option { display: flex; align-items: center; gap: .5rem; padding: .4rem .75rem; cursor: pointer; font-size: .9rem; color: #b8860b; font-weight: 600; user-select: none; }
.js-filter-group .js-multiselect-option:hover { background: rgba(196, 166, 97, 0.12); }
.js-multiselect-option input { margin: 0; cursor: pointer; }
.js-filter-group .js-multiselect-option input:checked + span { color: #2e7d32; font-weight: 700; } .js-filter-group .js-multiselect-option:has(input:checked) { background: rgba(46, 125, 50, 0.10); }

/* --- Filter bar: wrap instead of horizontal scroll on narrower viewports --- */
.js-filter-inner form {
    overflow-x: visible !important;
    flex-wrap: wrap !important;
    row-gap: .5rem;
}