/* Rainout Line — status colours + card shell only.
   Bootstrap handles grid, spacing, flex.
   Theme tokens from style.css handle typography + brand colours. */

.rainout-section {
  background-color: #ecf0f8;
  padding-block: 57px 59px;
}

.rs-wrap {
  border-radius: 20px;
  background: var(--color-white);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.16);
  padding: 30px 40px 59px;
}

/* ── Page header ───────────────────────────────────────────────────────── */
.rs-page-title {
  font-size: var(--h3-2-size);
  font-weight: var(--fw-extrabold);
  text-transform: uppercase;
}

/* ── Search ────────────────────────────────────────────────────────────── */
.rs-search-wrap {
  position: relative;
  min-width: 280px;
}

.rs-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.rs-search.form-control {
  width: 376px;
  padding: 12px 60px 12px 15px;
  border-radius: 10px;
  border: 1px solid #bfbfbf;
  background: var(--color-white);
}

.rs-search.form-control::placeholder {
  color: #989898;
}

.rs-search.form-control:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(43, 60, 115, 0.12) !important;
}

/* Hide native search clear (×) to prevent overlap with search icon */
.rs-search.form-control::-webkit-search-cancel-button,
.rs-search.form-control::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.rs-search-clear {
  position: absolute;
  right: 38px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #989898;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: color 0.2s ease;
}

.rs-search-clear:hover {
  color: var(--color-primary);
}

.rs-search-clear:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 1px;
  border-radius: 4px;
}

.rs-search-clear[hidden] {
  display: none;
}

/* ── Filter bar ────────────────────────────────────────────────────────── */
.rs-filter-bar {
  border-radius: 20px;
  background: #eaf1f3;
  padding: 20px 29px 34px 38px;
  margin-bottom: 23px;
}

.rs-filter-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  color: var(--color-primary);
}

.rs-filter-clear {
  color: var(--color-primary);
  font-size: var(--body-small);
  text-decoration: none;
  background: transparent;
  border: none;
  transition: opacity 0.2s ease;
}

.rs-filter-clear.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.rs-filter-group-label {
  color: var(--color-black);
  font-size: var(--body-small);
  font-weight: var(--fw-medium);
}

/* Status pills */
.rs-filter-inputs {
  gap: 2rem;
}

.rs-filter-btn {
  display: inline-flex;
  padding: 6px 14px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 40px;
  border: 1px solid transparent;
  background: var(--color-white);
  color: #4e4e4e;
  font-size: var(--body-small);
  font-weight: var(--fw-bold);
}

.rs-filter-count {
  color: #333333;
  font-size: 12px;
}

.rs-filter-btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* "All" chip — border-only active style (no modifier class) */
.rs-filter-btn.is-active {
  border-color: #4e4e4e;
}

/* ── Per-status active chip colours ────────────────────────────────── */
.rs-filter-btn--go.is-active {
  background: #d8ffe9;
  color: #239a57;
}

.rs-filter-btn--open.is-active {
  background: #ebffe5;
  color: #1c7f29;
}

.rs-filter-btn--info.is-active {
  background: #def6ff;
  color: #0e83aa;
}

.rs-filter-btn--closed.is-active {
  background: #ffecea;
  color: #a61f2c;
}

.rs-filter-btn--operational.is-active {
  background: #ffe9ff;
  color: #8e2f8e;
}

.rs-filter-btn--other.is-active {
  background: #f1f5f9;
  color: #475569;
}

/* Category select */
.rs-cat-select.form-select {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #cecece;
  color: #989898;
  font-size: var(--body-small);
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="7" viewBox="0 0 12 7" fill="none"><path d="M5.65375 6.7075L0 1.05375L1.05375 0L5.65375 4.6L10.2537 0L11.3075 1.05375L5.65375 6.7075Z" fill="%231C1B1F"/></svg>');
  background-repeat: no-repeat;
}

.rs-cat-select.form-select:focus {
  border-color: var(--color-primary) !important;
}

.rs-cat-select.form-select.has-val {
  color: var(--color-black);
}

.rs-cat-select.form-select option {
  color: var(--color-black);
}

.rs-cat-select.form-select option[value="all"] {
  color: #989898;
}

