/* Isolated styles for the LibTV-compatible canvas suite.
   These selectors do not change legacy canvas elements. */

[data-grid-tool-menu] {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 92;
  width: 260px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 16px;
  background: #343537;
  box-shadow: 0 24px 64px rgb(0 0 0 / 46%);
  pointer-events: auto;
}

[data-story-script-submenu] {
  position: fixed !important;
  z-index: 160 !important;
  width: 330px !important;
  border: 1px solid #45474c !important;
  border-radius: 18px !important;
  background: #28292b !important;
  box-shadow: 0 28px 70px rgb(0 0 0 / 58%) !important;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

[data-story-script-node] {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  border: 1px solid #424448;
  border-radius: 16px;
  background: #292929;
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
}

[data-panorama-viewer] {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: grab;
  border-radius: 13px;
  background: #111317;
  color: #fff;
}

[data-panorama-viewer] > canvas {
  display: block;
}

[data-panorama-surface] {
  position: absolute;
  inset: 0;
}

[data-panorama-activate] {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(255 255 255 / 75%);
  font-size: 12px;
  pointer-events: none;
}

[data-panorama-viewer]:active {
  cursor: grabbing;
}

[data-panorama-orientation] {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  width: 94px;
  padding: 8px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 12px;
  background: rgb(48 50 55 / 88%);
  color: #fff;
  font-size: 10px;
  box-shadow: 0 10px 28px rgb(0 0 0 / 38%);
  pointer-events: none;
}

[data-shortcut-panel] {
  position: absolute;
  bottom: 82px;
  left: 50%;
  z-index: 96;
  width: min(1158px, calc(100vw - 48px));
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-50%);
  border: 1px solid #3e4045;
  border-radius: 24px;
  background: #2a2a2b;
  box-shadow: 0 30px 80px rgb(0 0 0 / 45%);
}

[data-shortcut-sections] {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

[data-shortcut-keycap] {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #505157;
  border-radius: 8px;
  background: #303134;
  color: #f1f2f4;
  font-size: 12px;
  font-weight: 500;
  box-shadow: inset 0 -1px 0 rgb(255 255 255 / 6%);
}

@media (min-width: 640px) {
  [data-shortcut-sections] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  [data-shortcut-sections] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  [data-story-script-submenu] {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
  }

  [data-shortcut-panel] {
    bottom: 72px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
  }
}
