/*
  Map tablet boundary.
  This file is the only tablet-specific Map layout layer. It is loaded after
  the shared design system and applies only when graph.html sets
  html.map-layout-tablet. Desktop stays in graph-desktop.*; mobile stays in
  graph-mobile.css.
*/

html.map-layout-tablet,
html.map-layout-tablet body {
  overflow-x: hidden !important;
}

html.map-layout-tablet .graph-shell {
  box-sizing: border-box !important;
  width: min(100%, 820px) !important;
  max-width: min(100%, 820px) !important;
  margin-inline: auto !important;
  gap: 8px !important;
  padding: 10px 12px 24px !important;
  overflow-x: hidden !important;
}

html.map-layout-tablet .graph-shell > *,
html.map-layout-tablet .graph-shell .mobile-map-panel,
html.map-layout-tablet .graph-shell .graph-workbench,
html.map-layout-tablet .graph-shell .map-panel,
html.map-layout-tablet .graph-shell .right-panel,
html.map-layout-tablet .graph-shell .selected-card {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

html.map-layout-tablet .graph-shell > .site-nav,
html.map-layout-tablet .graph-shell .graph-intro,
html.map-layout-tablet .graph-shell .graph-command-bar,
html.map-layout-tablet .graph-shell .map-insight-deck,
html.map-layout-tablet .graph-shell .graph-controls,
html.map-layout-tablet .graph-shell .graph-next-panel,
html.map-layout-tablet .graph-shell .graph-data-footer {
  display: none !important;
}

html.map-layout-tablet .graph-shell > .topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 8px 0 4px !important;
  border: 0 !important;
}

html.map-layout-tablet .graph-shell > .topbar .eyebrow {
  display: none !important;
}

html.map-layout-tablet .graph-shell > .topbar h1 {
  margin: 0 !important;
  font-size: clamp(1.35rem, 4vw, 1.7rem) !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

html.map-layout-tablet .graph-shell .topbar-tools {
  margin-left: auto !important;
}

html.map-layout-tablet .graph-shell .language-switcher {
  min-height: 34px !important;
  padding: 3px 4px 3px 8px !important;
  border-radius: 10px !important;
}

html.map-layout-tablet .graph-shell .language-switcher span {
  display: none !important;
}

html.map-layout-tablet .graph-shell .graph-language-select {
  min-height: 28px !important;
  padding: 0 22px 0 8px !important;
  font-size: 0.72rem !important;
}

html.map-layout-tablet .graph-shell .mobile-map-panel {
  display: grid !important;
  gap: 6px !important;
  width: 100% !important;
  padding: 7px !important;
  border: 1px solid var(--color-border-strong) !important;
  border-radius: 12px !important;
  background: var(--color-surface) !important;
  box-shadow: 0 12px 30px rgb(15 23 42 / 0.08) !important;
}

html.map-layout-tablet .graph-shell .mobile-map-distance,
html.map-layout-tablet .graph-shell .mobile-map-tabs {
  display: none !important;
}

html.map-layout-tablet .graph-shell .mobile-map-controls {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 6px !important;
  align-items: end !important;
}

html.map-layout-tablet .graph-shell .mobile-map-search {
  grid-column: 1 / -1 !important;
}

html.map-layout-tablet .graph-shell .mobile-map-search span,
html.map-layout-tablet .graph-shell .mobile-map-axis span {
  display: none !important;
}

html.map-layout-tablet .graph-shell .mobile-map-panel input,
html.map-layout-tablet .graph-shell .mobile-map-panel select {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  border-radius: 10px !important;
  font-size: 0.76rem !important;
}

html.map-layout-tablet .graph-shell .mobile-filter-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 86px !important;
  min-height: 36px !important;
  padding-inline: 10px !important;
  border-radius: 10px !important;
  font-size: 0.72rem !important;
  white-space: nowrap !important;
}