/* Apply button — inherits pdop_btn styles */
.rs-apply-btn {
  padding: 10px 54px;
  border-radius: 34px;
  background: var(--color-accent-green);
  color: var(--color-primary);
  font-weight: 600;
  border: none;
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.rs-grid {
  row-gap: 24px;
}

.rs-card {
  position: relative;
  padding: 15px 22px 15px 20px;
  border-radius: 20px;
  border: 1px solid var(--color-gray-100);
  background: var(--color-white);
}

/* Category tag */
.rs-tag-category {
  padding: 2px 7px;
  margin-bottom: 10px;
  border-radius: 3px;
  background: #d0e6f5;
  font-size: 12px;
  font-weight: var(--fw-medium);
  color: var(--color-black);
}

/* ── Per-category tag colours ──────────────────────────────────────── */

.rs-tag-category[data-cat-slug="fields"] {
  background: #d0f5e3;
}

.rs-tag-category[data-cat-slug="rink"] {
  background: #fce4ec;
}

.rs-tag-category[data-cat-slug="courts"] {
  background: #fff3e0;
}

.rs-tag-category[data-cat-slug="gym"] {
  background: #f3e8ff;
}

.rs-tag-category[data-cat-slug="center"] {
  background: #fef9c3;
}

/* Status badge */
.rs-status-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  display: inline-flex;
  padding: 6px 14px 6px 10px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 40px;
  font-size: var(--body-small);
  font-weight: var(--fw-bold);
  line-height: normal;
}

.rs-status-badge--open,
.rs-status-badge--go {
  background: #edfaf3;
  color: #166534;
}
.rs-status-badge--closed {
  background: #ffecea;
  color: #a61f2c;
}

.rs-status-badge--info {
  background: #def6ff;
  color: #0e83aa;
}
.rs-status-badge--operational {
  background: #ffe9ff;
  color: #8e2f8e;
}

.rs-status-badge--other {
  background: #f1f5f9;
  color: #475569;
}

/* Card name */
.rs-card-name {
  font-size: var(--body-medium);
  font-weight: var(--fw-semibold);
  margin-bottom: 6px;
}

/* Detail box */
.rs-card-detail {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #c3e0e2;
  background: #eff9fb;
  color: #4e4e4e;
  font-size: var(--body-small);
  margin-bottom: 12px;
  word-wrap: break-word;
}

.rs-card-detail a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 1px;
}

/* Footer */
.rs-card-ext {
  color: #333;
  font-size: var(--body-small);
  gap: 4px;
}

/* Hidden via JS */
.rs-card-col[aria-hidden="true"] {
  display: none;
}

/* Empty state */
.rs-empty[hidden] {
  display: none;
}
.rs-empty {
  display: block;
}

/* ── Back arrow ──────────────────────────────────────────────────────────── */
.rs-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--color-black);
  flex-shrink: 0;
}

.rs-back-btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================================
   Mobile Filter UI (Slide-up panels)
   ========================================= */

body.rs-modal-open {
  overflow: hidden;
}

.rs-mobile-bar {
  display: none;
}

.rs-mobile-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.rs-mobile-panel[hidden] {
  display: none;
}

.rs-mobile-panel__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rs-mobile-panel.rs-panel--open .rs-mobile-panel__overlay {
  opacity: 1;
}

.rs-mobile-panel__sheet {
  position: relative;
  background: var(--color-white);
  width: 100%;
  height: 85vh;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.1);
}

.rs-mobile-panel.rs-panel--open .rs-mobile-panel__sheet {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .rs-mobile-panel__overlay,
  .rs-mobile-panel__sheet {
    transition: none;
  }
}

.rs-mobile-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-gray-100);
}

.rs-mobile-panel__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
}

.rs-mobile-panel__clear-all {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-family-figtree);
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.rs-mobile-panel__clear-all:disabled,
.rs-mobile-panel__clear-all[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.rs-mobile-panel__body {
  flex: 1;
  min-height: 0;
  display: flex;
  background: var(--color-white);
  padding: 0;
}

/* Two-column layout in panel body */
.sd-mobile-tabs {
  width: 37%;
  display: flex;
  flex-direction: column;
  row-gap: 8px;
  overflow-y: auto;
  border-right: solid 1px var(--color-gray-100);
  padding: 20px 0 20px 16px;
}

.sd-mobile-tab {
  border: none;
  text-align: left;
  font-family: var(--font-family-figtree);
  cursor: pointer;
  transition: background 0.2s;
  background: transparent;
  color: #4e4e4e;
  font-size: 14px;
  line-height: 21px;
  padding-block: 11px;
  padding-inline: 12px 8px;
  border-radius: 4px 0 0 4px;
}

.sd-mobile-tab.active {
  background: #fff3de;
  font-weight: 600;
  color: var(--color-black);
}

.sd-mobile-tab-content {
  width: 63%;
  overflow-y: auto;
  padding: 20px 16px 20px 20px;
  background-color: #ecf0f8;
}

.sd-mobile-tab-pane {
  display: none;
}

.sd-mobile-tab-pane.active {
  display: block;
}

/* Custom radio button styles for type category filter */
.rs-radio-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: #333333;
  font-family: var(--font-family-figtree);
  font-size: 15px;
  line-height: normal;
  padding-block: 6px;
}

.rs-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rs-radio-checkmark {
  flex-shrink: 0;
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1.5px solid #cecece;
  border-radius: 50%;
  background: var(--color-white);
  position: relative;
}

