/* Generated from Zperiod's element detail controls. */
.elem-nav-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8vw;
  max-width: 80px;
  min-width: 44px;
  background: transparent;
  border: none;
  z-index: 30;
  cursor: pointer;
  display: flex;
  align-items: center;
  pointer-events: auto;
  padding: 0;
  margin: 0;
}

.elem-nav-prev {
  left: 0;
  justify-content: flex-start;
}

.elem-nav-next {
  right: 0;
  justify-content: flex-end;
}

/* The actual icon shape inside the hidden button zone - semi-rounded rectangles */
.elem-nav-icon {
  width: 32px;
  height: 72px;
  background: rgba(0, 0, 0, 0.03); /* Lighter base */
  color: rgba(0, 0, 0, 0.4); /* Lighter arrow */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease-out, background 0.2s ease, color 0.2s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.elem-nav-prev .elem-nav-icon {
  border-radius: 0 16px 16px 0;
  transform: translateX(-20px) scale(0.95);
}

.elem-nav-next .elem-nav-icon {
  border-radius: 16px 0 0 16px;
  transform: translateX(20px) scale(0.95);
}

/* Show on hover of the wide zone */
.elem-nav-btn:hover .elem-nav-icon {
  opacity: 1;
  transform: translateX(0) scale(1);
  background: rgba(0, 0, 0, 0.07); /* Lighter hover */
  color: rgba(0, 0, 0, 0.7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.elem-nav-btn:active .elem-nav-icon {
  transform: scale(0.96) !important;
  background: rgba(0, 0, 0, 0.12); /* Lighter active */
}

.elem-nav-btn:disabled {
  display: none !important;
}

.atom-bottom-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0;
  z-index: 220;
  height: 40px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--segment-track-bg);
  border: none;
  box-shadow: none;
  pointer-events: auto;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
:root[data-theme="dark"] .atom-bottom-controls {
  background: var(--segment-track-bg);
  box-shadow: none;
}

/* Pause/play segment of the fused pill. Same square footprint as a
   .modal-close button so the visual rhythm is consistent. */
.atom-bottom-pause {
  appearance: none;
  border: none;
  background: transparent;
  width: 36px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #4f5d75;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.atom-bottom-pause:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  transform: scale(1.08);
}
.atom-bottom-pause:active { transform: scale(0.92); }
:root[data-theme="dark"] .atom-bottom-pause { color: rgba(255, 255, 255, 0.85); }
:root[data-theme="dark"] .atom-bottom-pause:hover {
  background: #fff; color: #0a0a0e;
}

.atom-bottom-divider {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: rgba(0, 0, 0, 0.10);
  border-radius: 1px;
}

:root[data-theme="dark"] .atom-bottom-divider { background: rgba(255, 255, 255, 0.14); }

.atom-2d3d-toggle {
  display: inline-flex;
  align-items: center;
  position: relative;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  /* Sliding indicator positioned and sized via custom properties set in JS.
     Defaults match the 2D segment so it's correct on first render. */
  --indicator-x: 0px;
  --indicator-w: 44px;
}

.atom-2d3d-toggle::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--indicator-x);
  width: var(--indicator-w);
  height: 32px;
  border-radius: 999px;
  background: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  transition: left 0.32s cubic-bezier(0.5, 0.15, 0.2, 1),
              width 0.32s cubic-bezier(0.5, 0.15, 0.2, 1),
              background 0.2s ease;
  z-index: 0;
}

:root[data-theme="dark"] .atom-2d3d-toggle::before {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.atom-2d3d-opt {
  appearance: none;
  border: none;
  background: transparent;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  /* Sit above the sliding indicator (::before, z=0). */
  position: relative;
  z-index: 1;
  transition: color 0.22s ease, transform 0.1s ease;
  user-select: none;
}

.atom-2d3d-opt:hover { color: rgba(0, 0, 0, 0.85); }

.atom-2d3d-opt:active { transform: scale(0.94); }

.atom-2d3d-opt.active {
  /* Background is now the sliding indicator — only color flips here. */
  color: #ffffff;
  background: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] .atom-2d3d-opt { color: rgba(255, 255, 255, 0.55); }

:root[data-theme="dark"] .atom-2d3d-opt:hover { color: rgba(255, 255, 255, 0.92); }

:root[data-theme="dark"] .atom-2d3d-opt.active {
  color: #0a0a0e;
  background: transparent;
  box-shadow: none;
}

