/* Tickets Ibiza app-style filter bar (weekly-class). Loaded only when the bar is active. */

.wcs-fbar-on {
  --wcs-fbar-grad: linear-gradient(135deg, #ED2893 0%, #FF6B6B 100%);
  --wcs-fbar-font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Day headings stick directly beneath the sticky filter strip.
   --wcs-fbar-top: site header offset, --wcs-fbar-h: strip height (both set by JS). */
.wcs-timetable--app-style.wcs-fbar-on .day-sticky,
.wcs-timetable--app-style.wcs-fbar-on .day-sticky.is-fixed {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: calc(var(--wcs-fbar-top, 0px) + var(--wcs-fbar-h, 0px)) !important;
  left: auto !important;
  z-index: 999 !important;
  background: var(--wcs-fbar-bg, #fff) !important;
}
.wcs-timetable--app-style.wcs-fbar-on .wcs-timetable__zero-data-container { display: none !important; }

/* Opaque full-width strip that carries the sticky bar, so nothing shows
   behind its rounded corners. Bleeds to the viewport edge like the day headings. */
.wcs-fbar-sentinel { height: 0; margin: 0; padding: 0; }
.wcs-fbar-sticky {
  position: relative;
  z-index: 1001;
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 8px calc(50vw - 50%);
  background: var(--wcs-fbar-bg, #fff);
  overflow-anchor: none;
}
.wcs-fbar-sticky.is-sticky { position: -webkit-sticky; position: sticky; }
@media (min-width: 992px) {
  .wcs-fbar-sticky { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .wcs-fbar-sticky::before {
    content: ''; position: absolute; inset: 0 -12px; z-index: -1;
    background: var(--wcs-fbar-bg, #fff); pointer-events: none;
  }
}
/* Quick picks collapse smoothly when the stuck bar compacts (never display-toggled).
   grid-template-rows 1fr -> 0fr animates to the row's real height. */
.wcs-fbar__quick-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .25s ease;
}
.wcs-fbar__quick-clip { min-height: 0; overflow: hidden; }
.wcs-fbar__quick-wrap .wcs-fbar__quick {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .2s ease, transform .25s ease;
}
.wcs-fbar-sticky.is-compact .wcs-fbar__quick-wrap { grid-template-rows: 0fr; }
.wcs-fbar-sticky.is-compact .wcs-fbar__quick-wrap .wcs-fbar__quick { opacity: 0; transform: translateY(-6px); }

/* Bar */
.wcs-fbar {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  background: #000;
  color: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  font-family: var(--wcs-fbar-font);
  z-index: 20;
  text-align: left;
}
.wcs-fbar *, .wcs-fbar *::before, .wcs-fbar *::after { box-sizing: border-box; }
.wcs-fbar button { font-family: inherit; margin: 0; -webkit-tap-highlight-color: transparent; }
.wcs-fbar button:focus-visible, .wcs-fbar input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.wcs-fbar__row { display: flex; align-items: center; gap: 8px; }
.wcs-fbar__slot { position: relative; min-width: 0; }
.wcs-fbar__spacer { flex: 1 1 auto; }

.wcs-fbar__btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px; border: 0; border-radius: 24px;
  background: #2A2A2A; color: #fff; cursor: pointer;
  font-size: 14px; font-weight: 600; line-height: 1; letter-spacing: .3px; text-transform: uppercase;
  white-space: nowrap; max-width: 100%;
  transition: background .3s ease;
}
.wcs-fbar__btn.is-active { background: var(--wcs-fbar-grad); }
.wcs-fbar__btn-label { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wcs-fbar__caret { font-size: 10px; flex: 0 0 auto; }

/* Fit: hidden natural-width probes, icon-only buttons, capped entity pill. */
.wcs-fbar { position: relative; }
.wcs-fbar__measure {
  position: absolute; left: 0; top: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none;
  display: flex; gap: 0; width: max-content; max-width: none;
}
.wcs-fbar__measure .wcs-fbar__btn { width: auto !important; max-width: none !important; flex: none !important; }
.wcs-fbar__measure .wcs-fbar__btn-label { overflow: visible; }
.wcs-fbar__slot.is-icon { flex: 0 0 44px !important; width: 44px; }
.wcs-fbar__btn.is-icon,
.wcs-fbar__btn.is-icon.is-active {
  width: 44px !important; height: 44px; padding: 0 !important; justify-content: center !important;
  border-radius: 50%; background: #2A2A2A; gap: 0;
}
.wcs-fbar__icon { position: relative; display: inline-flex; width: 20px; height: 20px; color: #fff; }
.wcs-fbar__icon svg { display: block; width: 20px; height: 20px; }
.wcs-fbar__badge {
  position: absolute; top: -7px; right: -9px; min-width: 12px; height: 12px; padding: 0 3px; border-radius: 8px;
  background: #ED2893; color: #fff; border: 2px solid #2A2A2A; box-sizing: content-box;
  font-size: 9px; font-weight: 700; line-height: 12px; text-align: center; letter-spacing: 0;
}
.wcs-fbar__slot.is-entity { flex: 1 1 auto; }
.wcs-fbar__slot.is-entity .wcs-fbar__btn { width: 100%; }

.wcs-fbar__clear {
  height: 44px; padding: 0 16px; border: 1px solid #5C5C5C; border-radius: 24px;
  background: transparent; color: #fff; cursor: pointer;
  font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; line-height: 1;
  flex: 0 0 auto; transition: border-color .3s ease;
}
.wcs-fbar__clear:hover { border-color: #fff; }
.wcs-fbar__clear-x { display: none; font-size: 14px; }

/* Quick picks */
.wcs-fbar__quick {
  display: flex; gap: 8px; margin-top: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.wcs-fbar__quick::-webkit-scrollbar { display: none; }
.wcs-fbar__pill {
  flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: 24px;
  border: 1px solid #5C5C5C; background: transparent; color: #fff; cursor: pointer;
  font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; line-height: 1; white-space: nowrap;
  transition: background .3s ease, border-color .3s ease;
}
.wcs-fbar__pill:hover { border-color: #fff; }
.wcs-fbar__pill.is-active { background: var(--wcs-fbar-grad); border-color: transparent; }

/* Popovers (desktop) */
.wcs-fbar__panel {
  position: absolute; top: 52px; left: 0; z-index: 40;
  width: 320px; max-width: calc(100vw - 32px);
  background: #191919; color: #fff; border-radius: 12px; padding: 16px;
  box-shadow: 0 4px 30px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 12px;
}
.wcs-fbar__panel--list { width: 240px; padding: 8px; gap: 4px; }
.wcs-fbar__handle, .wcs-fbar__sheet-title, .wcs-fbar__foot--sheet { display: none; }

.wcs-fbar__month { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wcs-fbar__month-title { font-size: 14px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; text-align: center; flex: 1 1 auto; }
.wcs-fbar__nav {
  width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0;
  background: #2A2A2A; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; flex: 0 0 auto;
}
.wcs-fbar__nav:disabled { opacity: .3; cursor: default; }
.wcs-fbar__hint { margin: 0; padding: 0; font-size: 13px; line-height: 1.35; color: #9F9F9E; }

.wcs-fbar__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wcs-fbar__dow { font-size: 11px; font-weight: 600; color: #9F9F9E; text-align: center; padding: 2px 0; text-transform: uppercase; }
.wcs-fbar__blank { visibility: hidden; }
.wcs-fbar__day {
  position: relative; height: 44px; border: 0; border-radius: 12px; padding: 0;
  background: #2A2A2A; color: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: background .3s ease;
}
.wcs-fbar__day:hover:not(:disabled) { background: #3a3a3a; }
.wcs-fbar__day-num { font-size: 15px; font-weight: 600; line-height: 1; }
.wcs-fbar__dots { display: flex; gap: 2px; height: 4px; }
.wcs-fbar__dots i { display: block; width: 4px; height: 4px; border-radius: 50%; background: #ED2893; }
.wcs-fbar__day.is-range { background: rgba(237,40,147,.22); }
.wcs-fbar__day.is-edge { background: var(--wcs-fbar-grad); }
.wcs-fbar__day.is-edge .wcs-fbar__dots i { background: #fff; }
.wcs-fbar__day.is-past { background: transparent; color: #5C5C5C; cursor: default; }
.wcs-fbar__day.is-past .wcs-fbar__dots { visibility: hidden; }

.wcs-fbar__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wcs-fbar__text-btn {
  background: transparent; border: 0; padding: 8px 0; cursor: pointer; color: #9F9F9E;
  font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
}
.wcs-fbar__text-btn:hover { color: #fff; }
.wcs-fbar__done {
  height: 44px; padding: 0 20px; border: 0; border-radius: 24px; cursor: pointer;
  background: var(--wcs-fbar-grad); color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap;
}

/* Club / DJ / party lists */
.wcs-fbar__list { display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
.wcs-fbar__opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: #fff; cursor: pointer; text-align: left;
}
.wcs-fbar__opt:hover { background: #2A2A2A; }
.wcs-fbar__check {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid #5C5C5C;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; line-height: 1; color: transparent;
  transition: background .3s ease, border-color .3s ease;
}
.wcs-fbar__opt.is-on .wcs-fbar__check { background: var(--wcs-fbar-grad); border-color: transparent; color: #fff; }
.wcs-fbar__opt-name { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcs-fbar__opt-count { flex: 0 0 auto; font-size: 13px; color: #9F9F9E; }
.wcs-fbar__search {
  width: 100%; height: 40px; margin: 4px 0; padding: 0 12px; border-radius: 8px;
  border: 1px solid #5C5C5C; background: #0A0A0A; color: #fff; font: 500 14px var(--wcs-fbar-font);
}

/* Result count and empty state */
.wcs-fbar-count {
  margin: 12px 0 0; font-family: var(--wcs-fbar-font);
  font-size: 13px; font-weight: 600; line-height: 1.3; letter-spacing: .5px; text-transform: uppercase; color: #5C5C5C;
  text-align: left;
}
.wcs-fbar-count__loading { text-transform: none; letter-spacing: 0; font-weight: 500; }
.wcs-fbar-empty { margin: 20px 0 0; font-family: var(--wcs-fbar-font); font-size: 15px; line-height: 1.45; color: #5C5C5C; text-align: left; }

.wcs-fbar__backdrop { display: none; }

/* Body-level layer for mobile sheets (see fbarPortal). */
.wcs-fbar-portal {
  position: fixed; inset: 0; z-index: 2147483000; pointer-events: none;
  font-family: var(--wcs-fbar-font); color: #fff; text-align: left;
}
.wcs-fbar-portal:empty { display: none; }
.wcs-fbar-portal > * { pointer-events: auto; }
.wcs-fbar-portal *, .wcs-fbar-portal *::before, .wcs-fbar-portal *::after { box-sizing: border-box; }
.wcs-fbar-portal button { font-family: inherit; margin: 0; -webkit-tap-highlight-color: transparent; }
.wcs-fbar-portal button:focus-visible, .wcs-fbar-portal input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.wcs-fbar__panel { font-family: var(--wcs-fbar-font); }

html.wcs-fbar-lock, html.wcs-fbar-lock body { overflow: hidden !important; }

/* Mobile: full-width buttons, icon Clear, bottom sheets */
@media (max-width: 639.98px) {
  /* Share space by content so a longer label (e.g. "28 oct-2 nov") gets the room it needs. */
  .wcs-fbar__slot { flex: 1 1 auto; }
  .wcs-fbar__row { gap: 6px; }
  .wcs-fbar__btn { width: 100%; justify-content: space-between; gap: 6px; padding: 0 12px; font-size: 13px; letter-spacing: .2px; }
  .wcs-fbar__caret { font-size: 9px; }
  /* Active buttons (gradient) drop the caret to give the label its width back. */
  .wcs-fbar__btn.is-active { justify-content: center; padding: 0 10px; }
  .wcs-fbar__btn.is-active .wcs-fbar__caret { display: none; }
  .wcs-fbar__spacer { display: none; }
  .wcs-fbar__clear { width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  .wcs-fbar__clear-text { display: none; }
  .wcs-fbar__clear-x { display: inline; }
  .wcs-fbar__quick-wrap { margin-left: -12px; margin-right: -12px; }
  .wcs-fbar__quick { padding: 0 12px; scroll-padding: 0 12px; }

  .wcs-fbar__backdrop {
    display: block; position: fixed; inset: 0; z-index: 1; background: rgba(0,0,0,.6);
  }
  /* Mobile panels: centred modal in the upper part of the viewport (rendered in the body-level layer). */
  .wcs-fbar__panel,
  .wcs-fbar__panel--list {
    position: fixed; z-index: 2;
    top: calc(12vh + env(safe-area-inset-top, 0px)); bottom: auto;
    left: 50%; right: auto; transform: translateX(-50%);
    width: calc(100% - 32px); max-width: 480px;
    max-height: calc(76vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    padding: 16px;
    gap: 12px;
  }
  .wcs-fbar__handle { display: none; }
  .wcs-fbar__sheet-title { display: block; font-family: Poppins, var(--wcs-fbar-font); font-size: 20px; font-weight: 600; line-height: 1.2; }
  .wcs-fbar__list { max-height: none; overflow: visible; }
  .wcs-fbar__foot { flex-direction: column-reverse; align-items: stretch; gap: 4px; }
  .wcs-fbar__foot--sheet { display: flex; margin-top: 8px; }
  .wcs-fbar__done { width: 100%; }
  .wcs-fbar__text-btn { align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .wcs-fbar__btn, .wcs-fbar__pill, .wcs-fbar__day, .wcs-fbar__check, .wcs-fbar__clear,
  .wcs-fbar__quick-wrap, .wcs-fbar__quick-wrap .wcs-fbar__quick { transition: none !important; }
  .wcs-fbar-sticky.is-compact .wcs-fbar__quick-wrap .wcs-fbar__quick { transform: none; }
}
