body {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  background: #f0f2f5;
  margin: 0;
  padding: 0;
}

header {
  position: relative;
  width: 100%;
  height: 800px;
  background-image: url("Images/Chalet 28.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

/* ---- Page wrapper ---- */
.availability {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.availability h6 {
  font-size: 13px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 32px 0 16px;
}

/* ---- Card ---- */
.avail-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

/* ---- Month navigation ---- */
.avail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.avail-nav-btn {
  background: #f0f2f5;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 18px;
  color: #555;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
  line-height: 1;
}
.avail-nav-btn:hover { background: #e0e4ea; }

.avail-nav-title {
  font-size: 17px;
  font-weight: 600;
  color: #333;
}

/* ---- Legend ---- */
.avail-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.avail-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #666;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.avail-swatch-available { background: #d4edda; border: 1px solid #a3cfac; }
.avail-swatch-occupied  { background: #f8d7da; border: 1px solid #f1aab0; }
.avail-swatch-selected  { background: #307ea0; border: 1px solid #255f7a; }

/* ---- Two-month layout ---- */
.avail-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.avail-month-title {
  font-size: 14px;
  font-weight: 600;
  color: #307ea0;
  text-align: center;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Calendar grid ---- */
.avail-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.avail-cal-weekday {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #aaa;
  padding: 4px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.avail-cal-day {
  border-radius: 7px;
  padding: 7px 3px 5px;
  text-align: center;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.1s, box-shadow 0.1s;
  position: relative;
}

.avail-empty { background: transparent; }

.avail-cal-day.past {
  background: #eeeeee;
  color: #ccc;
}

.avail-cal-day.not-set {
  background: #f8f8f8;
  border: 1px dashed #e0e0e0;
  color: #ccc;
}

.avail-cal-day.occupied {
  background: #f8d7da;
  border: 1px solid #f1aab0;
}

.avail-cal-day.available {
  background: #d4edda;
  border: 1px solid #a3cfac;
}

.avail-cal-day.selectable {
  cursor: pointer;
}

.avail-cal-day.selectable:hover {
  transform: scale(1.06);
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  z-index: 1;
}

.avail-cal-day.selected {
  background: #307ea0 !important;
  border: 1px solid #255f7a !important;
}

.avail-cal-day.today .avail-cal-num {
  text-decoration: underline;
}

.avail-cal-num {
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  margin-bottom: 3px;
}

.avail-cal-price {
  font-size: 9px;
  line-height: 1;
}

/* Day number colors */
.avail-cal-day.past      .avail-cal-num   { color: #ccc; }
.avail-cal-day.not-set   .avail-cal-num   { color: #ccc; }
.avail-cal-day.occupied  .avail-cal-num   { color: #721c24; }
.avail-cal-day.occupied  .avail-cal-price { color: #a03030; font-size: 8px; }
.avail-cal-day.available .avail-cal-num   { color: #155724; }
.avail-cal-day.available .avail-cal-price { color: #2a7a3b; }
.avail-cal-day.selected  .avail-cal-num   { color: white; }
.avail-cal-day.selected  .avail-cal-price { color: rgba(255,255,255,0.85); }

.avail-loading {
  grid-column: 1 / -1;
  padding: 20px 0;
  color: #aaa;
  font-size: 13px;
  text-align: center;
}

/* ---- Summary card ---- */
.avail-summary-card {
  background: white;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
}

.avail-summary-item {
  flex: 1;
  min-width: 180px;
  padding: 8px 16px;
  border-right: 1px solid #f0f0f0;
}
.avail-summary-item:last-child { border-right: none; }

.avail-summary-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.avail-summary-value {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.avail-summary-total {
  color: #307ea0;
  font-size: 17px;
  font-weight: 700;
}

/* ---- Booking form ---- */
.booking-form-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  max-width: 980px;
  margin: 0 auto 40px;
}

.booking-form-container h6 {
  font-size: 13px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 16px;
}

.booking-preview {
  background: #f7f9fc;
  border: 1px solid #dde3ed;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
}

.booking-preview-item {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  padding: 6px 12px;
  border-right: 1px solid #e8edf5;
}
.booking-preview-item:last-child { border-right: none; }

.booking-preview-item span {
  font-size: 11px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.booking-preview-item strong {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.booking-form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: "Roboto", sans-serif;
  background: #fafafa;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #307ea0;
  background: white;
}

.form-group textarea { resize: vertical; }

.booking-submit-btn {
  background-color: #307ea0;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-size: 15px;
  font-family: "Roboto", sans-serif;
  cursor: pointer;
  margin-top: 18px;
  width: 100%;
}
.booking-submit-btn:hover    { background-color: #255f7a; }
.booking-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.booking-msg {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 12px;
}
.booking-msg.success { background: #eaf7ed; color: #2a7a3b; border: 1px solid #b2dfbb; }
.booking-msg.error   { background: #fdf0f0; color: #a03030; border: 1px solid #f0b8b8; }

/* ---- Responsive ---- */
@media screen and (max-width: 920px) {
  header { height: 520px; }
  .availability { padding: 0 14px 32px; }

  .avail-months {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .avail-summary-item { min-width: 140px; }
}

@media screen and (max-width: 540px) {
  header { height: 360px; }

  .avail-card { padding: 16px 12px; }
  .avail-legend { gap: 12px; }

  .avail-cal-day { min-height: 44px; padding: 5px 2px 4px; }
  .avail-cal-num { font-size: 12px; }
  .avail-cal-price { display: none; }

  .avail-summary-card { flex-direction: column; }
  .avail-summary-item { border-right: none; border-bottom: 1px solid #f0f0f0; }
  .avail-summary-item:last-child { border-bottom: none; }

  .booking-form-fields { grid-template-columns: 1fr; }
  .booking-preview { flex-direction: column; }
  .booking-preview-item { border-right: none; border-bottom: 1px solid #e8edf5; }
  .booking-preview-item:last-child { border-bottom: none; }
}
