/* Hall list + hall booking calendar (docs/fe_docs/halls.md). Uses the rl-* tokens from style.css. */

/* ── Hall list ── */
/* First block under the fixed header (no breadcrumb/hero) - clear --nav-h (topbar + bar). */
/* body.rl-landing prefix: must beat stylstav.css "body.rl-landing .rl-section". */
body.rl-landing .rl-section.rl-halls { padding-top: calc(var(--nav-h) + var(--sp-12)); }
.rl-halls__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-6);
}
.rl-halls__grid .rl-product-card { display: flex; flex-direction: column; }
.rl-halls__grid .rl-product-card__media { aspect-ratio: 4 / 3; }
.rl-halls__body { padding: var(--sp-4) var(--sp-5); flex: 1; display: flex; flex-direction: column; gap: var(--sp-3); }
.rl-halls__preview { margin: 0; color: var(--c-muted); font-size: var(--text-sm); }
.rl-halls__body .rl-product-card__price-row { margin-top: auto; }
.rl-halls__empty { color: var(--c-muted); }

/* ── Month calendar ── */
.rl-hall-cal { margin-top: var(--sp-6); }
.rl-hall-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.rl-hall-cal__nav .rl-cal__month-name { margin: 0; text-align: center; flex: 1; }
.rl-hall-cal__arrow {
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid var(--c-beige);
  border-radius: var(--r-md);
  background: var(--c-white);
  color: var(--c-forest);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.rl-hall-cal__arrow:hover:not(:disabled) { border-color: var(--c-olive); color: var(--c-olive); }
.rl-hall-cal__arrow:disabled { opacity: 0.35; cursor: default; }

.rl-hall-cal__days { margin-bottom: var(--sp-4); }
.rl-hall-day {
  min-height: 56px;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}
.rl-hall-day::after {
  content: "";
  width: 100%;
  height: 4px;
  border-radius: var(--r-sm);
  background: transparent;
}
.rl-hall-day.is-free::after    { background: #2E8B57; }
.rl-hall-day.is-partial::after { background: var(--c-gold); }
.rl-hall-day.is-full::after    { background: var(--c-danger); }
.rl-hall-day.is-closed,
.rl-hall-day.is-past { cursor: default; }
.rl-hall-day.is-past { background: var(--c-ivory); }
.rl-hall-day.is-past .rl-cal__day-num,
.rl-hall-day.is-closed .rl-cal__day-num { color: var(--c-light); }
.rl-hall-day.is-closed { background: rgba(163,55,43,0.06); border-color: rgba(163,55,43,0.18); }
.rl-hall-day.is-maintenance {
  background: repeating-linear-gradient(135deg, rgba(242,165,22,0.14) 0 6px, rgba(242,165,22,0.04) 6px 12px);
  border-color: rgba(242,165,22,0.45);
}
.rl-hall-day.is-maintenance .rl-cal__day-num { color: var(--c-muted); }
.rl-hall-day:not(:disabled):hover { border-color: var(--c-olive); }
.rl-hall-day.is-selected { border-color: var(--c-accent); box-shadow: 0 0 0 2px var(--c-accent); }
.rl-hall-day:focus-visible,
.rl-hall-slot:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* ── Legend ── */
.rl-hall-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  font-size: var(--text-xs);
  color: var(--c-muted);
}
.rl-hall-legend li { display: flex; align-items: center; gap: var(--sp-2); }
.rl-hall-legend__dot { width: 0.75rem; height: 0.75rem; border-radius: var(--r-sm); }
.rl-hall-legend__dot.is-free    { background: #2E8B57; }
.rl-hall-legend__dot.is-partial { background: var(--c-gold); }
.rl-hall-legend__dot.is-full    { background: var(--c-danger); }
.rl-hall-legend__dot.is-closed  { background: rgba(163,55,43,0.18); }
.rl-hall-legend__dot.is-maintenance { background: repeating-linear-gradient(135deg, rgba(242,165,22,0.6) 0 3px, rgba(242,165,22,0.2) 3px 6px); }

/* ── Maintenance notice (hall page, hall card, day panel) ── */
.rl-hall-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  margin: var(--sp-4) 0 0;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid rgba(242,165,22,0.45);
  border-left-width: 4px;
  border-radius: var(--r-md);
  background: rgba(242,165,22,0.1);
  color: var(--c-charcoal);
  font-size: var(--text-sm);
}
.rl-hall-notice .fa { color: var(--c-gold); margin-top: 0.2em; }
.rl-hall-notice--sm { margin: 0; padding: var(--sp-2) var(--sp-3); font-size: var(--text-xs); }

/* ── Day slots ── */
.rl-hall-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.rl-hall-slots__empty { grid-column: 1 / -1; margin: 0; color: var(--c-muted); font-size: var(--text-sm); }
.rl-hall-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--sp-2) var(--sp-3);
  border: 1.5px solid var(--c-beige);
  border-radius: var(--r-md);
  background: var(--c-white);
  color: var(--c-charcoal);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.rl-hall-slot.is-free:hover { border-color: var(--c-olive); color: var(--c-olive); }
.rl-hall-slot.is-selected { background: var(--c-olive); border-color: var(--c-olive); color: var(--c-white); }
.rl-hall-slot.is-booked,
.rl-hall-slot.is-past { background: var(--c-ivory); color: var(--c-light); cursor: default; }
.rl-hall-slot.is-in_cart { background: var(--c-sage-bg); border-color: var(--c-sage-light); color: var(--c-olive); cursor: default; }
.rl-hall-slot__tag { font-size: var(--text-2xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }

.rl-hall-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }

@media (max-width: 575.98px) {
  .rl-hall-day { min-height: 44px; padding: var(--sp-1); }
  .rl-hall-cal__days { gap: 4px; }
  .rl-hall-slots { grid-template-columns: repeat(2, 1fr); }
}
