/* =========================================================================
   Room Booking — styles
   Mobile-first. Designed to feel native inside Subsplash's iframe.
   ========================================================================= */

:root {
  --bg:       #f5f6f8;
  --surface:  #ffffff;
  --border:   #e3e6ea;
  --text:     #1a1d21;
  --muted:    #6b7280;
  --primary:  #2b6cb0;
  --primary-h:#23588f;
  --error:    #c0392b;
  --success:  #1f8a5a;
  --shadow:   0 1px 3px rgba(20, 30, 50, 0.05), 0 4px 16px rgba(20, 30, 50, 0.05);
  --radius:   12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #0f1115;
    --surface:  #181b21;
    --border:   #2a2f37;
    --text:     #e7eaef;
    --muted:    #9aa3ad;
    --primary:  #4f97d8;
    --primary-h:#6ba8e0;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  padding: 16px;
}

main { max-width: 560px; margin: 0 auto; }

h1 { font-size: 1.4rem; margin: 0 0 8px; line-height: 1.25; }
h2 { font-size: 1.1rem; margin: 0 0 8px; }
p  { margin: 0 0 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }

.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap > * + * { margin-left: 12px; }
.grow { flex: 1; }

.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--error); margin-top: 8px; }

/* ----- form ----- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.form input,
.form select,
.form textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
.form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

/* ----- buttons ----- */
.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover, .btn.primary:focus { background: var(--primary-h); }
.btn.primary[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn.ghost:hover { color: var(--text); }
.btn.small { padding: 6px 10px; font-size: 0.85rem; }
.btn.block { width: 100%; display: block; }

/* ----- room list ----- */
.rooms-list { list-style: none; padding: 0; margin: 16px 0 8px; }
.rooms-list li {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s, transform .05s;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.rooms-list li:hover { border-color: var(--primary); }
.rooms-list li:active { transform: scale(0.99); }
.rooms-list .room-name { font-weight: 600; }
.rooms-list .room-loc  { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.rooms-list .chev      { color: var(--muted); font-size: 1.2rem; }

/* ----- spinner ----- */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- success check ----- */
.check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 30px;
  line-height: 56px;
  text-align: center;
  margin: 0 auto 12px;
}
[data-screen="done"] { text-align: center; }
[data-screen="done"] h1 { margin-top: 0; }

/* ----- empty state ----- */
.empty {
  text-align: center; color: var(--muted);
  padding: 24px 8px;
  border: 1px dashed var(--border);
  border-radius: 10px;
}
