/* Meninhouse — client site styles. Mobile-first, plain CSS, no framework. */

:root {
  --color-bg: #faf7f2;
  --color-surface: #ffffff;
  --color-text: #2b2620;
  --color-muted: #756c60;
  --color-border: #e4ddd1;
  --color-primary: #3f6b4a;
  --color-primary-dark: #2f5138;
  --color-accent: #c98a3a;
  --color-error-bg: #fbe9e7;
  --color-error-text: #8a2f1f;
  --color-info-bg: #eaf2ec;
  --color-info-text: #2f5138;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: var(--color-primary-dark); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-instagram {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 42px;
  width: 42px;
  border-radius: 10px;
  display: block;
}

.site-nav a {
  margin-left: 14px;
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--color-text);
}

.site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 32px;
  padding: 20px 16px 40px;
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
}

.footer-note {
  font-style: italic;
  font-size: 0.85rem;
}

h1 { font-size: 1.5rem; margin: 0 0 12px; }
h2 { font-size: 1.2rem; margin: 24px 0 10px; }
h3 { font-size: 1.05rem; margin: 16px 0 8px; }

.intro { margin-bottom: 20px; }
.intro p { color: var(--color-muted); }

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  text-decoration: none;
  font-size: 0.9rem;
}

/* Home grid */
.units-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .units-grid { grid-template-columns: 1fr 1fr; }
}

.unit-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.unit-card-link {
  display: block;
  text-decoration: none;
  color: var(--color-text);
}

.unit-card-book-btn {
  display: block;
  margin: 0 14px 14px;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  background: var(--color-primary);
  border-radius: var(--radius);
}

.unit-card-book-btn:hover { background: var(--color-primary-dark); }

.unit-card-photo {
  aspect-ratio: 4 / 3;
  background: #ece6d9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.unit-card-photo img,
.unit-card-photo video { width: 100%; height: 100%; object-fit: cover; }

.unit-card-placeholder,
.gallery-placeholder {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.unit-card-body { padding: 12px 14px; }
.unit-card-body h2 { margin: 0 0 6px; font-size: 1.05rem; }
.unit-card-desc { color: var(--color-muted); font-size: 0.9rem; margin: 0 0 8px; }
.unit-card-meta { margin: 0 0 4px; font-size: 0.85rem; color: var(--color-muted); }
.unit-card-price { margin: 0; font-weight: 600; color: var(--color-primary-dark); }

/* "Scroll down" hint — points at the booking widget further down the page */
.scroll-hint {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  padding: 6px 14px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.scroll-hint--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}

.scroll-hint-label {
  font-size: 0.72rem;
  white-space: nowrap;
}

.scroll-hint-arrow {
  font-size: 1.1rem;
  line-height: 1;
  animation: scroll-hint-bounce 1.4s ease-in-out infinite;
}

@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint-arrow { animation: none; }
}

/* Unit page */
.gallery-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.gallery-thumb {
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
  line-height: 0;
  width: auto;
}

.gallery-thumb--video { position: relative; }

.gallery-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.3rem;
  line-height: 52px;
  text-align: center;
  pointer-events: none;
}

.gallery-scroll img,
.gallery-scroll video {
  height: 220px;
  width: auto;
  max-width: 90vw;
  object-fit: cover;
  border-radius: var(--radius);
  flex: 0 0 auto;
  display: block;
  pointer-events: none;
}

/* Full-size photo viewer, opened from the gallery strip above. Covers the
   whole viewport on both desktop (arrow keys/buttons) and mobile (swipe). */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 12, 0.92);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden],
.lightbox-img[hidden] { display: none; }

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }

.lightbox-count {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
}

.gallery-placeholder {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ece6d9;
  border-radius: var(--radius);
}

.unit-desc { white-space: pre-line; }

.unit-facts, .amenities-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.unit-facts li, .amenities-list li {
  padding: 4px 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.95rem;
}

.amenities-list li::before { content: "• "; color: var(--color-primary); }

