/* ============================================
   my-reservations.css
   Customer dashboard: list of the customer's own
   reservations, each with its current status and,
   when relevant, a way to pay the down payment.
============================================ */

/* Mirrors .topbar-logout-btn's outline look (defined in shared/wizard.css)
   so the two topbar buttons match — kept here instead of in wizard.css
   since this button is specific to this page. */
.topbar-home-btn {
  display: inline-block;
  background: none;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.topbar-home-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.topbar-settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  width: 32px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.topbar-settings-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

/* + New Booking now lives in the header — match the other header controls' size */
.topbar-right .new-booking-btn {
  padding: 7px 16px;
  font-size: 12.5px;
}

.dashboard-wrap {
  max-width: 900px;
  margin: 30px auto 60px;
  padding: 0 20px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.dashboard-header h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 400;
}

.new-booking-btn {
  background-color: #f4652a;
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: 20px 12px 20px 12px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.new-booking-btn:hover { background-color: #d9541c; }

.reservation-card {
  background-color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.reservation-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.reservation-card-date {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
}

.reservation-card-sub {
  font-size: 12.5px;
  color: #8b8577;
  margin-top: 2px;
}

.reservation-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  font-size: 12.5px;
  margin-bottom: 14px;
}

.reservation-card-grid div span {
  display: block;
}

.reservation-card-grid .grid-label { color: #8b8577; margin-bottom: 2px; }
.reservation-card-grid .grid-value { font-weight: 700; }

.reservation-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #f0eee8;
  flex-wrap: wrap;
}

.payment-status-note {
  font-size: 12.5px;
  color: #4a5568;
}

.pay-now-btn {
  background-color: #0b6e7f;
  color: #ffffff;
  border: none;
  padding: 9px 20px;
  border-radius: 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pay-now-btn:hover { background-color: #095766; }

.empty-dashboard {
  text-align: center;
  padding: 60px 20px;
  color: #8b8577;
}

.empty-dashboard p { margin-bottom: 18px; font-size: 13.5px; }

.empty-dashboard .empty-message {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  color: #1c2b3a;
  margin-bottom: 24px;
}

.empty-areas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
}

.empty-area {
  margin: 0;
}

.empty-area img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.empty-area figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1c2b3a;
}

/* Account Settings modal */
.settings-card {
  max-width: 420px;
  text-align: left;
}

.settings-card .confirm-modal-title,
.settings-card .confirm-modal-text {
  text-align: center;
}

.settings-field {
  margin-bottom: 10px;
}

.settings-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #1c2b3a;
  margin-bottom: 5px;
}

.settings-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #c9c5ba;
  font-size: 13px;
  font-family: inherit;
}

.settings-input:focus {
  outline: none;
  border-color: #f4652a;
}

.settings-field .field-error-text {
  margin-top: 4px;
  min-height: 0;
}

.settings-card .form-status {
  margin: 4px 0 12px;
}

@media (max-width: 640px) {
  .reservation-card-grid { grid-template-columns: repeat(2, 1fr); }
  .empty-areas { grid-template-columns: repeat(2, 1fr); }
}


/* ===== "+ New Booking" locked while an active reservation exists ===== */
.new-booking-btn:disabled,
.new-booking-btn[aria-disabled="true"] {
  background-color: #b9b4a8;
  color: #f1efe8;
  cursor: not-allowed;
  opacity: 0.85;
}
.new-booking-btn:disabled:hover { background-color: #b9b4a8; }

.booking-notice {
  background: #fff4e5;
  border: 1px solid #f4c98a;
  color: #7a4a0a;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin: 0 0 16px;
}
.booking-notice[hidden] { display: none; }

/* ===== Settings: read-only account fields ===== */
.settings-input[readonly] {
  background-color: #efede6;
  color: #6b6a64;
  cursor: not-allowed;
  border-color: #dedad0;
}
.settings-input[readonly]:focus { border-color: #dedad0; }

/* ----- Check-out inspection report ----- */
.report-btn {
  background: transparent;
  color: #0b6e7f;
  border: 1.5px solid #0b6e7f;
  border-radius: 14px 9px 14px 9px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.report-btn:hover { background: #0b6e7f; color: #fff; }
.inspection-report-card { max-width: 520px; max-height: 90vh; overflow-y: auto; text-align: left; }
.inspection-report-body { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.report-item { display: flex; gap: 12px; border: 1px solid #e5e1d8; border-radius: 10px; padding: 10px; background: #fbfaf7; }
.report-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; display: block; flex: none; }
.report-item p { margin: 0; font-size: 13px; color: #10202e; white-space: pre-wrap; word-break: break-word; }
.report-note { font-size: 13px; color: #4a5560; margin: 0; }
.report-remarks { font-size: 13px; background: #f4f2ec; border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }

/* ----- Notifications bell + panel ----- */
.notif-wrap { position: relative; display: inline-flex; }
.notif-btn { position: relative; }
.notif-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: #d9271e; color: #fff; font-size: 10.5px; font-weight: 700;
  line-height: 17px; text-align: center; box-sizing: border-box;
}
.notif-badge[hidden], .notif-panel[hidden] { display: none; }
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 340px; max-width: calc(100vw - 32px);
  background: #fff; color: #10202e; border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.28);
  z-index: 3000; overflow: hidden;
}
.notif-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #eee9de; font-size: 13.5px; }
.notif-markall { background: none; border: 0; color: #0b6e7f; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { padding: 11px 14px; border-bottom: 1px solid #f3f0e8; font-size: 13px; line-height: 1.45; cursor: pointer; }
.notif-item.unread { background: #eef7f8; font-weight: 600; }
.notif-item small { display: block; color: #8b8577; font-weight: 400; font-size: 11.5px; margin-top: 3px; }
.notif-empty { padding: 18px 14px; margin: 0; font-size: 13px; color: #8b8577; }

/* ----- Narrow screens: let the header controls wrap instead of overflowing sideways ----- */
@media (max-width: 700px) {
  .topbar { padding: 12px 16px; }
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .topbar-right { flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 100%; }
  .topbar-user { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .notif-panel { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; max-width: none; }
}


/* ----- Pending reservations: contact note + Cancel Reservation ----- */
.pending-contact-note {
  margin: 12px 0 0;
  padding: 9px 12px;
  background: #fff3ec;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #b8470f;
}

/* The number is a tel: link only on touch devices (see contactPhoneHtml in my-reservations.js).
   It keeps the note's colour, is underlined so it reads as tappable, and has a roomy tap area. */
.pending-contact-note .contact-phone-link {
  display: inline-block;
  padding: 12px 2px;
  margin: -12px 0;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  -webkit-tap-highlight-color: rgba(184, 71, 15, 0.18);
}

.pending-contact-note .contact-phone-link:active {
  opacity: 0.7;
}

.cancel-reservation-btn {
  background: transparent;
  color: #d9271e;
  border: 1.5px solid #d9271e;
  padding: 8px 18px;
  border-radius: 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.cancel-reservation-btn:hover { background: #d9271e; color: #ffffff; }

.cancel-confirm-btn { background-color: #d9271e; }
.cancel-confirm-btn:hover:not(:disabled) { background-color: #b81f17; }
.cancel-confirm-btn:disabled { opacity: 0.7; cursor: default; }
#cancelReservationStatus:empty { display: none; }
#cancelReservationStatus { margin: -8px 0 16px; }

/* ----- Facility reports (damaged facility / item reported by the resort) ----- */
.facility-report-card { border: 1px solid #e5e1d8; border-radius: 10px; padding: 12px; background: #fbfaf7; }
.facility-report-card-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.facility-report-card-head strong { font-size: 14px; color: #10202e; }
.facility-report-card-head span { font-size: 11.5px; color: #8b8577; }
.facility-report-card p { margin: 0 0 10px; font-size: 13px; color: #10202e; white-space: pre-wrap; word-break: break-word; }
.facility-report-card-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.facility-report-card-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid #e5e1d8; }
