/* ============================================================================
   SPEEDX PASSAGEIRO — layout da tela (consome tokens + componentes)
============================================================================ */

html, body { height: 100%; overflow: hidden; }

/* ------------------------------- MAPA ------------------------------------ */
#mapa { position: absolute; inset: 0; z-index: var(--z-map); background: var(--surface-sunken); }

/* Créditos do mapa discretos */
.leaflet-control-attribution {
  font-size: 10px; background: var(--glass) !important; color: var(--text-muted) !important;
}

/* ------------------------------ TOP BAR ---------------------------------- */
.topbar {
  position: fixed; z-index: var(--z-topbar);
  top: calc(var(--sp-3) + env(safe-area-inset-top));
  left: var(--sp-3); right: var(--sp-3);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.topbar__brand {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  background: var(--glass); backdrop-filter: blur(10px);
}
.brand-bolt { width: 20px; height: 20px; color: var(--accent); }
.brand-name { font-size: var(--fs-title); font-weight: var(--fw-heavy); letter-spacing: -0.02em; }
.brand-x { color: var(--primary); }

.topbar__right { display: flex; align-items: center; gap: var(--sp-2); }

/* --------------------------- BOTTOM SHEET -------------------------------- */
.perto { display: flex; align-items: baseline; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.perto__num { font-size: var(--fs-heading-md); font-weight: var(--fw-bold); color: var(--primary); }
.perto__label { font-size: var(--fs-body-sm); color: var(--text-muted); }

.dica-campo { font-size: var(--fs-caption); color: var(--text-muted); margin: var(--sp-2) 0 0 var(--sp-1); }

/* Opções de corrida */
.opcoes { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }

.opcao {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1.5px solid var(--border-subtle);
  border-radius: var(--r-md); cursor: pointer; text-align: left;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.opcao--ativa { border-color: var(--primary); background: var(--primary-soft); }
.opcao--desativada { opacity: 0.55; cursor: not-allowed; }

.opcao__icone {
  width: 44px; height: 44px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); background: var(--surface-sunken); color: var(--text-secondary);
}
.opcao--ativa .opcao__icone { background: var(--surface); color: var(--primary); }

.opcao__info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.opcao__nome { font-size: var(--fs-body); font-weight: var(--fw-semibold); }
.opcao__desc { font-size: var(--fs-caption); color: var(--text-muted); }
.opcao__preco { font-size: var(--fs-body-lg); font-weight: var(--fw-bold); color: var(--text); }

/* Estado da corrida */
.estado {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4); margin-top: var(--sp-4);
  background: var(--surface-sunken); border-radius: var(--r-md);
}
.estado--sucesso { background: var(--success-soft); }
.estado--erro    { background: var(--danger-soft); }

.estado__icone { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
.estado__icone .icon { width: 26px; height: 26px; }
.estado--sucesso .estado__icone { color: var(--success); }
.estado--erro .estado__icone    { color: var(--danger); }

.estado__titulo { font-size: var(--fs-body); font-weight: var(--fw-bold); }
.estado__texto  { font-size: var(--fs-body-sm); color: var(--text-secondary); }

#btn-corrida { margin-top: var(--sp-4); }
