/* RealRacer.ai bottom-sheet primitive.
 *
 * Pattern: mobile-first one-thumb picker (Apple Music / iOS share
 * sheet voice). Slides up from the bottom on phone; centres at
 * ≥920px desktop so it doesn't feel weird on a 27" screen.
 *
 * Markup is created dynamically by /static/sheet.js — pages don't
 * inline it. Reusable for venue / car / plan / setup / any other
 * "pick one from a list" UX.
 *
 * v2 design tokens — assumes tokens.css is loaded (palette + type).
 */

.rr-sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
  z-index: 80;
}
.rr-sheet-backdrop.open {
  opacity: 1; visibility: visible;
}

.rr-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid var(--border);
  padding: 14px 22px 36px;
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4, 1.2, .6, 1);
  z-index: 90;
  max-height: 80vh;
  overflow-y: auto;
}
.rr-sheet.open {
  transform: translateY(0);
}

@media (min-width: 920px) {
  /* Desktop: centre the sheet so it doesn't read as "swipe-up from a
     50" monitor". Still slides up from the bottom for continuity. */
  .rr-sheet {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
  }
  .rr-sheet.open {
    transform: translateX(-50%) translateY(0);
  }
}

.rr-sheet-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--faint);
  margin: 0 auto 14px;
}
.rr-sheet-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--text);
}
.rr-sheet-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.5;
}

.rr-sheet-list {
  list-style: none;
  display: flex; flex-direction: column;
  margin: 0; padding: 0;
}
.rr-sheet-list li {
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: background .15s;
}
.rr-sheet-list li:last-child {
  border-bottom: none;
}
.rr-sheet-list li:hover {
  background: var(--surface-2);
}
.rr-sheet-list li:active {
  background: var(--border);
}
.rr-sheet-list li.is-static {
  cursor: default;
}
.rr-sheet-list li.is-static:hover,
.rr-sheet-list li.is-static:active {
  background: transparent;
}
.rr-sheet-list .rr-sheet-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  flex: 1;
  color: var(--text);
}
.rr-sheet-list .rr-sheet-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.rr-sheet-list .rr-sheet-tag.is-here {
  color: var(--green);
}

.rr-sheet-empty {
  padding: 28px 4px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
