/* Kingsdown Rings — Booking Calendar Styles */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #ffffff;
  color: #6F7551;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Page Header ─────────────────────────── */

.page-header {
  text-align: center;
  padding-top: 40px;
  padding-bottom: 8px;
}

.page-header h1 {
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: #6F7551;
  margin-bottom: 4px;
}

.page-header p {
  font-size: 15px;
  color: #9EA385;
}

/* ── Calendar Container ──────────────────── */

.calendar-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* ── Month Navigation ────────────────────── */

.month-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.month-nav h2 {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #6F7551;
}

.month-nav button {
  background: none;
  border: none;
  color: #9EA385;
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.month-nav button:hover {
  background: rgba(158, 163, 133, 0.1);
}

/* ── Day Headers ─────────────────────────── */

.day-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.day-headers span {
  font-size: 12px;
  text-transform: uppercase;
  color: #9EA385;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ── Calendar Grid ───────────────────────── */

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  background: none;
  color: #6F7551;
}

.day:hover:not(.past):not(.empty):not(.selected) {
  background: rgba(158, 163, 133, 0.1);
}

.day.past {
  color: #ccc;
  cursor: default;
}

.day.unavailable {
  color: #c5c9b8;
  cursor: default;
  position: relative;
}

.day.unavailable:hover {
  background: transparent;
}

.day-x {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  pointer-events: none;
}

.day-x::before,
.day-x::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1.5px;
  background: #9EA385;
  opacity: 0.45;
}

.day-x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.day-x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.day.today {
  font-weight: bold;
  border-color: #9EA385;
}

.day.selected {
  background: #9EA385;
  color: #ffffff;
  border-color: #9EA385;
}

.day.empty {
  cursor: default;
}

/* ── Slots Section ───────────────────────── */

.slots-section {
  margin-top: 28px;
  animation: fadeIn 0.25s ease-out;
}

.slots-section h3 {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: #6F7551;
  margin-bottom: 12px;
}

.slots {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 2px solid #e8eadf;
  border-radius: 300px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-size: 15px;
  color: #6F7551;
}

.slot:hover:not(.unavailable):not(.selected) {
  border-color: #9EA385;
}

.slot.selected {
  background: #9EA385;
  color: #ffffff;
  border-color: #9EA385;
}

.slot.unavailable {
  color: #ccc;
  border-color: #eee;
  text-decoration: line-through;
  cursor: default;
}

/* ── Email Section ───────────────────────── */

.email-section {
  margin-top: 28px;
  animation: fadeIn 0.25s ease-out;
}

.email-input {
  width: 100%;
  padding: 16px 24px;
  border: 2px solid #e8eadf;
  border-radius: 300px;
  font-size: 15px;
  color: #6F7551;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
  margin-bottom: 16px;
}

.email-input:focus {
  border-color: #9EA385;
}

.email-input::placeholder {
  color: #b3b8a0;
}

/* ── Honeypot ────────────────────────────── */

.hp-field {
  position: absolute;
  left: -9999px;
}

/* ── Book Button ─────────────────────────── */

.book-button {
  width: 100%;
  padding: 18px 24px;
  background: #9EA385;
  color: #ffffff;
  border: none;
  border-radius: 300px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.book-button:hover {
  background: #6F7551;
}

.book-button:disabled {
  background: #ccc;
  cursor: default;
}

/* ── Confirmation ────────────────────────── */

.confirmation {
  text-align: center;
  padding: 48px 0;
  animation: fadeIn 0.35s ease-out;
}

.confirmation .tick {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #9EA385;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
}

.confirmation h3 {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  font-size: 24px;
  color: #6F7551;
  margin-bottom: 8px;
}

.confirmation p {
  font-size: 15px;
  color: #9EA385;
}

/* ── Error Message ───────────────────────── */

.error-message {
  background: #fef2f2;
  color: #d9534f;
  padding: 12px 20px;
  border-radius: 12px;
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
}

/* ── Loading ─────────────────────────────── */

.loading {
  text-align: center;
  color: #9EA385;
  padding: 24px 0;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e8eadf;
  border-top-color: #9EA385;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-left: 8px;
}

/* ── Animations ──────────────────────────── */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
