/* assets/css/style.css */

:root {
  --off-white: #F2ECE4;
  --glass: rgba(255,255,255,0.6);
  --glass-strong: rgba(255,255,255,0.85);
  --glass-border: rgba(255,255,255,0.85);
  --red: #C0392B;
  --red-dark: #922B21;
  --text-primary: #2B2320;
  --text-secondary: #7C716A;
  --text-muted: #A79C93;
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --bottom-nav-height: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  color: var(--text-primary);
  background: var(--off-white);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { -webkit-appearance: none; appearance: none; }

/* Content sits below the sticky top bar and above the fixed bottom tab bar */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 76px 14px calc(var(--bottom-nav-height) + 24px);
}

.brand { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--text-primary); }

.glass {
  background: rgba(255,255,255,0.75);
  background-clip: padding-box;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(43,35,32,0.06);
  border-radius: 20px;
}

/* ---------------- Sticky top bar ---------------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.7);
}

.menu-btn {
  background: none;
  border: none;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--text-primary);
}

.back-btn {
  background: rgba(255,255,255,0.7);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 17px;
  flex-shrink: 0;
  padding: 0;
  min-height: 0;
}

.topbar-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------- Slide-down menu triggered by hamburger ---------------- */

.menu-panel {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  padding: calc(16px + env(safe-area-inset-top)) 20px 20px;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  box-shadow: 0 12px 32px rgba(43,35,32,0.15);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.menu-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.menu-panel .close-btn {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 20px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
  padding: 4px;
}

.menu-panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.menu-panel a i { font-size: 17px; color: var(--red); width: 20px; text-align: center; flex-shrink: 0; }

.menu-panel a:last-child { border-bottom: none; }

.menu-panel a.staff-link {
  margin-top: 6px;
  padding-top: 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.menu-panel a.staff-link i { color: var(--text-muted); font-size: 14px; }

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43,35,32,0.25);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.menu-backdrop.open { opacity: 1; pointer-events: auto; }

/* ---------------- Fixed bottom tab bar (main app navigation) ---------------- */

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  background: rgba(255,255,255,0.92);
  border-top: 1px solid rgba(255,255,255,0.7);
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.bottom-nav a i { font-size: 21px; }

.bottom-nav a.active { color: var(--red); }

/* ---------------- Segmented pill search bar ---------------- */

.search-pill { margin-bottom: 22px; padding: 4px; }

.search-pill summary {
  list-style: none;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  overflow: hidden;
}

.search-pill .seg {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-pill .dot { color: var(--text-muted); }

/* ---------------- Horizontal carousel rows ---------------- */

.carousel-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  margin-bottom: 26px;
}

.carousel-card { flex: 0 0 168px; }

.carousel-thumb {
  height: 130px;
  border-radius: 18px;
  background: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
}

.carousel-thumb .heart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(43,35,32,0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

/* ---------------- Property / room detail page ---------------- */

.photo-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px;
  margin-bottom: 14px;
  position: relative;
}

.photo-carousel .slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  height: 240px;
  background: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-carousel-wrap { position: relative; }

.save-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-size: 16px;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(43,35,32,0.15);
}

.section { margin: 26px 0; }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 12px; }

.facility-row {
  display: flex;
  gap: 22px;
  padding: 18px 4px;
  flex-wrap: wrap;
}

.facility-row .facility {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  width: 60px;
  text-align: center;
}

.facility-row .facility i { font-size: 22px; color: var(--text-primary); }

.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.checklist .item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.checklist .item i { color: #2E7D32; font-size: 15px; flex-shrink: 0; }

.room-type-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.room-type-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--red);
  font-size: 19px;
}

.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 12px 4px; font-size: 13px; border-bottom: 1px solid rgba(0,0,0,0.06); vertical-align: top; }
.info-table td:first-child { color: var(--text-secondary); font-weight: 600; width: 42%; }
.info-table tr:last-child td { border-bottom: none; }

.map-box {
  height: 140px;
  border-radius: 16px;
  background: rgba(255,255,255,0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
}

.book-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 10px);
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 20px;
  max-width: 696px;
  margin: 0 auto;
}

/* ---------------- Native details/summary used for the search pill ---------------- */

summary { outline: none; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }

/* ---------------- Shared UI elements ---------------- */

input, select, textarea {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.9);
  background: var(--glass-strong);
  background-clip: padding-box;
  padding: 12px 16px;
  color: var(--text-primary);
  width: 100%;
}

textarea { border-radius: 14px; resize: vertical; }

label { font-size: 13px; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 6px; }

.field { margin-bottom: 16px; }

button, .btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.1px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  background: var(--red);
  color: #fff;
  padding: 13px 22px;
  display: inline-block;
  transition: opacity 0.15s ease;
  min-height: 48px; /* comfortable tap target */
}

button:active, .btn:active { opacity: 0.85; }

.btn-secondary { background: var(--glass-strong); background-clip: padding-box; color: var(--red-dark); border: 1.5px solid rgba(192,57,43,0.25); }
.btn-danger { background: var(--red-dark); }
.btn-block { width: 100%; text-align: center; }

.card {
  background: rgba(255,255,255,0.7);
  background-clip: padding-box;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 14px;
}

.card-body { padding: 16px 18px; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.2px; }
.price { font-family: var(--font-display); font-weight: 700; }

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

.text-secondary { color: var(--text-secondary); font-size: 13px; }
.text-muted { color: var(--text-muted); font-size: 12px; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 10px;
  color: #fff;
}

.alert {
  padding: 12px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}

.alert-success { background: rgba(46,125,50,0.12); color: #2E7D32; }
.alert-error { background: rgba(146,43,33,0.1); color: var(--red-dark); }

.filters { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.filters select { width: auto; white-space: nowrap; flex-shrink: 0; }

.queue-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.queue-table th, .queue-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.queue-table th { color: var(--text-secondary); font-weight: 600; }

/* Single-column layout is the DEFAULT (mobile-first); widen only on larger screens */
@media (min-width: 640px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .menu-panel { max-width: 340px; left: auto; right: 16px; border-radius: 20px; margin-top: 8px; }
}

@media (max-width: 380px) {
  .grid-2 { grid-template-columns: 1fr; }
}
