/* style.css: the <style> blocks of book.php, calendar.php and admin.php, merged.
   Rules that two pages defined differently (or that would leak onto another page's markup) are scoped with the
   body class page-book, page-calendar or page-admin. Everything else is kept as it was. */

/* =========================================================
   Booking form (book.php)
   ========================================================= */
body.page-book {
  background: #ffffff;
  padding-top: 10px;
}

.page-book .container {
  padding: 30px;
  border-radius: 10px;
}

.muted {
  color: #666;
  font-size: 0.9rem;
}

#confirmBtn[disabled] {
  opacity: 0.75;
  cursor: not-allowed;
}

#confirmBtn.is-loading {
  position: relative;
}

#confirmBtn.is-loading::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  /* book.php called this keyframe "spin"; renamed because calendar.php's "spin" differs. */
  animation: book-spin 0.75s linear infinite;
}

.guest-box {
  border: 1px solid #d9e2f2;
  background: #f8fbff;
  border-radius: 10px;
  padding: 12px 14px;
}

@keyframes book-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* =========================================================
   Calendar (calendar.php)
   ========================================================= */
:root { --loader-bg: rgba(0,0,0,0.55); }

body.page-calendar { font-family: Arial, sans-serif; padding-top: 20px; }
#calendar { margin-top: 10px; }

.sticky-right { position: sticky; top: 12px; max-height: calc(100vh - 80px); overflow: auto; }

/* Page reveal */
.page-wrap { opacity: 0; transform: scale(0.985); transition: opacity .35s ease, transform .35s ease; }
.page-wrap.ready { opacity: 1; transform: scale(1); }

