/*
 * RoadLife V27 Logo Edition — visual styling for the existing driving interface.
 * Loaded after roadlife-theme.css. All surfaces use the active interface theme.
 * Visibility, event targets, game layers and simulation code stay in V27.
 */

/* Driving instruments */
#game .hudPanel {
  width: 248px;
  min-width: 0;
  max-width: calc(100vw - 36px);
  padding: 16px;
  border-color: var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--rl-shadow);
}
#game .speedRow { gap: 9px; }
#game .speed {
  font-size: 46px;
  font-weight: 750;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
#game .unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
}
#game .hudGrid {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 5px 12px;
  margin-top: 13px;
  font-size: 12px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
#game .hudGrid span { color: var(--muted); }
#game .hudGrid b {
  min-width: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
  color: var(--text);
}
#game #gear { color: var(--accent); font-weight: 750; }
#game .rpmbar,
#game .fuelbar { height: 5px; background: var(--rl-raised); }
#game .rpmbar { margin-top: 13px; }
#game .rpmbar > div { background: var(--accent); }
#game .fuelbar > div { background: var(--warn); }

/* The toolbar keeps its original masked icons, button IDs and dimensions. */
#game #topRight {
  background: var(--panel);
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: var(--rl-shadow);
}
#game #topRight button,
#game[data-ui-style] #topRight button {
  border-color: var(--line);
  background: var(--rl-button);
  color: var(--text);
  font-weight: 650;
  border-radius: 8px;
}
#game #topRight button.icon19 {
  font-size: 0 !important;
  transition: background .12s, border-color .12s, color .12s;
}
#game #topRight button.icon19:hover {
  background: var(--rl-accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: none;
}
#game #topRight button.icon19:active { transform: none; }
#game #topRight button.icon19[aria-pressed="true"],
#game #topRight button.icon19[aria-expanded="true"] {
  background: var(--rl-accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
#game #topRight #buildBtn {
  background: transparent;
  color: var(--accent) !important;
  font-size: 11px;
  letter-spacing: .08em;
  border: 0;
}
#game #topRight #zoomBtn {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
#game #topRight #reloadPOIs27 {
  background: var(--accent);
  color: var(--rl-accent-ink);
  border-color: var(--accent);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .025em;
}
#game #topRight #reloadPOIs27[aria-busy="true"] {
  background: var(--warn);
  border-color: var(--warn);
  color: var(--rl-accent-ink);
}

/* Shared panel surfaces also cover the display panel outside the HUD. */
#game :is(#spritePanel, #trafficEditorPanel, #missionEditorPanel,
  #locationPanel, #displayPanel, #radioPanel, .v18panel) {
  background: var(--panel2);
  border-color: var(--line);
  border-radius: 12px;
  color: var(--text);
  box-shadow: var(--rl-shadow);
  padding: 18px;
  font-size: 13px;
  line-height: 1.5;
  scrollbar-color: var(--muted) var(--rl-input);
  scrollbar-width: thin;
}
#game :is(.spriteTitle, .v18title) {
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
}
#game :is(.spriteTitle, .v18title) strong {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .04em;
  line-height: 1.4;
}
#game :is(.spriteTitle, .v18title) > button {
  flex-shrink: 0;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: .05em;
  font-weight: 700;
}
#game :is(.settingsSection, .v18section) {
  border-color: var(--line);
  color: var(--accent);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .1em;
  font-weight: 750;
}
#game .settingsSection { margin: 17px 0 9px; padding-top: 13px; }
#game .v18section { margin: 20px 0 12px; }
#game .v18sub { color: var(--accent); font-size: 13px; }
#game :is(.spriteHelp, .v13Hint, .v18note, .radioStatus, .radioEmpty) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
#game :is(.spriteHelp, .v18note) b { color: var(--text); font-weight: 650; }
#game :is(.spriteControl, .wideControl, .displayControl, .displayPair,
  .v18pair, .lightRow, .colorRow, .mapProviderGrid, .radioVolume) label,
#game :is(.v18field, .missionField, .missionField label, .toggleRow label,
  .v18check, .goodCheck) {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
#game .toggleRow label,
#game .v18check,
#game .goodCheck { color: var(--text); }
#game .lightHeader,
#game .lightAxisLabel { font-size: 10px; color: var(--muted); }
#game .spriteControl { margin: 11px 0; }
#game .v18field { gap: 7px; }
#game :is(.spriteControl, .displayControl, .displayPair, .v18pair,
  .colorRow, .mapProviderGrid, .wideControl) > * { min-width: 0; }

