:root {
  --brand-orange: #C4641E;
  --available-bg: #28a745;
  --available-text: #ffffff;
  --unavailable-bg: #dc3545;
  --unavailable-text: #ffffff;
  --holiday-bg: #0d9488;
  --holiday-text: #ffffff;
  --modal-font: "Kelly Slab", "Segoe UI", Arial, sans-serif;
}

@import url("https://fonts.googleapis.com/css2?family=Kelly+Slab&display=swap");

/* Base */
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #000;
}
.container {
  padding: 1rem;
  text-align: center;
}

/* Calendar Wrapper */
.calendar-wrapper {
  width: calc(100% - 160px);
  margin: 60px auto;
  box-sizing: border-box;
  position: relative;
  padding-top: 12px;
}
@media (max-width:768px) {
  .calendar-wrapper {
    width: calc(100% - 30px);
    margin: 20px auto;
  }
}

/* Home button */
.back-button,
.calendar-wrapper .back-button {
  position: absolute;
  top: 22px;
  left: 30px;
  z-index: 120000;
}
.back-button a,
.calendar-wrapper .back-button a {
  font-family: var(--modal-font);
  background: var(--brand-orange);
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  z-index: 99999 !important;
}
.modal.show {
  display: block;
}
.modal-content {
  background: var(--brand-orange);
  color: #000;
  width: 92%;
  max-width: 920px;
  margin: 4% auto;
  padding: 1.5rem;
  border-radius: 10px;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  font-family: var(--modal-font);
  z-index: 100000 !important;
}
.close-btn {
  position: absolute;
  top: 30px;
  right: 34px;
  font-size: 30px;
  color: #000;
  cursor: pointer;
  font-weight: 700;
  background: transparent;
  border: 0;
  padding: 0;
}
.modal .logo {
  display: block;
  margin: 0 auto 12px;
  max-width: 350px;
  width: 100%;
  height: auto;
}

/* Booking Form */
#booking-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}
#booking-form > fieldset,
#booking-form > .message-field,
#booking-form > button {
  grid-column: 1 / -1;
}
#booking-form > label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 0.95rem;
  color: #000;
  font-family: var(--modal-font);
}
#booking-form > label:nth-of-type(1) { grid-column: 1; }
#booking-form > label:nth-of-type(2) { grid-column: 2; }
#booking-form > label:nth-of-type(3) { grid-column: 1; }
#booking-form > label:nth-of-type(4) { grid-column: 2; }
#booking-form input,
#booking-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #666;
  font-size: 0.95rem;
}
.message-field textarea {
  min-height: 140px;
  resize: vertical;
  padding: 12px;
}

/* Services Grid */
fieldset {
  text-align: center;
  margin-top: 6px;
}
fieldset legend {
  font-weight: 700;
  margin-bottom: 8px;
  font-family: var(--modal-font);
  font-size: 1.05rem;
  text-align: center;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px 40px;
  max-width: 820px;
  margin: 0 auto;
  justify-items: center;
  position: relative;
  padding: 8px 0;
  box-sizing: border-box;
}
.services-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6%;
  height: 88%;
  width: 2px;
  background: rgba(0, 0, 0, 0.08);
  transform: translateX(-50%);
  border-radius: 2px;
  pointer-events: none;
}
.services-grid label {
  display: grid !important;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: center;
  justify-items: start;
  width: 100% !important;
  max-width: 460px;
  padding: 6px 8px;
  font-family: var(--modal-font);
  font-size: 1rem;
  color: #000;
  text-transform: none;
  line-height: 1.15;
}
.services-grid input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  justify-self: center;
  align-self: center;
  accent-color: var(--brand-orange);
  border-radius: 4px;
}
.services-grid label .svc-text {
  display: block;
  width: 100%;
  text-align: left;
}

/* Responsive Form */
@media (max-width:720px) {
  #booking-form {
    grid-template-columns: 1fr;
  }
  #booking-form > label:nth-of-type(1),
  #booking-form > label:nth-of-type(2),
  #booking-form > label:nth-of-type(3),
  #booking-form > label:nth-of-type(4) {
    grid-column: 1 / -1;
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 4px 0;
  }
  .services-grid::before {
    display: none;
  }
  .services-grid label {
    max-width: 100%;
    justify-self: center;
  }
}

/* Button */
#booking-form button {
  padding: 10px;
  background: #000;
  color: #fff;
  border-radius: 8px;
  border: 0;
  font-weight: 700;
}

/* Calendar Layout */
.fc .fc-toolbar-title {
  text-align: center !important;
  margin: 0 auto;
  font-size: 1.2rem;
}
.fc-daygrid-day {
  position: relative;
  min-height: 72px;
  box-sizing: border-box;
  border-radius: 8px;
  margin: 6px;
}
.fc-daygrid-day::after {
  z-index: 3;
  pointer-events: none;
  font-size: 1rem;
}

/* Available */
.fc-daygrid-day.fc-available-day,
.fc-daygrid-day.fc-on-day {
  background: var(--available-bg) !important;
  border: 2px solid #1f7a30 !important;
  color: var(--available-text) !important;
  position: relative;
}
.fc-daygrid-day.fc-available-day::after,
.fc-daygrid-day.fc-on-day::after {
  content: "AVAILABLE";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--available-text);
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

/* Unavailable */
.fc-daygrid-day.fc-disabled-day,
.fc-daygrid-day.fc-offday {
  background: var(--unavailable-bg) !important;
  border: 2px solid #8f1f1f !important;
  color: var(--unavailable-text) !important;
}
.fc-daygrid-day.fc-disabled-day::after,
.fc-daygrid-day.fc-offday::after {
  content: "UNAVAILABLE";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--unavailable-text);
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

/* Holidays */
.fc-daygrid-day.fc-holiday-day {
  background: var(--holiday-bg) !important;
  border: 2px solid #0a6f64 !important;
  color: var(--holiday-text) !important;
}
.fc-daygrid-day.fc-holiday-day::after {
  content: "HOLIDAY" "\A" "AVAILABLE";
  white-space: pre;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--holiday-text);
  font-weight: 700;
  text-align: center;
}

/* Past */
.fc-daygrid-day.fc-day-past {
  background: #efefef !important;
  border: 2px solid #ddd !important;
  color: #666 !important;
  pointer-events: none;
}
.fc-daygrid-day.fc-day-past::before {
  content: "✕";
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  font-size: 3.2rem;
  color: rgba(0, 0, 0, 0.08);
  z-index: 1;
  pointer-events: none;
}
.fc-daygrid-day.fc-day-past::after {
  content: "";
}

/* Other-Month Days */
.fc-daygrid-day.fc-day-other .fc-daygrid-day-number,
.fc-daygrid-day.fc-day-other .fc-day-number {
  opacity: 0;
}
.hh-noncurrent {
  opacity: 0.45 !important;
  pointer-events: none !important;
}