.rs-radio-label input[type="radio"]:checked + .rs-radio-checkmark {
  border-color: var(--color-primary);
}

.rs-radio-label input[type="radio"]:checked + .rs-radio-checkmark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
}

.rs-radio-label input[type="radio"]:focus-visible + .rs-radio-checkmark {
  outline: 3px solid var(--color-primary);
  outline-offset: 1px;
}

.rs-radio-text {
  font-weight: var(--fw-medium);
}

/* Ensure inside panel body, the elements stack nicely */
.rs-mobile-panel__body .rs-filter-inputs {
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch !important;
}

.rs-mobile-panel__body .rs-filter-group {
  width: 100%;
}

.rs-mobile-panel__footer {
  padding: 16px 24px;
  display: flex;
  gap: 12px;
  background: var(--color-white);
  border-top: 1px solid var(--color-gray-100);
}

.rs-mobile-panel__btn {
  flex: 1;
  padding: 12px 18px;
  border-radius: 34px;
  font-family: var(--font-family-figtree);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s;
  border: none;
  line-height: normal;
}

.rs-mobile-panel__btn:hover {
  opacity: 0.9;
}

.rs-mobile-panel__btn--outline {
  background: var(--color-gray-100);
  color: var(--color-primary);
  max-width: 37%;
}

.rs-mobile-panel__btn--fill {
  background: var(--color-accent-green);
  color: var(--color-primary);
  max-width: 63%;
}

.no_results_found_msg h3 {
  margin-block: 16px 10px;
  color: var(--color-black);
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 900;
  text-transform: uppercase;
}

.rainout_content {
  margin-inline: auto;
  /* padding-block: 50px; */
  max-width: 1320px;
}

.rainout_content h4 {
  font-size: var(--h4-2-size);
  font-weight: var(--fw-regular);
  margin-bottom: 14px;
}

.rainout_content ul li {
  margin-bottom: 6px;
}

/* Responsive updates */
@media (max-width: 768px) {
  .rs-card {
    padding-top: 50px;
  }

  .rs-page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .rs-search-wrap {
    min-width: 100%;
  }

  .rs-search.form-control {
    width: 100%;
  }

  .rs-filter-bar {
    display: none !important; /* Hide default sidebar on mobile */
  }

  .rs-mobile-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9998;
    background: var(--color-primary);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 4px 0 rgba(0, 0, 0, 0.06);
  }

  .rs-mobile-bar__btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-white);
    padding: 17.5px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-family-figtree);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
  }

  .rs-mobile-bar__text-wrap {
    position: relative;
    display: flex;
  }

  .rs-mobile-bar__icon-wrap svg {
    width: 18px;
    height: 18px;
  }

  .rs-mobile-bar__badge {
    position: absolute;
    top: 0;
    right: -10px;
    width: 6px;
    height: 6px;
    background: var(--color-secondary);
    border-radius: 50%;
  }

  /* Padding at page bottom so sticky bottom bar doesn't overlap content */
  .rainout-section {
    padding-bottom: 90px;
  }

  #rs-cat-select-container {
    display: none !important;
  }
}

/* ── Pagination Buttons ────────────────────────────────────────────── */
.rs-pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.rs-load-more-btn,
.rs-read-less-btn {
  padding: 12px 40px;
  border-radius: 34px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family-figtree);
}

.rs-load-more-btn {
  background: var(--color-primary, #2b3c73);
  color: var(--color-white, #fff);
}

.rs-load-more-btn:hover {
  background: var(--color-primary-dark, #1c274c);
  /* transform: translateY(-2px); */
  box-shadow: 0 4px 12px rgba(43, 60, 115, 0.2);
}

.rs-read-less-btn {
  background: #eaf1f3;
  color: var(--color-primary, #2b3c73);
  border: 1px solid #cecece;
}

.rs-read-less-btn:hover {
  background: #dce7eb;
  /* transform: translateY(-2px); */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ════════════════════════════════════════════
   Facility Status Embed (shortcode)
   ════════════════════════════════════════════ */
.rs-embed-wrap {
  margin-top: 16px;
}

.rs-embed-wrap .rs-grid {
  row-gap: 24px;
}

.rs-embed-heading {
  font-size: var(--body-large);
  font-weight: var(--fw-bold);
  line-height: 1.4;
}

.rs-embed-notice {
  padding: 16px 20px;
  border-radius: 10px;
  background: #eff9fb;
  border: 1px solid #c3e0e2;
  color: var(--color-secondary-text, #4e4e4e);
  font-size: var(--body-small, 14px);
  line-height: 1.5;
}

/* Split Columns (Cards + Note) */
.rs-embed-columns {
  margin-top: 16px;
}

.rs-embed-right-col .program_note_section {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  height: 100%;
}

@media (max-width: 991px) {
  .rs-embed-right-col {
    margin-top: 24px;
  }
}
