/* Shared styles for the booking widgets (single apartment + multi-apartment). */
:root {
  --brand: #225d5c;
  --brand-dark: #1a4a49;
  --brand-light: #ffe8b0;
  --line: #e5e7eb;
  --muted: #6b7280;
  --ok: #48bb78;
  --err: #b91c1c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2937;
  background: #fff;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 16px; }
a { color: var(--brand); }
.center { text-align: center; padding: 40px; color: var(--muted); }

/* Layout */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }

/* Apartment media */
.hero { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; background: #f3f4f6; }
h1 { font-size: 22px; margin: 14px 0 4px; }
h2 { font-size: 17px; margin: 0 0 10px; color: var(--brand); }
.loc { color: var(--muted); font-size: 14px; }
.desc { font-size: 14px; line-height: 1.6; margin-top: 12px; }
.amenities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { background: #f3f4f6; border-radius: 20px; padding: 4px 12px; font-size: 12px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.thumbs img.active { border-color: var(--brand); }

/* Card / form */
.card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 4px 24px rgba(0,0,0,.05); }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; }
input, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 15px; font-family: inherit; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(34,93,92,.15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
button.primary {
  width: 100%; margin-top: 16px; padding: 13px; border: 0; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
button.primary:disabled { opacity: .5; cursor: default; }
.note { font-size: 13px; margin-top: 10px; min-height: 18px; }
.note.err { color: var(--err); }
.note.ok { color: #15803d; }

/* Price summary */
.summary { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.summary .r { display: flex; justify-content: space-between; margin-bottom: 6px; }
.summary .r.promo { color: #15803d; font-weight: 700; }
.summary .total { font-weight: 700; font-size: 16px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; color: var(--brand); }

/* Launch-offer badge (multi-apartment cards) */
.promo-badge {
  display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 20px;
  background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 700;
}

/* ============ Calendar ============ */
.calendar { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calendar-header h3 { margin: 0; font-size: 16px; color: var(--brand); }
.calendar-nav-btn {
  border: 0; background: var(--brand); color: #fff; border-radius: 8px; width: 36px; height: 36px;
  font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.calendar-nav-btn:hover:not(:disabled) { background: var(--brand-dark); }
.calendar-nav-btn:disabled { background: #e5e7eb; color: #9ca3af; cursor: default; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-day-header { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.calendar-day {
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 14px; cursor: pointer; border: 1px solid transparent;
  background: #f8fafc; color: #1f2937; user-select: none;
}
.calendar-day:hover:not(.disabled):not(.booked) { background: var(--brand-light); }
.calendar-day.other-month { background: transparent; cursor: default; }
.calendar-day.disabled { color: #cbd5e1; background: #fff; cursor: not-allowed; }
.calendar-day.today { font-weight: 800; box-shadow: inset 0 0 0 2px rgba(34,93,92,.35); }
.calendar-day.booked {
  background: repeating-linear-gradient(45deg, #fde2e2, #fde2e2 5px, #fecaca 5px, #fecaca 10px);
  color: #9b1c1c; cursor: not-allowed; text-decoration: line-through;
}
.calendar-day.in-range { background: #d6efee; border-color: #b6e0de; }
.calendar-day.selected-start, .calendar-day.selected-end {
  background: var(--brand); color: #fff; font-weight: 700; border-color: var(--brand);
}
.calendar-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.calendar-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.calendar-legend-box { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend-free { background: #f8fafc; border: 1px solid var(--line); }
.legend-booked { background: repeating-linear-gradient(45deg, #fde2e2, #fde2e2 4px, #fecaca 4px, #fecaca 8px); }
.legend-sel { background: var(--brand); }
.legend-range { background: #d6efee; }
.selected-dates {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px 12px; background: #f8fafc; border-radius: 10px; font-size: 14px;
}
.btn-clear { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 13px; }

/* ============ Multi-apartment results ============ */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.apt-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,.05); display: flex; flex-direction: column; }
.apt-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #f3f4f6; display: block; }
.apt-card .body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.apt-card .t { font-weight: 700; }
.apt-card .l { color: var(--muted); font-size: 13px; margin-top: 2px; }
.apt-card .p { color: var(--brand); font-weight: 700; margin-top: 8px; }
.apt-card .sub { color: var(--muted); font-size: 12px; }
.apt-card .spacer { flex: 1; }
.apt-card button { margin-top: 12px; width: 100%; padding: 10px; border: 0; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; }
.apt-card.unavailable { opacity: .6; }
.apt-card .unavail { color: var(--err); font-size: 13px; margin-top: 8px; font-weight: 600; }
.searchbar { border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: 0 4px 24px rgba(0,0,0,.05); }
