/* hold-canvas.css - the aircraft hold picture. A glass / x-ray look: dark navy canvas, translucent fuselage with ribs, blue container blocks
   with a panel grid and a round position badge. Light theme = the same picture on a pale canvas. Theme follows the app's [data-theme]. */
.hc {
  position: relative;
  --hc-bg: linear-gradient(180deg, #f7faff 0%, #e8effa 100%);
  --hc-text: #14213d; --hc-muted: #5b6b8a; --hc-line: #c6d3ea; --hc-strong: #8aa0c8; --hc-surface: #ffffff;
  --hc-fus-a: rgba(80, 120, 210, .08); --hc-fus-b: rgba(80, 120, 210, .02); --hc-fus-stroke: #7f95bf; --hc-rib: rgba(70, 100, 170, .22); --hc-cockpit: rgba(40, 70, 140, .4);
  --hc-wing-a: rgba(90, 125, 200, .20); --hc-wing-b: rgba(90, 125, 200, .04); --hc-wing-stroke: rgba(80, 110, 180, .45);
  --hc-unit-base: #cdd9ff; --hc-grid: rgba(30, 60, 140, .2); --hc-slot-fill: rgba(70, 110, 200, .05);
  --hc-low: #4f6df5; --hc-mid: #2f7df6; --hc-high: #12a4bd; --hc-full: #16a34a; --hc-over: #dc2626; --hc-accent: #2563eb; --hc-ok: #16a34a;
}
[data-theme="dark"] .hc {
  --hc-bg: radial-gradient(ellipse at 55% 35%, #1b2c52 0%, #0e1830 52%, #080e1c 100%);
  --hc-text: #e9efff; --hc-muted: #8ea2c9; --hc-line: rgba(150, 180, 255, .2); --hc-strong: rgba(170, 200, 255, .5); --hc-surface: #0f1a33;
  --hc-fus-a: rgba(130, 170, 255, .16); --hc-fus-b: rgba(25, 40, 85, .38); --hc-fus-stroke: rgba(180, 208, 255, .8); --hc-rib: rgba(170, 200, 255, .16); --hc-cockpit: rgba(10, 18, 40, .8);
  --hc-wing-a: rgba(120, 155, 235, .26); --hc-wing-b: rgba(40, 60, 120, .06); --hc-wing-stroke: rgba(160, 190, 255, .35);
  --hc-unit-base: #17316f; --hc-grid: rgba(255, 255, 255, .2); --hc-slot-fill: rgba(40, 70, 150, .22);
  --hc-low: #5878ff; --hc-mid: #3b8bff; --hc-high: #22bfd6; --hc-full: #22c55e; --hc-over: #f05252; --hc-accent: #7aa2ff; --hc-ok: #34d399;
}
.hc-scroll { overflow: auto; outline: none; border-radius: 16px; background: var(--hc-bg); border: 1px solid var(--hc-line); }
.hc-scroll:focus-visible { box-shadow: 0 0 0 2px var(--hc-accent); }
.hc-svg { display: block; touch-action: none; user-select: none; -webkit-user-select: none; font-family: var(--font-sans, system-ui, sans-serif); }

.hc-deck-title { font-size: 12px; font-weight: 600; fill: var(--hc-text); letter-spacing: .02em; }
.hc-end { font-size: 9.5px; fill: var(--hc-muted); }
.hc-fus-stop-a { stop-color: var(--hc-fus-a); } .hc-fus-stop-b { stop-color: var(--hc-fus-b); }
.hc-wing-stop-a { stop-color: var(--hc-wing-a); } .hc-wing-stop-b { stop-color: var(--hc-wing-b); }
.hc-fus { fill: none; stroke: var(--hc-fus-stroke); stroke-width: 1.5; }
.hc-fus-fill { fill: url(#hc-fus-grad); stroke: none; pointer-events: none; }
.hc-floor { fill: var(--hc-surface); opacity: .28; pointer-events: none; }
.hc-rib { stroke: var(--hc-rib); stroke-width: 1; pointer-events: none; }
.hc-rib.centre { stroke-dasharray: 2 6; }
.hc-cockpit { fill: var(--hc-cockpit); stroke: var(--hc-fus-stroke); stroke-width: .8; pointer-events: none; }
.hc-wing { fill: url(#hc-wing-grad); stroke: var(--hc-wing-stroke); stroke-width: 1; }
.hc-engine { fill: var(--hc-wing-a); stroke: var(--hc-wing-stroke); }
.hc-engine-fan { fill: var(--hc-fus-b); stroke: var(--hc-wing-stroke); }
.hc-zone { fill: none; stroke: var(--hc-line); stroke-dasharray: 3 5; }
.hc-zone-label { font-size: 10px; fill: var(--hc-muted); }
.hc-blocked-rect { fill: var(--hc-slot-fill); stroke: var(--hc-strong); stroke-dasharray: 2 3; }
.hc-blocked-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; fill: var(--hc-muted); pointer-events: none; }
.hc-hatch-line { fill: rgba(255, 255, 255, .5); }
.hc-hatch-dark-line { fill: var(--hc-strong); opacity: .35; }
.hc-grid-line { stroke: var(--hc-grid); stroke-width: 1; }

/* loading positions */
.hc-slot-rect { fill: var(--hc-slot-fill); stroke: var(--hc-strong); stroke-width: 1; stroke-dasharray: 4 3; }
.hc-slot-grid { pointer-events: none; opacity: .55; }
.hc-slot.occ .hc-slot-rect { stroke-opacity: .25; fill: transparent; }
.hc-slot:hover .hc-slot-rect { stroke: var(--hc-accent); stroke-dasharray: none; }
.hc-slot.edit { cursor: move; }
.hc-slot.edit.sel .hc-slot-rect { stroke: var(--hc-accent); stroke-width: 2.4; stroke-dasharray: none; }
.hc-slot.edit.bad .hc-slot-rect { stroke: var(--hc-over); fill: rgba(220, 38, 38, .22); }
.hc-id { font-size: 8.5px; fill: var(--hc-muted); pointer-events: none; }
.hc-free { font-size: 8px; fill: var(--hc-muted); letter-spacing: .08em; pointer-events: none; opacity: .8; }
.hc-slot-no { font-size: 10.5px; font-weight: 700; fill: var(--hc-muted); pointer-events: none; opacity: .9; }

/* bulk compartment */
.hc-bulk-base { fill: var(--hc-slot-fill); stroke: var(--hc-strong); stroke-dasharray: 5 3; }
.hc-bulk.sel .hc-bulk-base { stroke: var(--hc-accent); stroke-width: 2.4; stroke-dasharray: none; }

/* containers */
.hc-unit { cursor: grab; }
.hc-unit-base { fill: var(--hc-unit-base); stroke: var(--hc-strong); stroke-width: 1; }
.hc-liq { fill: var(--hc-low); opacity: .9; transition: height .25s ease, y .25s ease; }
.hc-s-mid .hc-liq, .hc-liq.hc-s-mid { fill: var(--hc-mid); }
.hc-s-high .hc-liq, .hc-liq.hc-s-high { fill: var(--hc-high); }
.hc-s-full .hc-liq, .hc-liq.hc-s-full { fill: var(--hc-full); opacity: .96; }
.hc-s-over .hc-liq, .hc-liq.hc-s-over { fill: var(--hc-over); opacity: .96; }
.hc-s-full .hc-unit-base { stroke: var(--hc-full); stroke-width: 1.8; }
.hc-s-over .hc-unit-base { stroke: var(--hc-over); stroke-width: 1.8; }
.hc-unit-grid { pointer-events: none; opacity: .7; }
.hc-badge-c { fill: rgba(255, 255, 255, .22); stroke: rgba(255, 255, 255, .8); stroke-width: 1; pointer-events: none; }
[data-theme="light"] .hc .hc-badge-c, .hc .hc-badge-c { }
.hc-badge-t { font-weight: 700; fill: #fff; pointer-events: none; paint-order: stroke; stroke: rgba(10, 20, 50, .55); stroke-width: 2.4px; stroke-linejoin: round; }
.hc-pct { font-size: 10px; font-weight: 700; fill: #fff; paint-order: stroke; stroke: rgba(10, 20, 50, .7); stroke-width: 2.6px; stroke-linejoin: round; pointer-events: none; }
.hc-badge { font-size: 10px; font-weight: 800; fill: #fff; paint-order: stroke; stroke: rgba(10, 20, 50, .6); stroke-width: 2.4px; pointer-events: none; }
.hc-unit.sel .hc-unit-base { stroke: #fff; stroke-width: 2.6; }
.hc-unit.sel { filter: drop-shadow(0 0 6px rgba(120, 160, 255, .9)); }
.hc-unit.dim { opacity: .14; }
.hc-unit.carried { opacity: .22; }
.hc-unit.dragging { cursor: grabbing; pointer-events: none; opacity: .97; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); }
.hc-unit.dragging.bad .hc-unit-base { stroke: var(--hc-over); stroke-width: 2.6; }
.hc-unit.dragging.ok .hc-unit-base { stroke: var(--hc-ok); stroke-width: 2.6; }
.hc-unit.shake { animation: hc-shake .4s; }
@keyframes hc-shake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

.hc-ghost { fill: rgba(34, 197, 94, .14); stroke: var(--hc-ok); stroke-width: 2; stroke-dasharray: 6 3; pointer-events: none; }
.hc-ghost.bad { fill: rgba(240, 82, 82, .2); stroke: var(--hc-over); }
.hc-ghost.snapped { stroke-dasharray: none; fill: rgba(34, 197, 94, .24); }
.hc-tray-box { fill: none; stroke: var(--hc-line); stroke-dasharray: 5 4; }

.hc-tip { position: absolute; z-index: 5; pointer-events: none; background: rgba(8, 14, 30, .94); color: #e9efff; padding: 8px 11px; border-radius: 10px; font-size: 12px; line-height: 1.5;
          max-width: 250px; border: 1px solid rgba(150, 180, 255, .3); box-shadow: 0 10px 28px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .08s; direction: ltr; text-align: left; backdrop-filter: blur(6px); }
@media (prefers-reduced-motion: reduce) { .hc-liq { transition: none; } .hc-unit.shake { animation: none; } }