/* Banners */
.banner {
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.banner-error { background: var(--color-error-bg); color: var(--color-error-text); }
.banner-info { background: var(--color-info-bg); color: var(--color-info-text); }
.banner a { color: inherit; text-decoration: underline; margin-left: 6px; }

.draft-note {
  font-style: italic;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* Booking widget / calendar */
.booking-widget {
  margin-top: 24px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.calendar-legend {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.legend-item { display: inline-flex; align-items: center; gap: 4px; }
.legend-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
  background: #d8d1c3;
}
.legend-dot.free { background: #d8d1c3; }
.legend-dot.occupied { background: #cfa8a0; }
.legend-dot.selected-item { background: var(--color-primary); }
.legend-dot.past { background: #d8d1c3; opacity: 0.4; }

/* All months render as one continuous column the user scrolls down through
   (see calendar-scroll) instead of paging sideways month-by-month. The
   weekday row stays fixed above the scroller; each month gets its own
   label inline in the flow — see calendar-month-label. */
.calendar {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-muted);
  padding: 4px 0;
}

/* Fixed-height viewport so only part of the timeline is visible at once —
   scrolled on load to put today at the vertical midpoint, i.e. muted past
   days fill the top half and free days fill the bottom half. */
.calendar-scroll {
  max-height: 62vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.calendar-month {
  width: 100%;
}

.calendar-month-label {
  font-weight: 700;
  text-transform: capitalize;
  text-align: center;
  padding: 14px 0 8px;
}

.calendar-month:first-child .calendar-month-label {
  padding-top: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--color-text);
}

.calendar-day-blank { border: none; background: transparent; cursor: default; }

.calendar-day.occupied {
  background: #f3ded9;
  color: var(--color-muted);
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Past days stay visible (not blanked out) so the calendar reads as a
   continuous timeline, but muted and inert since they can't be booked. */
.calendar-day.past {
  opacity: 0.4;
  cursor: default;
  background: var(--color-surface);
}

.calendar-day.is-today {
  border-color: var(--color-accent);
  border-width: 2px;
  font-weight: 700;
}

.calendar-day.selected-start,
.calendar-day.selected-end {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  font-weight: 700;
}

.calendar-day.in-range {
  background: #dcebe0;
  border-color: var(--color-primary);
}

.selection-summary {
  margin-top: 14px;
  font-size: 0.95rem;
}

.selection-summary p { margin: 2px 0; }

#quote-line { font-weight: 600; color: var(--color-primary-dark); min-height: 1.2em; }

/* Promo field lives inside the booking form now, styled like the other
   fields (label + full-width input) so it isn't overlooked — the row just
   adds the "Применить" button next to the input instead of below it. */
.promo-row { display: flex; align-items: stretch; gap: 8px; margin-top: 4px; max-width: 100%; }
/* Flex items default to min-width: auto, which floors an <input> at its
   intrinsic content width and was pushing the button past the card's right
   edge instead of letting the input shrink — min-width: 0 is what actually
   lets flex-shrink do its job here. */
.promo-row input[type="text"] { flex: 1 1 auto; width: auto; min-width: 0; margin-top: 0; }
.promo-row button {
  width: auto; flex: 0 0 auto; margin-top: 0; padding: 0 14px; white-space: nowrap;
  border: 1px solid var(--color-primary); border-radius: 8px;
  background: var(--color-surface); color: var(--color-primary); font-weight: 600; cursor: pointer;
}
.promo-row button:hover { background: var(--color-info-bg); }
.promo-message { min-height: 1.2em; margin: 6px 0 0; font-size: 0.85rem; }
.promo-message.promo-ok { color: var(--color-primary-dark); }
.promo-message.promo-error { color: var(--color-error-text); }

/* Form */
form label {
  display: block;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--color-muted);
}

form input[type="text"],
form input[type="tel"],
form input[type="email"],
form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
}

form textarea { min-height: 70px; resize: vertical; }

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
}

.checkbox-line input { margin-top: 3px; }

button, .pay-button {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}

button:disabled {
  background: #b9bdb6;
  cursor: not-allowed;
}

.link-button {
  background: none;
  color: var(--color-text-secondary, #6b6f66);
  font-weight: 400;
  font-size: 0.9rem;
  width: auto;
  padding: 8px 0;
  text-decoration: underline;
}

/* Pay / confirmation pages */
.booking-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.booking-summary p { margin: 4px 0; }

.pay-box { text-align: center; }
.pay-hint { color: var(--color-muted); font-size: 0.85rem; }

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--color-info-bg);
  color: var(--color-info-text);
  margin-bottom: 14px;
}

.status-badge.status-pending { background: #fbf1de; color: #8a5a1f; }
.status-badge.status-expired,
.status-badge.status-cancelled { background: var(--color-error-bg); color: var(--color-error-text); }

.instructions {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.instructions + .instructions { margin-top: 16px; }

.rules-text { white-space: pre-line; }

.muted-text { color: var(--color-muted); }
.small { font-size: 0.85rem; }

/* ---------- Stories (home page, under the header) ---------- */
.stories {
  margin: -4px -16px 14px;
}

.stories-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 16px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.stories-scroll::-webkit-scrollbar { display: none; }

.story-bubble {
  flex: 0 0 auto;
  width: 64px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-text);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-weight: 400;
  cursor: pointer;
}

/* Ring in the site's primary green; greys out once that unit's story was seen */
.story-ring {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  display: block;
  transition: transform 0.15s ease;
}
.story-bubble:active .story-ring { transform: scale(0.94); }
.story-bubble--seen .story-ring { background: #cfc8bb; }

.story-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--color-bg);
  overflow: hidden;
  background: #ece6d9;
}
.story-avatar img,
.story-avatar video { width: 100%; height: 100%; object-fit: cover; display: block; }

.story-name {
  font-size: 0.7rem;
  line-height: 1.2;
  max-width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- "Подобрать дату" button ---------- */
.pick-dates-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.pick-dates-btn:hover,
.pick-dates-btn:active { background: var(--color-primary-dark); }
.pick-dates-icon { font-size: 1.1rem; }

/* ---------- Story viewer ---------- */
.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.story-viewer[hidden] { display: none; }

.story-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 480px;
  perspective: 1500px;
}
@media (min-width: 560px) {
  .story-stage { height: min(100%, 860px); }
}

/* The cube turns between units; faces sit on its sides (see setCube). */
.story-cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.story-cube--animating { transition: transform 0.32s cubic-bezier(0.25, 0.8, 0.3, 1); }

.story-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #111;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* Darkens a face as it turns away */
.story-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
  opacity: var(--shade, 0);
  pointer-events: none;
}
.story-cube--animating .story-frame::after { transition: opacity 0.32s ease; }

.story-ghost { pointer-events: none; }
.story-ghost[hidden] { display: none; }
.story-ghost--cover { z-index: 3; }

.story-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.story-img,
.story-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-img[hidden],
.story-video[hidden],
.story-spinner[hidden] { display: none; }

.story-spinner {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: mh-spin 0.8s linear infinite;
}

.story-gesture {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: none;
}

.story-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: max(8px, env(safe-area-inset-top)) 10px 24px;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.story-top .story-icon-btn { pointer-events: auto; }

.story-progress { display: flex; gap: 4px; }
.story-bar {
  flex: 1 1 0;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}
.story-bar-fill {
  height: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
}

.story-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #fff;
}
.story-header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  background: #444;
}
.story-header-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-header-avatar--empty img { display: none; }
.story-header-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.2; }
.story-header-name { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-header-price { font-size: 0.78rem; opacity: 0.85; }

.story-icon-btn {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
}
.story-icon-btn[hidden] { display: none; }

.story-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px 16px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55));
  transition: opacity 0.2s ease;
}
.story-book-btn {
  display: block;
  padding: 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--color-primary-dark);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.story-book-btn:active { transform: scale(0.98); }