/* Existing action groups retain all controls, including their disabled states. */
#game :is(.v18panel, #spritePanel, #trafficEditorPanel, #missionEditorPanel,
  #locationPanel, #displayPanel, #radioPanel) button,
#game #persistenceBar button {
  background: var(--rl-button);
  border-color: var(--line);
  border-radius: 7px;
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 650;
  padding: 8px 10px;
}
#game :is(.v18panel, #spritePanel, #trafficEditorPanel, #missionEditorPanel,
  #locationPanel, #displayPanel, #radioPanel) button:not(:disabled):hover,
#game #persistenceBar button:not(:disabled):hover {
  background: var(--rl-raised);
  border-color: var(--accent);
}
#game :is(.v18panel, #spritePanel, #trafficEditorPanel, #missionEditorPanel,
  #locationPanel, #displayPanel, #radioPanel) button:is(.accent, .accentBtn) {
  background: var(--rl-accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 750;
}
#game :is(.v18panel, #spritePanel, #trafficEditorPanel, #missionEditorPanel,
  #locationPanel, #displayPanel, #radioPanel) button:is(.accent, .accentBtn):not(:disabled):hover {
  background: var(--accent);
  color: var(--rl-accent-ink);
}
#game :is(.trafficButtons, .v18actions, .spriteActions, .radioActions) {
  gap: 8px;
}
#game :is(.trafficButtons, .v18actions) button { min-width: 0; }
#game #spawnDelete21 { color: var(--danger); }
#game #persistenceBar {
  border-color: var(--line);
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}

/* Tuning, scene objects, places and mission lists */
#game .tuning19 {
  background: var(--rl-input);
  border-color: var(--line);
  border-radius: 9px;
  margin: 10px 0;
  padding-left: 13px;
  padding-right: 13px;
}
#game .tuning19 summary {
  padding: 13px 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}
#game .tuning19 summary::marker { color: var(--accent); }
#game .tuning19[open] { border-color: var(--accent); }
#game .tuning19 .v18pair label { font-size: 12px; }
#game :is(.readoutBox, .readout20, .compat21, .goodsBox,
  .jobRow, .emptyJobs, #lightbarFields21, #trafficSettings20 .switch20) {
  background: var(--rl-input);
  border-color: var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}
#game :is(.readoutBox, .readout20, .compat21) { padding: 11px 12px; }
#game :is(.readoutBox, .readout20) { font-variant-numeric: tabular-nums; }
#game .compat21 { border-left: 3px solid var(--accent); }
#game .emptyJobs { color: var(--muted); }
#game .goodsBox strong {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .055em;
}
#game .goodsList { gap: 6px; }
#game .goodsColumns { margin-top: 12px; }
#game #sampleStatus19 {
  background: var(--rl-input);
  color: var(--muted);
  border-color: var(--warn);
}
#game #sampleStatus19[data-available="true"] { border-color: var(--accent); }
#game :is(#worldPOIList, #spawnList21, #mapAssetList22, #missionPoiList,
  #missionOfferSearch25, #missionOfferList25) {
  background: var(--rl-input);
  color: var(--text);
  border-color: var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
}
#game :is(#worldPOIList, #spawnList21, #mapAssetList22, #missionPoiList,
  #missionOfferList25) option { padding: 7px 6px; }
#game #poiDetails23 {
  font-family: inherit !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: var(--muted);
  overflow-wrap: anywhere;
}
#game #timeReadout { color: var(--text); font-size: 24px; }

/* Online radio */
#game .radioNow,
#game .radioStation {
  background: var(--rl-input);
  border-color: var(--line);
  border-radius: 9px;
  color: var(--text);
}
#game .radioNow { padding: 12px; }
#game .radioNow strong { font-size: 14px; }
#game .radioNow small { font-size: 12px; color: var(--muted); }
#game :is(.radioNow, .radioStation) img { background: var(--rl-raised); }
#game .radioStation .stationName { color: var(--text); font-size: 12px; }
#game .radioStation .stationMeta { color: var(--muted); font-size: 11px; }
#game #radioPanel .radioStation:not(:disabled):hover,
#game #radioPanel .radioStation.playing {
  background: var(--rl-accent-soft);
  border-color: var(--accent);
}
#game .radioStation.playing { box-shadow: inset 3px 0 0 var(--accent); }
#game .radioStation .playGlyph { color: var(--accent); }
#game .radioVolume output { color: var(--text); font-size: 12px; }
#game .radioEmpty { border-color: var(--line); }

