/* Shared authenticated workspace: the dashboard is the world, each feature is a focused node. */
body.bikenode-world-route {
  --workspace-header-height: 38px;
  --workspace-context-height: 38px;
  --workspace-control-height: 34px;
  background: #050505;
  color: #f5f5f5;
}

.dashboard-workspace-context {
  position: fixed;
  z-index: 1200;
  top: auto;
  bottom: 0;
  right: 0;
  left: 0;
  height: var(--workspace-context-height);
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr);
  align-items: center;
  padding: 0 clamp(12px, 1.5vw, 22px);
  border-top: 1px solid rgba(255, 255, 255, .13);
  background: rgba(4, 4, 4, .94);
  backdrop-filter: blur(18px);
  color: #aaa;
  font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.dashboard-workspace-context__home,
.dashboard-workspace-context__route { display: flex; align-items: center; gap: 9px; }
.dashboard-workspace-context__home { grid-column: 3; justify-self: end; width: max-content; min-height: var(--workspace-control-height); padding: 4px 0; border: 0; background: transparent; color: #9b9b9b; font: inherit; letter-spacing: inherit; text-decoration: none; text-transform: inherit; cursor: pointer; }
.dashboard-workspace-context__home:hover,
.dashboard-workspace-context__home:focus-visible,
.dashboard-workspace-context__home[aria-expanded='true'] { color: #fff; outline: none; }
.dashboard-workspace-context__home span:first-child { color: #fff; font-weight: 800; letter-spacing: .04em; }
.dashboard-workspace-context__route strong { color: #fff; font-weight: 700; }
.dashboard-workspace-context__route { grid-column: 2; grid-row: 1; justify-self: center; color: inherit; cursor: pointer; }
.dashboard-workspace-context__route:hover,
.dashboard-workspace-context__route:focus-visible { color: #fff; outline: none; }
.dashboard-workspace-context__route:hover .dashboard-workspace-context__symbol,
.dashboard-workspace-context__route:focus-visible .dashboard-workspace-context__symbol { border-color: #fff; }
.dashboard-workspace-context__symbol { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid #555; color: #fff; font-size: 12px; }
.dashboard-workspace-context__slash { color: #555; }
.dashboard-workspace-context__status { justify-self: end; display: flex; align-items: center; gap: 8px; }
.dashboard-workspace-context__utilities { grid-column: 1; grid-row: 1; justify-self: start; display: flex; align-items: center; gap: 14px; }
.dashboard-workspace-context__status i { width: 5px; height: 5px; border-radius: 50%; background: #eee; box-shadow: 0 0 8px #fff; }

body.bikenode-world-route .bikenode-main-layout-01-content {
  margin-top: 0 !important;
  min-height: calc(100dvh - var(--workspace-context-height)) !important;
  padding-top: 0;
  padding-bottom: calc(var(--workspace-context-height) + env(safe-area-inset-bottom));
}

body.bikenode-world-route .bikenode-route-stage {
  min-height: calc(100dvh - var(--workspace-context-height));
}

body.bikenode-world-route :is(a, a:visited, a:hover, a:focus, a:focus-visible, a:active) {
  text-decoration: none !important;
}

/* Keep workspace actions compact without shrinking icon-only touch targets below 36px. */
body.bikenode-world-workspace .bikenode-main-layout-01-content :is(button, [role='button'], a[class*='button'], a[class*='Button']) {
  min-height: var(--workspace-control-height);
}

body.bikenode-world-workspace .bikenode-main-layout-01-content :is(button, [role='button']):not([aria-label]):not([title]) {
  align-self: center !important;
  height: auto !important;
  max-height: var(--workspace-control-height) !important;
  min-height: var(--workspace-control-height) !important;
  padding-block: .4rem !important;
}

body.bikenode-world-workspace .bikenode-main-layout-01-content {
  background: radial-gradient(circle at 65% 30%, #171717 0, #080808 42%, #030303 100%);
}

body.bikenode-world-workspace .bikenode-main-layout-01-content > * {
  animation: workspace-node-enter .42s cubic-bezier(.2, .7, .2, 1) both;
}

body.bikenode-world-workspace .bikenode-main-layout-01-content button,
body.bikenode-world-workspace .bikenode-main-layout-01-content input,
body.bikenode-world-workspace .bikenode-main-layout-01-content textarea,
body.bikenode-world-workspace .bikenode-main-layout-01-content select {
  border-radius: 2px !important;
}

body.bikenode-world-workspace .bikenode-main-layout-01-content [class*="bg-blue-"] { background-color: #ededed !important; color: #050505 !important; }
body.bikenode-world-workspace .bikenode-main-layout-01-content [class*="text-blue-"] { color: #f3f3f3 !important; }
body.bikenode-world-workspace .bikenode-main-layout-01-content [class*="border-blue-"] { border-color: #e5e5e5 !important; }
body.bikenode-world-workspace .bikenode-main-layout-01-content [class*="accent-blue-"] { accent-color: #f3f3f3 !important; }

.rides-planner-world { height: calc(100svh - var(--workspace-context-height)) !important; isolation: isolate; }
.rides-planner-world__map { position: absolute !important; inset: 0; z-index: 0; }
.rides-planner-world__panel {
  position: absolute !important;
  z-index: 20;
  top: 18px;
  bottom: 18px;
  left: 18px;
  width: min(360px, calc(100vw - 36px)) !important;
  height: auto !important;
  padding: 22px !important;
  border: 1px solid rgba(255, 255, 255, .17) !important;
  background: rgba(5, 5, 5, .86) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5) !important;
  backdrop-filter: blur(20px);
}
.rides-planner-world__panel h1 { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px !important; letter-spacing: .08em; text-transform: uppercase; }
.rides-planner-world__panel h1::before { content: '⤴'; display: inline-grid; width: 28px; height: 28px; margin-right: 10px; place-items: center; border: 1px solid #777; }
.rides-planner-world__panel [class*="rounded-"] { border-radius: 2px !important; }
.rides-planner-world__empty { border-radius: 2px !important; margin-left: 185px; }

@keyframes workspace-node-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .dashboard-workspace-context { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 max(10px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); }
  .dashboard-workspace-context__home { grid-column: 3; }
  .dashboard-workspace-context__home span:last-child,
  .dashboard-workspace-context__status { display: none; }
  .dashboard-workspace-context__utilities { gap: 8px; }
  .dashboard-workspace-context__route { justify-self: center; min-width: 0; white-space: nowrap; overflow: hidden; }
  .dashboard-workspace-context__route strong { overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 620px) {
  .rides-planner-world__panel {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto !important;
    max-height: 48svh;
    padding: 18px !important;
  }
  .rides-planner-world__empty { top: 28% !important; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body.bikenode-world-workspace .bikenode-main-layout-01-content > * { animation: none; }
}