.fc-daygrid-day.selected-day { background-color: #e6ccff !important; border-radius: 6px; }
.fc-daygrid-day.selected-day .fc-daygrid-day-number { color: #333 !important; }

/* Booking pills (blue shades set in JS) */
.fc-event {
  border: none !important;
  color: #fff !important;
  border-radius: 6px !important;
  padding: 2px 6px;
  font-size: 0.9em;
  font-weight: bold !important;
}
.fc-daygrid-event-dot { display: none !important; }

/* Closure events extra class */
.closure-event { color: #fff !important; border: 1px solid rgba(153, 27, 27, 0.5) !important; }

/* Special events (site-wide, informational) */
.special-event { color: #fff !important; border: 1px solid rgba(15, 81, 50, 0.5) !important; }

/* Mobile tweaks */
@media (max-width: 576px) {
  #calendar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fc-toolbar-title { font-size: 1.1rem; }
  .fc-header-toolbar { flex-wrap: wrap; }
  .fc-toolbar-chunk { width: 100%; margin-bottom: 0.5rem; }
  .fc-daygrid-day-number { font-size: 0.75rem; }
  .fc-event { font-size: 0.7rem; padding: 1px 3px; font-weight: bold !important; }
  #booking-list li { font-size: 0.9rem; }
  .sticky-right { position: static; max-height: none; overflow: visible; }
}

/* Spinner chip on Refresh */
.spinner {
  display: inline-block; width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; margin-left: .5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Full-page Loader Overlay */
.loader-overlay {
  position: fixed; inset: 0; background: var(--loader-bg);
  display: flex; align-items: center; justify-content: center; z-index: 2000;
  opacity: 1; transition: opacity .35s ease; backdrop-filter: blur(3px);
}
.loader-overlay.hide { opacity: 0; pointer-events: none; }
.loader-box {
  background: #ffffff; color: #000; padding: 18px 20px; border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  transform: translateY(6px); animation: up .35s ease forwards;
}
@keyframes up { to { transform: translateY(0); } }
.loader-ring { width: 26px; height: 26px; border: 3px solid #e5e7eb; border-top-color: #0d6efd; border-radius: 50%; animation: spin 0.9s linear infinite; }
.loader-text { font-weight: 600; letter-spacing: .25px; }

/* =========================================================
   Admin (admin.php)
   ========================================================= */
body.page-admin { background: #fff; }
.page-admin .sidebar { position: sticky; top: 12px; }
.page-admin .section { display: none; }
.page-admin .section.active { display: block; }
.reason-text { font-style: italic; font-size: 0.9rem; color: #666; }
.time-info { font-size: 0.9rem; }
/* Scoped: the calendar's day-details lists also use .list-group-item. */
.page-admin .list-group .list-group-item {
  border: 0; border-radius: .6rem; margin-bottom: .35rem;
  display: flex; align-items: center; gap: .5rem;
  background: #f7f9fc; color: #333; transition: all .15s ease;
}
.page-admin .list-group .list-group-item:hover { background: #eef3ff; transform: translateX(2px); }
.page-admin .list-group .list-group-item.active {
  background: linear-gradient(135deg, #0d6efd, #5aa2ff);
  color: #fff; box-shadow: 0 0 0 .15rem rgba(13,110,253,.2);
}
.page-admin .list-group .list-group-item i { font-size: 1.1rem; opacity: .9; }
.btn-uniform { min-height: 42px; font-size: 0.95rem; padding: .45rem .9rem; }
.btn-standard { min-width: 120px; }
#bookingsChartWrap { height: 260px; }
#bookingsChart { height: 100% !important; }
@media (max-width: 767.98px) { .page-admin .sidebar { position: static; margin-bottom: 1rem; } }
@media (max-width: 576px) {
  .page-admin table td, .page-admin table th { font-size: 0.85rem; padding: 0.3rem; }
  .page-admin .table-responsive { overflow-x: auto; }
}

/* Admin login overlay (new) */
#loginOverlay {
  min-height: calc(100vh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
}
#loginOverlay.d-none { display: none !important; }
#loginOverlay .card { width: 100%; max-width: 380px; }

/* =========================================================
   Shared (new)
   ========================================================= */
.version-badge {
  position: fixed;
  left: 8px;
  bottom: 6px;
  z-index: 1050;
  font-size: 0.72rem;
  color: #8a8f98;
  text-decoration: none;
  background: rgba(255,255,255,0.85);
  padding: 1px 6px;
  border-radius: 6px;
}
.version-badge:hover { color: #555; text-decoration: none; }

#toastHost {
  z-index: 2100; /* above the calendar loader (2000) and Bootstrap modals (1055) */
  max-width: calc(100vw - 16px);
}
#toastHost .toast { max-width: 100%; }

/* =========================================================
   Membership sign-up (signup/membership-signup.html, from the old membership-signup.php)
   ========================================================= */
.page-signup .sig-wrap { border: 1px solid #ced4da; border-radius: .5rem; padding: .75rem; background: #fff; }
.page-signup #sigCanvas { width: 100%; height: 220px; border: 1px dashed #adb5bd; border-radius: .5rem; touch-action: none; }
.page-signup .muted { color:#6c757d; font-size:.92rem; }
.page-signup .readonly-note { font-size: .9rem; color:#6c757d; }
.page-signup .locked-field { background: #f8f9fa; }

/* thank-you block */
.page-signup #thankYouSection { display:none; }
.page-signup .thankyou-card { border: 1px solid #e9ecef; border-radius: .75rem; background:#fff; padding: 1.25rem; }

/* =========================================================
   Membership Interest Form (signup/prospect-form.html, from the old prospect-form.php; framed by the Wix site)
   ========================================================= */
body.page-prospect { background: #fff; }
.page-prospect .card { border-radius: 16px; }
.page-prospect .step { display: none; }
.page-prospect .step.active { display: block; }
.page-prospect .progress { height: 10px; border-radius: 999px; }
.page-prospect .progress-bar { border-radius: 999px; }
.page-prospect .muted { color:#6c757d; }

/* =========================================================
   Membership terms (signup/terms.html, from the old termsandconditions.php)
   ========================================================= */
body.page-terms { background:#fff; }
.page-terms .wrap { max-width: 980px; }
.page-terms .terms { white-space: pre-wrap; line-height: 1.45; }
