/* Main screen foundation override layer.
   Loaded after style.css to refine main-screen structure without changing runtime behavior. */

/* Top dock: single unified surface with internal row divider only. */
#workspace-top-dock {
  background: rgba(16, 24, 36, 0.88);
  border: 1px solid rgba(74, 91, 112, 0.5);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(2, 6, 23, 0.16);
  overflow: clip;
}

#top-header,
#research-context-bar {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#research-context-bar {
  border-top: 1px solid rgba(74, 91, 112, 0.42);
}

/* Workspace grid: default rail/map; optional inspector with has-right-detail. */
#workspace-main {
  display: grid;
  grid-template-columns: var(--map-rail-width) minmax(0, 1fr);
  align-items: stretch;
  column-gap: 10px;
  min-height: 0;
}

#app-shell.has-right-detail #workspace-main {
  grid-template-columns: var(--map-rail-width) minmax(0, 1fr) auto;
}

/* Rail shell: docked grid child, not floating/absolute card. */
#explore-toolbar-shell {
  grid-column: 1;
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: var(--z-map-controls);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: none;
  padding: 8px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.map-tools-shell,
.top-actions-cluster {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Map remains hero surface in map column. */
#map-container {
  grid-column: 2;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

/* Optional inspector: matte region with divider, no card treatment. */
#app-shell.has-right-detail #detail-panel,
#detail-panel {
  grid-column: 3;
  align-self: stretch;
  height: auto;
  max-height: none;
  border: 0;
  border-left: 1px solid rgba(74, 91, 112, 0.52);
  border-radius: 0;
  box-shadow: none;
  background: rgba(14, 21, 33, 0.78);
}

/* Bottom dock: system zone; timeline content is not a capsule/card. */
#workspace-bottom-dock {
  background: rgba(14, 21, 33, 0.86);
  border-top: 1px solid rgba(74, 91, 112, 0.52);
}

#bottom-panel {
  width: 100%;
  max-width: none;
  min-height: var(--bottom-panel-height);
  margin: 0;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Keep mobile sheet behavior untouched by not overriding mobile detail mechanics. */
@media (max-width: 1180px) {
  #workspace-main {
    grid-template-columns: minmax(0, 1fr);
  }

  #detail-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  #explore-toolbar-shell {
    padding-top: 6px;
  }

  #bottom-panel {
    padding: 10px;
  }
}