/* While held (paused) the chrome fades out, like Instagram */
.story-viewer--holding .story-top,
.story-viewer--holding .story-footer { opacity: 0; }

@keyframes mh-spin { to { transform: rotate(360deg); } }

/* ---------- Date picker results ---------- */
.date-results { margin-top: 20px; }
.date-results[hidden],
.booking-widget[hidden],
.avail-card[hidden],
label[hidden] { display: none; }
.date-results h2 { margin-bottom: 4px; }

.date-results-list { display: grid; gap: 10px; margin-top: 10px; }

.avail-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px;
  text-align: left;
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-weight: 400;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.avail-card:active { transform: scale(0.99); }
.avail-card--loading { opacity: 0.5; }
.avail-card.is-selected {
  border-color: var(--color-primary);
  background: #f1f7f2;
  box-shadow: 0 0 0 3px rgba(63, 107, 74, 0.15);
}

.avail-card-photo {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  background: #ece6d9;
}
.avail-card-photo img,
.avail-card-photo video { width: 100%; height: 100%; object-fit: cover; display: block; }

.avail-card-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.avail-card-name { font-weight: 700; font-size: 1rem; }
.avail-card-meta { font-size: 0.82rem; color: var(--color-muted); }
.avail-card-price { font-weight: 700; color: var(--color-primary-dark); }

.avail-card-check {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.avail-card.is-selected .avail-card-check {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

form select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
}

button.is-busy { opacity: 0.75; }

/* ---------- Payment ---------- */
.pay-timer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: #fbf1de;
  color: #8a5a1f;
  font-size: 0.92rem;
}
.pay-timer strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.pay-failure { text-align: left; }
.pay-failure[hidden],
#pay-unavailable[hidden],
.banner[hidden] { display: none; }
.pay-button--disabled { opacity: 0.5; pointer-events: none; }

.pay-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(20, 17, 12, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pay-overlay[hidden] { display: none; }

.pay-overlay-card {
  width: 100%;
  max-width: 360px;
  background: var(--color-surface);
  border-radius: 16px;
  padding: 26px 20px 16px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  animation: mh-pop 0.18s ease-out;
}
.pay-overlay-card h2 { margin: 14px 0 6px; font-size: 1.15rem; }
.pay-overlay-card p { margin: 0 0 8px; color: var(--color-muted); font-size: 0.92rem; }
.pay-overlay-timer strong { color: var(--color-text); font-variant-numeric: tabular-nums; }
.pay-overlay-card .pay-button { margin-top: 10px; }
.pay-overlay-card .pay-button[hidden],
.pay-spinner[hidden],
.pay-overlay-icon[hidden],
.pay-overlay-actions [hidden],
.pay-overlay-actions[hidden] { display: none; }

.pay-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid #e6efe8;
  border-top-color: var(--color-primary);
  animation: mh-spin 0.8s linear infinite;
}

.pay-overlay-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}
.pay-overlay-icon--success { background: var(--color-primary); }
.pay-overlay-icon--failure { background: #c0492f; }
.pay-overlay-icon--stale { background: var(--color-accent); }

.pay-overlay-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.88rem;
}
.pay-overlay-actions .link-button { margin: 0; }

@keyframes mh-pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- "You have an unpaid booking" reminder ---------- */
.pending-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fbf1de;
  color: #8a5a1f;
  text-decoration: none;
  font-size: 0.9rem;
}
.pending-banner-cta { font-weight: 700; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .story-spinner, .pay-spinner { animation-duration: 2s; }
}
