/* Sauron Intelligence — Fitted 3D CAD & Engineering Aircraft Studio Environment */

.aircraft-stage-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--aircraft-surface, #ffffff);
  border: 1px solid var(--line, #d6d1ca);
  position: relative;
}

.aircraft-hero > .aircraft-stage-shell .aircraft-visual,
.aircraft-hero > .aircraft-stage-shell .aircraft-gallery {
  border: 0;
}

.aircraft-stage-shell .aircraft-visual {
  background: var(--aircraft-surface, #ffffff);
  padding: 28px;
}

.aircraft-stage-shell .aircraft-gallery-slide {
  border: 0;
  background: var(--aircraft-surface, #ffffff);
}

.aircraft-stage-shell .aircraft-gallery-controls {
  margin-top: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line, #d6d1ca);
  background: #f6f4ef;
}

.aircraft-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #f6f4ef;
  border-bottom: 1px solid var(--line, #d6d1ca);
}

.aircraft-stage-tabs {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cdc7bf;
  background: #ebe7e0;
  padding: 2px;
  gap: 2px;
}

.aircraft-stage-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #5b5751;
  font: 700 9px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.18s ease, color 0.18s ease;
}

.aircraft-stage-tab:hover {
  color: var(--black, #171717);
}

.aircraft-stage-tab[aria-selected="true"] {
  background: var(--black, #171717);
  color: var(--bone, #f1eee8);
}

.aircraft-stage-tab[data-stage-mode="3d"][aria-selected="true"] {
  background: var(--red, #8e1118);
  color: #ffffff;
}

.aircraft-stage-tab svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.aircraft-stage-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aircraft-media-pane {
  position: relative;
  min-width: 0;
}

.aircraft-media-pane[hidden] {
  display: none !important;
}

.aircraft-open-3d-floating {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: rgba(23, 23, 23, 0.92);
  color: #f1eee8;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font: 700 9px/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.aircraft-gallery .aircraft-open-3d-floating {
  bottom: 66px;
}

.aircraft-open-3d-floating:hover {
  background: var(--red, #8e1118);
  border-color: var(--red, #8e1118);
  transform: translateY(-1px);
}

.aircraft-open-3d-floating svg {
  width: 14px;
  height: 14px;
}

/* Clean Studio Background for 3D Studio & Cards */
.aircraft-3d-pane,
.aircraft-card-3d-stage {
  background: radial-gradient(circle at 50% 44%, #f7f5f0 0%, #eae5dc 62%, #dad4c8 100%);
}

/* 3D Viewport Container on Detail Pages */
.aircraft-3d-pane {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 410px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.aircraft-3d-pane[hidden] {
  display: none !important;
}

.aircraft-3d-pane[data-theme="dark"] {
  background: radial-gradient(circle at 50% 44%, #252422 0%, #161615 64%, #0d0d0c 100%);
  color: #f1eee8;
}

/* Expanded / Theater Studio Mode */
.aircraft-stage-shell.is-expanded {
  position: fixed;
  inset: 18px;
  z-index: 1200;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
  display: flex;
  flex-direction: column;
  background: #f6f4ef;
}

.aircraft-stage-shell.is-expanded .aircraft-3d-pane {
  flex: 1 1 auto;
  aspect-ratio: auto;
  height: 100%;
  min-height: 0;
}

.aircraft-3d-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(12, 12, 12, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.aircraft-3d-backdrop[hidden] {
  display: none !important;
}

.aircraft-3d-canvas-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  z-index: 1;
}

.aircraft-3d-canvas-wrap:active {
  cursor: grabbing;
}

.aircraft-3d-canvas-wrap[data-drag-mode="pan"] {
  cursor: move;
}

.aircraft-3d-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
}

/* Minimal Sleek Controls */
.aircraft-3d-pill {
  appearance: none;
  border: 1px solid rgba(23, 23, 23, 0.14);
  background: rgba(250, 249, 247, 0.88);
  color: #292724;
  font: 700 8.5px/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 7px 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.aircraft-3d-pill:hover {
  border-color: var(--black, #171717);
  background: #ffffff;
}

.aircraft-3d-pill[aria-pressed="true"],
.aircraft-3d-pill.is-active {
  background: var(--black, #171717);
  color: #f1eee8;
  border-color: var(--black, #171717);
}

.aircraft-3d-pane[data-theme="dark"] .aircraft-3d-pill {
  background: rgba(24, 24, 23, 0.84);
  color: #d7d2ca;
  border-color: rgba(255, 255, 255, 0.14);
}

.aircraft-3d-pane[data-theme="dark"] .aircraft-3d-pill:hover {
  border-color: #f1eee8;
  color: #ffffff;
}

.aircraft-3d-pane[data-theme="dark"] .aircraft-3d-pill[aria-pressed="true"],
.aircraft-3d-pane[data-theme="dark"] .aircraft-3d-pill.is-active {
  background: var(--red, #8e1118);
  color: #ffffff;
  border-color: var(--red, #8e1118);
}

.aircraft-3d-hud-bottom {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.aircraft-3d-toolbar {
  pointer-events: auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: rgba(250, 249, 247, 0.88);
  border: 1px solid rgba(23, 23, 23, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.aircraft-3d-pane[data-theme="dark"] .aircraft-3d-toolbar {
  background: rgba(20, 20, 19, 0.84);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Interactive Hover 3D Preview on Main View & Catalog Cards */
.aircraft-card-3d-stage {
  position: relative;
  overflow: hidden;
}

.aircraft-card-3d-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.aircraft-card-3d-stage.is-3d-ready .aircraft-card-3d-wrap {
  opacity: 1;
}

.aircraft-card-3d-stage.is-3d-ready > img {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.aircraft-card-3d-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.aircraft-card-3d-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: rgba(250, 249, 247, 0.88);
  border: 1px solid rgba(23, 23, 23, 0.15);
  color: #292724;
  font: 700 7.5px/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.aircraft-card-3d-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red, #8e1118);
}

.aircraft-card-3d-stage.is-hovering .aircraft-card-3d-badge {
  background: rgba(23, 23, 23, 0.92);
  color: #f1eee8;
  border-color: rgba(23, 23, 23, 0.92);
}

.aircraft-card-3d-stage.is-hovering .aircraft-card-3d-badge::before {
  background: #ff4d57;
}

/* Loading & Drag-Drop Overlay */
.aircraft-3d-status {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: rgba(246, 244, 239, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.25s ease;
}

.aircraft-3d-pane[data-theme="dark"] .aircraft-3d-status {
  background: rgba(18, 18, 17, 0.82);
}

.aircraft-3d-status[hidden] {
  display: none !important;
}

.aircraft-3d-status-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  background: var(--white, #faf9f7);
  border: 1px solid var(--line, #d6d1ca);
  font: 700 9px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black, #171717);
}

.aircraft-3d-progress-track {
  width: 140px;
  height: 2px;
  background: #dbd6ce;
  overflow: hidden;
}

.aircraft-3d-progress-bar {
  width: 35%;
  height: 100%;
  background: var(--red, #8e1118);
  transition: width 0.15s ease;
}

.aircraft-3d-pane.is-dragover::after {
  content: "DROP 3D MODEL FILE (.GLB / .FBX / .STL / .OBJ)";
  position: absolute;
  inset: 14px;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(142, 17, 24, 0.9);
  color: #ffffff;
  border: 1px dashed #ffffff;
  font: 700 11px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-align: center;
  padding: 24px;
}

@media (max-width: 680px) {
  .aircraft-stage-bar {
    padding: 8px 10px;
  }
  .aircraft-3d-pane {
    min-height: 340px;
  }
  .aircraft-stage-shell.is-expanded {
    inset: 0;
  }
}

/* Clean Studio Capture Mode (?studio_capture=1) */
html.is-studio-capture,
html.is-studio-capture body {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #eae5dc !important;
}

html.is-studio-capture .site-header,
html.is-studio-capture .site-footer,
html.is-studio-capture .aircraft-stage-bar,
html.is-studio-capture .aircraft-3d-hud-bottom,
html.is-studio-capture .aircraft-3d-status {
  display: none !important;
}

html.is-studio-capture .aircraft-stage-shell {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
}

html.is-studio-capture .aircraft-3d-pane {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  aspect-ratio: auto !important;
}
