/* ===========================
   DateTime • Premium Dark + Gold (Mobile-first)
   =========================== */

/* ---- Base ---- */
* { box-sizing: border-box; }
:root {
  /* Calendar cell size scales with viewport, but capped */
  --cell: clamp(34px, 9vw, 46px);
  --gap: 10px;
}

body {
  background-color: #1f1f1f;
  color: #fff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 12px; /* reduced on mobile */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;

  /* soften heavy effects on mobile to avoid jank */
  background-image:
    radial-gradient(900px 400px at 20% -10%, rgba(245,179,1,0.10), transparent 60%),
    radial-gradient(800px 360px at 110% 0%, rgba(255,152,0,0.08), transparent 65%),
    linear-gradient(#1f1f1f, #1f1f1f);
  background-attachment: scroll;
}

.outer-container {
  background-color: #2a2a2a;
  padding: 16px;          /* tighter on mobile */
  border-radius: 14px;
  box-shadow: 0 4px 22px rgba(0,0,0,0.45);
  max-width: 800px;
  margin: 20px auto;
  width: 100%;
}

/* ---- Header ---- */
.headline {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}
.subline {
  font-size: 0.92rem;
  color: #ccc;
  text-align: center;
}

/* ---- Month Navigation ---- */
.calendar-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 14px 0;
  gap: 8px;
}

.nav-btn {
  background-color: #2a2a2a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
}
.nav-btn:hover { background-color: #3a3a3a; box-shadow: 0 0 8px rgba(245,179,1,0.4); }

.month-year {
  font-weight: bold;
  font-size: 1rem;
}

/* ---- Calendar ---- */
.calendar {
  background-color: #f5f5f5;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--gap);
  justify-items: center;
  border: 2px solid #ddd;
}

.day-header {
  font-weight: 700;
  font-size: 0.9rem;
  color: #333;
  text-align: center;
  padding: 8px 0;
}

.calendar-day {
  width: var(--cell);
  height: var(--cell);
  background-color: #ffffff;
  border: 2px solid #0066cc;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #000000;
  font-weight: 700;
  font-size: clamp(14px, 3.5vw, 18px);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  touch-action: manipulation;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.calendar-day:hover:not(.disabled):not(.inactive) {
  background-color: #e6f2ff;
  border-color: #0052a3;
  box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
  transform: scale(1.08);
}
.calendar-day.disabled {
  background-color: #e8e8e8;
  border-color: #ccc;
  color: #999;
  opacity: 0.6;
  cursor: not-allowed;
}
.calendar-day.inactive {
  background-color: #e8e8e8;
  border-color: #ccc;
  color: #999;
  opacity: 0.4;
  cursor: default;
}
.calendar-day.selected {
  background-color: #0066cc;
  border-color: #004499;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

/* ---- Time Slots ---- */
.timeslots h2 {
  text-align: left;
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 12px;
  color: #333;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.slot-btn {
  background-color: #ffffff !important;
  color: #0066cc !important;
  padding: 14px 16px !important;
  border-radius: 8px !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border: 2px solid #0066cc !important;
  min-height: 50px !important;
  transition: all 0.2s ease !important;
  touch-action: manipulation !important;
  width: 100% !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}
.slot-btn:hover { 
  background-color: #e6f2ff !important;
  border-color: #0052a3 !important;
  box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3) !important;
  transform: translateY(-2px) !important;
}
.slot-btn.selected { 
  background-color: #0066cc !important;
  color: #ffffff !important;
  border-color: #004499 !important;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4) !important;
  transform: translateY(-2px) !important;
}
.slot-btn.limited { background-color: #fff3cd !important; border-color: #ff9800 !important; color: #856404 !important; }
.slot-btn.full { background-color: #f8d7da !important; border-color: #dc3545 !important; color: #721c24 !important; cursor: not-allowed !important; opacity: 0.7 !important; }

/* ---- Reserve Button ---- */
.reserve-btn {
  display: block;
  margin: 18px auto 0;
  padding: 12px 20px;
  font-size: 1rem;
  background: linear-gradient(90deg, #f5b301, #ff9800);
  border: none;
  color: black;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;                     /* full-width on mobile */
  max-width: 520px;                /* but not too wide on large screens */
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  touch-action: manipulation;
}
.reserve-btn:hover { transform: scale(1.02); box-shadow: 0 0 14px rgba(245, 179, 1, 0.6); }

/* ===========================
   Responsive Tweaks
   =========================== */
@media (min-width: 768px) {
  body { padding: 20px; background-attachment: fixed; }
  .outer-container { padding: 24px; margin: 40px auto; }
  .headline { font-size: 1.6rem; }
  .month-year { font-size: 1.05rem; }
  .reserve-btn { width: auto; padding: 12px 40px; }
}

@media (max-width: 420px) {
  :root { --cell: clamp(30px, 9vw, 40px); --gap: 8px; }
  .outer-container { padding: 14px; }
  .calendar { padding: 10px; }
  .slots-grid { grid-template-columns: 1fr 1fr; } /* tight phones: 2 per row */
}

/* Optional: keep CTA visible when content scrolls on small screens */
@supports (position: sticky) {
  .reserve-btn.sticky {
    position: sticky;
    bottom: 12px;
    z-index: 5;
  }
}
