@import "/mk3/assets/palette.css";

/* ========================================================================
 * 探索空間 — 空間詳情 Modal（Airbnb 風格）
 * 作用域以 .vm- 前綴隔離，沿用 palette.css 品牌變數（--navy / --orange）。
 * 不得硬編品牌色：標題用 var(--navy)，重點／價格／預訂用 var(--orange)。
 * ===================================================================== */

/* 可點擊的空間卡片（覆蓋 landing .mk-card 的連結預設） */
.venuesGrid .venue-card {
  cursor: pointer;
  text-align: left;
  border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
}
.venuesGrid .venue-card:hover,
.venuesGrid .venue-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
  outline: none;
}
.venuesGrid .venue-card .card-cover.has-img {
  background-size: cover;
  background-position: center;
  font-size: 0;
}

/* Overlay */
.vm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .62);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100000;
  opacity: 0;
  transition: opacity .22s ease;
}
.vm-overlay.show {
  display: flex;
  opacity: 1;
}

/* Modal shell */
.vm-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 940px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .35);
  transform: translateY(14px);
  transition: transform .22s ease;
}
.vm-overlay.show .vm-modal { transform: none; }

.vm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .92);
  color: #1a1a2e;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .2);
  transition: background .18s ease, transform .18s ease;
}
.vm-close:hover { background: #fff; transform: scale(1.05); }

.vm-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Gallery */
.vm-gallery { position: relative; background: #f1f3f7; }
.vm-main {
  width: 100%;
  height: 320px;
  background-size: cover;
  background-position: center;
  background-color: var(--navy);
  background-image: linear-gradient(135deg, var(--navy), var(--navy-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  color: #fff;
}
.vm-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  overflow-x: auto;
}
.vm-thumb {
  flex: 0 0 auto;
  width: 78px;
  height: 56px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: .82;
  transition: opacity .15s ease, border-color .15s ease;
}
.vm-thumb:hover { opacity: 1; }
.vm-thumb.active { opacity: 1; border-color: var(--orange); }

/* Content layout */
.vm-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  padding: 24px 28px 30px;
}
.vm-info { min-width: 0; }
.vm-info h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
}
.vm-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 18px;
}
.vm-sub .vm-rating { color: var(--orange); font-weight: 700; }

.vm-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.vm-stat {
  flex: 1 1 120px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.vm-stat .vm-stat-label { font-size: 12px; color: var(--gray); margin-bottom: 4px; }
.vm-stat .vm-stat-value { font-size: 16px; font-weight: 700; color: #1a1a2e; }

.vm-section { margin-bottom: 22px; }
.vm-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 10px;
}
.vm-features { display: flex; flex-wrap: wrap; gap: 8px; }
.vm-feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange-soft);
  color: #7a4d00;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
}
.vm-empty { color: var(--gray); font-size: 14px; }

.vm-days { display: flex; flex-wrap: wrap; gap: 6px; }
.vm-day {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #eef1f6;
  color: #9aa3b2;
}
.vm-day.on { background: var(--navy); color: #fff; }
.vm-hours-note { margin-top: 10px; font-size: 14px; color: #444; }
.vm-hours-note strong { color: var(--navy); }

/* Sticky booking card */
.vm-booking {
  align-self: start;
  position: sticky;
  top: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
.vm-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
}
.vm-price-row .vm-price { font-size: 26px; font-weight: 800; color: var(--navy); }
.vm-price-row small { color: var(--gray); font-size: 14px; }

.vm-field { margin-bottom: 14px; }
.vm-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}
.vm-field input,
.vm-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.vm-field input:focus,
.vm-field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.vm-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px dashed var(--line);
  margin-top: 8px;
  padding-top: 14px;
  margin-bottom: 14px;
}
.vm-total .vm-total-label { color: var(--gray); font-size: 14px; }
.vm-total .vm-total-value { font-size: 20px; font-weight: 800; color: var(--navy); }

.vm-submit {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--orange), var(--orange-hover));
  transition: filter .18s ease;
}
.vm-submit:hover { filter: brightness(1.04); }
.vm-submit:disabled { opacity: .6; cursor: not-allowed; }
.vm-approval-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray);
  text-align: center;
}

@media (max-width: 760px) {
  .vm-content { grid-template-columns: 1fr; gap: 20px; }
  .vm-main { height: 220px; font-size: 56px; }
  .vm-booking { position: static; }
}