/* Bus duties use the same instrument and action palette. */
#game .hudPanel.busActive27 { width: 260px; }
#game #busPanel27 { border-color: var(--line); font-size: 12px; }
#game .busHeading27 { color: var(--accent); font-size: 12px; letter-spacing: .08em; }
#game .busHeading27 span { color: var(--muted); font-size: 10px; letter-spacing: .09em; }
#game .busGrid27 { gap: 5px 12px; }
#game .busGrid27 span,
#game #busHint27,
#game #busExchange27 { color: var(--muted); }
#game #busPassengers27 { font-size: 20px; color: var(--text); }
#game #busDoorToggle27 {
  background: var(--rl-accent-soft);
  border-color: var(--accent);
  border-radius: 7px;
  color: var(--accent);
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 750;
}
#game #busDoorToggle27:not(:disabled):hover {
  background: var(--accent);
  color: var(--rl-accent-ink);
}
#game #busPanel27:is([data-doors="open"], [data-doors="opening"], [data-doors="closing"]) #busDoors27 {
  color: var(--warn);
}
#game #busExchange27 { font-size: 11px; }

/* Help, driving prompts and loading/status feedback */
#game :is(#controls, #gearHint, #missionBanner, #coupleHint21,
  #lowHint22, #poiQuickStatus27, #toast, #debug, #fpsReadout26) {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
  border-radius: 9px;
  box-shadow: var(--rl-shadow);
}
/* Keep the original help footprint: later game modules append more controls. */
#game #controls { font-size: 11px; line-height: 1.65; padding: 11px 13px; }
#game .key {
  background: var(--rl-raised);
  border-color: var(--line);
  color: var(--text);
  font-size: 10px;
  font-weight: 650;
  border-radius: 4px;
}
#game :is(#gearHint, #missionBanner, #coupleHint21, #lowHint22, #toast) {
  font-family: inherit;
  font-size: 12px;
  line-height: 1.55;
}
#game :is(#missionBanner, #coupleHint21, #lowHint22) { border-left: 3px solid var(--accent); }
#game #poiQuickStatus27 {
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
}
#game #poiQuickStatus27:empty { padding: 0; border-width: 0; box-shadow: none; }
#game :is(#poiQuickStatus27, #poiReloadStatus25)[data-state="success"] { color: var(--accent); }
#game :is(#poiQuickStatus27, #poiReloadStatus25):is([data-state="partial"], [data-state="error"]) { color: var(--warn); }
#game #debug { font-size: 11px; line-height: 1.55; }
#game #fpsReadout26 { color: var(--text); font-size: 12px; }
#game #steeringWheelHud .wheelCaption {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  border-radius: 5px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
#game #attribution {
  background: var(--panel);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  border-radius: 5px;
}
#game #attribution .linkish { color: var(--text); }

/* Compact desktop windows keep comfortable, accessible panel controls. */
@media (max-width: 800px) {
  #game .hudPanel { width: 216px; padding: 12px; }
  #game .speed { font-size: 38px; }
  #game .hudGrid { gap: 4px 9px; font-size: 11px; }
  #game :is(#spritePanel, #trafficEditorPanel, #missionEditorPanel,
    #locationPanel, #displayPanel, #radioPanel, .v18panel) { padding: 15px; }
  #game .tuning19 .v18pair { grid-template-columns: 125px minmax(50px, 1fr) 58px; }
  #game .radioSearch { grid-template-columns: 1fr 1fr; }
  #game .radioSearch input { grid-column: 1 / -1; }
}
@media (max-height: 760px) {
  #game .hudPanel { padding: 12px 14px; }
  #game .speed { font-size: 38px; }
  #game .hudGrid { margin-top: 9px; gap: 3px 10px; }
  #game #busPanel27 { font-size: 11px; }
  #game .busGrid27 { gap: 3px 10px; }
  #game #busDoorToggle27 { padding: 7px 9px; }
  #game #controls { font-size: 11px; line-height: 1.65; }
}
@media (max-height: 660px) {
  #game .hudPanel.busActive27 .speed { font-size: 32px; }
  #game .hudPanel.busActive27 .hudGrid { margin-top: 6px; gap: 2px 10px; font-size: 11px; }
  #game #busPassengers27 { font-size: 17px; }
}