html.map-layout-tablet .graph-shell .mobile-map-ruler {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

html.map-layout-tablet .graph-shell .mobile-map-ruler .ruler-button {
  min-height: 32px !important;
}

html.map-layout-tablet .graph-shell .graph-workbench {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.map-layout-tablet .graph-shell .map-panel {
  width: 100% !important;
  height: clamp(360px, 48dvh, 500px) !important;
  min-height: 360px !important;
  border: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: #071216 !important;
}

html.map-layout-tablet .graph-shell .canvas-stage,
html.map-layout-tablet .graph-shell #graphCanvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
  touch-action: none !important;
}

html.map-layout-tablet .graph-shell .map-head,
html.map-layout-tablet .graph-shell .map-guide,
html.map-layout-tablet .graph-shell .map-legend,
html.map-layout-tablet .graph-shell .nav-pad,
html.map-layout-tablet .graph-shell .graph-tooltip {
  display: none !important;
}

html.map-layout-tablet .graph-shell .left-panel.filter-drawer:not([open]) {
  display: none !important;
}

html.map-layout-tablet .graph-shell .left-panel.filter-drawer[open] {
  position: fixed !important;
  z-index: 80 !important;
  inset: auto 10px 10px !important;
  width: auto !important;
  max-width: none !important;
  max-height: min(78dvh, 620px) !important;
  overflow: auto !important;
  border: 1px solid var(--color-border-strong) !important;
  border-radius: 18px !important;
  padding: 12px !important;
  color: var(--color-text) !important;
  background: var(--color-surface) !important;
  box-shadow: 0 26px 80px rgb(15 23 42 / 0.24) !important;
}

html.map-layout-tablet .graph-shell .right-panel {
  display: block !important;
  position: static !important;
  width: 100% !important;
  margin: 8px 0 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.map-layout-tablet .graph-shell .right-panel .preset-section {
  display: none !important;
}

html.map-layout-tablet .graph-shell .selected-card {
  display: grid !important;
  align-content: start !important;
  width: 100% !important;
  min-height: 0 !important;
  max-height: min(33dvh, 280px) !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  border: 1px solid var(--color-border-strong) !important;
  border-radius: 15px !important;
  padding: 10px 12px 11px !important;
  color: var(--color-text) !important;
  background: var(--color-surface) !important;
  box-shadow: 0 14px 34px rgb(15 23 42 / 0.08) !important;
}

html.map-layout-tablet .graph-shell .selected-card::before,
html.map-layout-tablet .graph-shell .selected-card-kicker,
html.map-layout-tablet .graph-shell .selected-stage-ranks {
  display: none !important;
}

html.map-layout-tablet .graph-shell .selected-head {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 !important;
}

html.map-layout-tablet .graph-shell .selected-head .cover-wrap {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
}

html.map-layout-tablet .graph-shell .selected-title,
html.map-layout-tablet .graph-shell .selected-artist,
html.map-layout-tablet .graph-shell .selected-stage-line {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html.map-layout-tablet .graph-shell .selected-title {
  margin: 0 !important;
  color: var(--color-text) !important;
  font-size: 0.96rem !important;
  font-weight: 950 !important;
  line-height: 1.18 !important;
}

html.map-layout-tablet .graph-shell .selected-meta-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  margin-top: 3px !important;
}

html.map-layout-tablet .graph-shell .selected-artist,
html.map-layout-tablet .graph-shell .selected-stage-line {
  color: var(--color-text-muted) !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
}

html.map-layout-tablet .graph-shell .selected-type-icon {
  display: inline-flex !important;
}

html.map-layout-tablet .graph-shell .selected-stage-line {
  display: block !important;
  margin-top: 6px !important;
}

html.map-layout-tablet .graph-shell .selected-actions {
  display: block !important;
  margin-top: 8px !important;
}

html.map-layout-tablet .graph-shell .selected-actions .detail-link {
  width: fit-content !important;
  min-width: 104px !important;
  min-height: 36px !important;
  border-radius: 10px !important;
  padding-inline: 13px !important;
  font-size: 0.82rem !important;
}

html.map-layout-tablet .graph-shell .mobile-map-tools {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  margin-top: 8px !important;
}

html.map-layout-tablet .graph-shell .map-reading-callout {
  display: block !important;
  margin: 2px 2px 0 !important;
  border: 0 !important;
  padding: 0 !important;
  color: var(--color-text-muted) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.76rem !important;
  line-height: 1.6 !important;
}

html.map-layout-tablet .graph-shell .map-reading-callout strong {
  display: inline !important;
  margin-right: 6px !important;
  color: var(--color-text) !important;
}
