/* Card Rooms screen — U.S. live poker directory with local map + list +
 * tap-to-open detail bottom sheet. Mobile-first stacked layout (375px).
 *
 * This is the ONLY copy of these rules. Both card-rooms.html (the standalone
 * page) and quest.html (the in-app screen) load it. It used to be pasted into
 * quest.css as well and the two copies had already drifted, so nothing but
 * this file may define .cr-*. Page scaffolding lives with the page that needs
 * it, not here.
 */
.cr-wrap {
  padding: 14px 14px 96px;
  color: var(--text, #e8edf5);
  font-family: var(--font);
}
.cr-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
}
.cr-back {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--text, #e8edf5);
  font-size: 20px; line-height: 1;
  cursor: pointer;
}
.cr-back:active { background: rgba(255,255,255,0.08); }
.cr-head-title {
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
  flex: 1 1 auto;
}
.cr-count {
  font-size: 11px; color: var(--dim, #94a3b8);
  font-variant-numeric: tabular-nums;
}
.cr-sub {
  font-size: 12px; color: var(--dim, #94a3b8);
  line-height: 1.4;
  margin-bottom: 12px;
}

.cr-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  margin-bottom: 12px;
}
.cr-select, .cr-search {
  background: rgba(255,255,255,0.04);
  color: var(--text, #e8edf5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  outline: 0;
  appearance: none;
}
.cr-select { background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(-45deg, transparent 50%, #94a3b8 50%);
  background-position: calc(100% - 14px) center, calc(100% - 9px) center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 24px;
}
.cr-search { grid-column: 1 / -1; }
.cr-select:focus, .cr-search:focus { border-color: #3b82f6; }

.cr-mapwrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.cr-map {
  width: 100%;
  background: #0a0e16;
  position: relative;
}
.cr-map-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 190px;
  color: var(--dim, #94a3b8);
  font-size: 12px;
  background: #0a0e16;
}
/* The SVG carries its own aspect ratio — a fixed .cr-map height just left
   dead space under it. */
.cr-static-map {
  display: block; width: 100%;
  touch-action: none;   /* pan and zoom are handled in JS */
  cursor: grab;
}
.cr-static-map.is-panning { cursor: grabbing; }
.cr-map-bg { fill: #0a0f1c; }
.cr-map-land {
  fill: #16233a;
  stroke: #35507a;
  stroke-width: 0.7;
  stroke-linejoin: round;
  /* state borders stay hairline however far you zoom in */
  vector-effect: non-scaling-stroke;
}
.cr-map-label {
  fill: #cbd5e1;
  font: 600 11px var(--font);
  paint-order: stroke;
  stroke: #060a14;
  stroke-width: 3px;
  opacity: 0;   /* room names appear once you have zoomed in */
  pointer-events: none;
}
.cr-map-close .cr-map-label { opacity: 1; }
.cr-map-ctl {
  position: absolute; top: 8px; right: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.cr-map-ctl button {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(9,14,26,0.82);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text, #e8edf5);
  font: 600 15px/1 var(--font);
  cursor: pointer;
}
.cr-map-ctl button:active { background: rgba(59,130,246,0.28); }
.cr-map-ctl button:disabled { opacity: .35; cursor: default; }
.cr-map-marker { cursor: pointer; }
.cr-map-marker:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.cr-map-note {
  margin: 0;
  padding: 8px 10px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--dim, #94a3b8);
}
.cr-legend {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.cr-swatch {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  font-size: 10px;
  color: var(--dim, #94a3b8);
}
.cr-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
}

.cr-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.cr-empty {
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 12px; color: var(--dim, #94a3b8);
  text-align: center;
}
.cr-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  cursor: pointer;
}
.cr-row:active { background: rgba(59,130,246,0.06); }
.cr-row-main { flex: 1 1 auto; min-width: 0; }
.cr-row-name {
  font-size: 14px; font-weight: 700;
  color: var(--text, #e8edf5);
}
.cr-row-loc {
  font-size: 11px; color: var(--dim, #94a3b8);
  margin-top: 2px;
}
.cr-row-stakes {
  font-size: 10px; color: #93c5fd;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  margin-top: 5px;
}
.cr-row-meta {
  flex: 0 0 auto;
  text-align: right;
  min-width: 58px;
}
.cr-row-rating {
  font-size: 14px; font-weight: 700;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
}
.cr-row-refs {
  font-size: 10px; color: var(--dim, #94a3b8);
  margin-top: 2px;
}

/* Detail bottom-sheet overlay */
/* `hidden` alone does not hide this: the display below outranks the UA rule
   for [hidden], so without this the overlay sits over the whole page and
   eats every tap. */
.cr-detail-overlay[hidden] { display: none; }
.cr-detail-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 110;
  display: flex; align-items: flex-end; justify-content: center;
}
.cr-detail-sheet {
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: #0d1320;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  padding: 8px 16px 32px;
  box-sizing: border-box;
  animation: cr-detail-up 0.18s ease-out;
}
@keyframes cr-detail-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.cr-detail-header {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 6px;
  margin-bottom: 12px;
}
.cr-detail-titlewrap { flex: 1 1 auto; min-width: 0; }
.cr-detail-name {
  font-size: 18px; font-weight: 700;
  color: var(--text, #e8edf5);
  letter-spacing: -0.01em;
}
.cr-detail-loc {
  font-size: 12px; color: var(--dim, #94a3b8);
  margin-top: 3px;
}
.cr-detail-rating { color: #fbbf24; font-weight: 700; }
.cr-detail-refs { color: var(--dim, #94a3b8); }
.cr-detail-close {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--text, #e8edf5);
  font-size: 22px; line-height: 1;
  cursor: pointer;
}
.cr-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 14px;
}
.cr-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 12px; font-weight: 600;
  color: var(--text, #e8edf5);
  text-decoration: none;
  flex: 1 1 auto;
  text-align: center;
}
.cr-btn:active { background: rgba(255,255,255,0.08); }
.cr-btn-bravo {
  background: rgba(59,130,246,0.18);
  border-color: rgba(59,130,246,0.40);
  color: #93c5fd;
}
.cr-btn-atlas {
  background: rgba(16,185,129,0.16);
  border-color: rgba(16,185,129,0.40);
  color: #6ee7b7;
}

.cr-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim, #94a3b8);
  margin: 6px 0 8px;
}
.cr-stakes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}
.cr-stake {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.cr-stake-label {
  font-size: 10px; font-weight: 600;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  color: var(--dim, #94a3b8);
}
.cr-stake-count {
  font-size: 13px; font-weight: 700;
  color: #93c5fd;
}

.cr-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.cr-info {
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.cr-info-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim, #94a3b8);
  margin-bottom: 3px;
}
.cr-info-val {
  font-size: 11px; color: var(--text, #e8edf5);
  line-height: 1.4;
}
.cr-notes {
  font-size: 12px; color: var(--text, #e8edf5);
  line-height: 1.5;
  font-style: italic;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  margin-bottom: 14px;
}
.cr-disclaimer {
  font-size: 10px; color: var(--dim, #94a3b8);
  line-height: 1.5;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
