:root {
  --primary-color: #1f7a8c;
  --secondary-color: #04364a;
  --light-bg: #eaf4f8;
  --accent-color: #2ec4b6;
  --text-color: #ffffff;
  --dark-text: #102a43;
  --border-color: #cfdfe6;
  --disabled-color: #dfe7eb;
}

/* --- RESET EVERYTHING --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- PAGE LAYOUT --- */
body {
  font-family: "Segoe UI", Roboto, sans-serif;
  background-color: var(--primary-color);
  color: var(--text-color);
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  width: 100%;
}

/* --- FORM CONTAINER - BRUTE FORCE CENTER --- */
#form-wrapper {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* HEADINGS */
h1.clinic-name {
  font-size: 1.9rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 5px;
  width: 100%;
}

h2 {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  width: 100%;
}

/* --- FORM --- */
form {
  width: 100%;
  background: var(--secondary-color);
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
}

/* Rest of your existing CSS stays the same from here... */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color);
}

input,
select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  background: var(--light-bg);
  color: var(--dark-text);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
}

button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 12px;
  font-size: 16px;
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 15px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #1db3a2;
}

.calendar-section {
  background: var(--light-bg);
  padding: 18px;
  border-radius: 14px;
  margin-top: 18px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.15);
}

.calendar-section label {
  color: var(--secondary-color);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.calendar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--accent-color);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  margin-bottom: 12px;
  gap: 12px;
}

.calendar-header span {
  font-size: 1rem;
  font-weight: 700;
}

.nav-btn {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  background-color: var(--secondary-color);
}

.calendar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: var(--light-bg);
  border-radius: 8px;
  padding: 10px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 4px;
  font-size: 14px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day {
  text-align: center;
  padding: 10px 0;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: #fff;
  color: var(--dark-text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 42px;
}

.calendar-day:hover {
  background-color: var(--accent-color);
  color: white;
}

.calendar-day.selected {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  border-color: var(--primary-color);
}

.calendar-day.today {
  border: 2px solid var(--accent-color);
  font-weight: 700;
  background-color: #ffffff;
  color: var(--primary-color);
  box-shadow: 0 0 6px rgba(46, 196, 182, 0.4);
}

.calendar-day.disabled {
  background-color: var(--disabled-color);
  color: #999;
  cursor: not-allowed;
  pointer-events: none;
}

.time-slot-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.time-slot-container button {
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: white;
  border-radius: 6px;
  padding: 10px 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.time-slot-container button:hover {
  background-color: var(--accent-color);
}

.time-slot-container button.selected {
  background-color: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

#loader,
#response {
  text-align: center;
  margin-top: 12px;
  font-size: 15px;
}

.hidden {
  display: none;
}


/* --- FOOTER --- */
.app-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 300;
  color: #e0dfdf;
}

.app-footer a {
  text-decoration: none;
  color: #4caf93;
  font-weight: 400;
}

.app-footer a:hover {
  text-decoration: underline;
  color: #87e0c7;
}


/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 600px) {
  body {
    padding: 15px;
  }
  
  h1.clinic-name {
    font-size: 1.6rem; /* Smaller font for mobile */
    line-height: 1.3; /* Better spacing when it wraps */
  }
  
  form {
    padding: 20px;
  }

  .calendar-day {
    font-size: 13px;
    height: 36px;
  }

  .time-slot-container {
    grid-template-columns: repeat(3, 1fr);
  }

  button {
    font-size: 15px;
  }
}


.calendar-day.public-holiday {
  background-color: #ffdddd !important;
  color: #b30000 !important;
  border: 1px solid #ffaaaa;
  cursor: pointer; /* allow clicking */
  pointer-events: auto; /* enable tap/click */
}

.calendar-day.public-holiday:hover {
  background-color: #ffcccc;
}

