/* =====================================================================
 * public/assets/css/booking.css
 *
 * Styles for p/book.php only, loaded by partials/nav.php when
 * $navActive === 'book'. Everything is scoped under .bk- so it cannot
 * collide with the shared marketing-site stylesheets.
 * ===================================================================== */

.bk-search {
  background: var(--parchment-flat, #faf7f0);
  border: 1px solid rgba(27, 42, 91, 0.10);
  border-radius: 14px;
  padding: 18px;
  margin: 22px 0 0;
}

.bk-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bk-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bk-field {
  display: block;
}

.bk-field-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft, #6b7280);
  margin-bottom: 6px;
  font-weight: 600;
}

.bk-field input,
.bk-field select,
.bk-field textarea {
  width: 100%;
  padding: 12px 12px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(27, 42, 91, 0.18);
  background: #fff;
  color: inherit;
  /* 16px on iOS stops Safari zooming the viewport on focus. */
  min-height: 46px;
}

.bk-field textarea {
  min-height: 84px;
  resize: vertical;
}

.bk-field input:focus,
.bk-field select:focus,
.bk-field textarea:focus {
  outline: 2px solid rgba(109, 79, 194, 0.55);
  outline-offset: 1px;
  border-color: rgba(109, 79, 194, 0.55);
}

.bk-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.bk-status {
  margin-top: 14px;
  font-size: 0.92rem;
  min-height: 1.2em;
}

.bk-status.is-error { color: #a6342a; }
.bk-status.is-busy  { color: var(--ink-soft, #6b7280); }

/* ------------------------------------------------------------ results */

.bk-results {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.bk-room {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(27, 42, 91, 0.10);
  border-radius: 14px;
  padding: 16px;
}

.bk-room-media {
  flex: 0 0 108px;
  width: 108px;
  height: 82px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f3f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa3b2;
  font-size: 0.72rem;
  text-align: center;
}

.bk-room-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bk-room-body {
  flex: 1 1 auto;
  min-width: 0;
}

.bk-room-name {
  margin: 0 0 4px;
  font-size: 1.06rem;
  font-weight: 700;
}

.bk-room-desc {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--ink-soft, #6b7280);
}

.bk-room-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 12px;
}

.bk-rate {
  font-size: 0.88rem;
  color: var(--ink-soft, #6b7280);
}

.bk-total {
  font-size: 1.12rem;
  font-weight: 700;
  color: #1B2A5B;
}

.bk-total small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft, #6b7280);
}

/* Availability is stated plainly rather than left for the guest to infer
   from a missing button. */
.bk-availability {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.bk-availability.is-open {
  background: rgba(63, 164, 91, 0.12);
  color: #2c7a44;
}

.bk-availability.is-full {
  background: rgba(166, 52, 42, 0.10);
  color: #a6342a;
}

/* Unavailable rooms stay on the page, greyed out: hiding them would just
   look like a broken page when a guest cannot find the room type they saw
   on rooms.php. */
.bk-room.is-unavailable {
  opacity: 0.62;
  background: #f7f8fa;
}

.bk-room.is-unavailable .bk-total {
  color: var(--ink-soft, #6b7280);
}

.bk-btn {
  width: 100%;
  justify-content: center;
  min-height: 46px;
}

.bk-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --------------------------------------------------------- empty / done */

.bk-empty {
  border: 1px dashed rgba(27, 42, 91, 0.20);
  border-radius: 14px;
  padding: 26px 18px;
  text-align: center;
  color: var(--ink-soft, #6b7280);
}

.bk-done {
  background: rgba(63, 164, 91, 0.08);
  border: 1px solid rgba(63, 164, 91, 0.32);
  border-radius: 14px;
  padding: 22px 18px;
}

.bk-done h3 {
  margin: 0 0 8px;
  font-size: 1.14rem;
}

.bk-done p {
  margin: 0 0 16px;
  color: var(--ink-soft, #6b7280);
}

/* ------------------------------------------------------------- mobile */

@media (max-width: 720px) {
  .bk-grid,
  .bk-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Adults and children sit side by side; the date pair stacks, because
     two date inputs on one narrow row are too cramped to hit reliably. */
  .bk-field--wide {
    grid-column: 1 / -1;
  }

  .bk-room {
    flex-direction: column;
  }

  .bk-room-media {
    flex: 0 0 auto;
    width: 100%;
    height: 150px;
  }
}

@media (max-width: 420px) {
  .bk-grid,
  .bk-grid--three {
    grid-template-columns: minmax(0, 1fr);
  }
}
