/* ═══════════════════════════════════════════════════════════════════════════
   app.css — application-only positioning + layout glue.
   This file MUST NOT define new visual styles. It exists solely to:
     · place cf-modal inside a real fullscreen overlay,
     · pin app shell elements (FAB, route panel, notify toast, etc.),
     · provide hide/show toggles for elements behaviorally controlled by JS.
   All visual tokens come from component-library.css (locked).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Reset body backdrop to the page surface so map fills the viewport */
html, body { height: 100%; }
body { background: var(--surface-page); }

/* ── Modal overlay (fullscreen backdrop wrapper for cf-modal) ────────────── */
.cf-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface-modal);        /* alpha-black-40 */
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--scale-600);
  z-index: 9100;                            /* above route-panel (1100) and legacy modal-overlay (2000) */
}
.cf-modal-overlay.open { display: flex; }

/* Allow the modal card to scroll if its content exceeds the viewport */
.cf-modal-overlay .cf-modal {
  max-height: calc(100vh - var(--scale-1200));
  overflow-y: auto;
}

/* Native <select> inside cf-field: strip the OS chevron — cf-field already
   renders a Phosphor caret in the .caret slot. */
.cf-field select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
  color: inherit;
  width: 100%;
  cursor: pointer;
}

/* Q/A row inside the submit-node modal — JS-generated. Two cf-fields side
   by side + a ghost remove button. */
.qa-pair {
  display: flex;
  gap: var(--scale-200);
  align-items: flex-start;
  margin-bottom: var(--scale-200);
}
.qa-pair > .cf-field { flex: 1; min-width: 0; }

/* Generic two-column row used inside cf-modal-content for product / route
   list items (gem store, featured routes, etc.). Title block on the left,
   primary action on the right. Uses library tokens only. */
.cf-list-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--scale-300);
  padding: var(--scale-300) var(--scale-400);
  background: var(--surface-page);
  border: var(--border-w-sm) solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--scale-200);
}
.cf-list-row__body { flex: 1; min-width: 0; }
.cf-list-row__title { color: var(--text-headings); margin: 0 0 var(--scale-100); }
.cf-list-row__sub   { color: var(--text-label); margin: 0; }

/* Featured route card — vertical layout with hero image, used inside the
   featured-routes cf-modal. Uses library tokens. */
.route-card {
  background: var(--surface-page);
  border: var(--border-w-sm) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--scale-300) var(--scale-400);
  margin-bottom: var(--scale-300);
  display: flex;
  flex-direction: column;
  gap: var(--scale-100);
}
.route-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--surface-darker-background);
  margin-bottom: var(--scale-100);
}
.route-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--scale-200);
  margin-top: var(--scale-100);
}
.route-card-price {
  color: var(--text-warning);
}

/* ── Tap targets in places that need them ────────────────────────────────── */
.cf-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--scale-1000);
  height: var(--scale-1000);
  border-radius: var(--radius-lg);
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--icon-default);
}
.cf-icon-btn:hover { background: var(--surface-darker-background); }
