/* ==========================================================================
   Takin Cyber - Interactive X-Ray & High-Tech Animation Stylesheet
   File: public/css/site-v2-interactive.css
   Strict Rule: Under 600 lines of modular, hardware-accelerated CSS
   ========================================================================== */

/* --- X-Ray Code Inspection Slider --- */
.xray-showcase-container {
  margin: 0 auto 36px;
  max-width: 980px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
}

.xray-browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-hairline);
  font-size: 0.8rem;
}

.xray-mac-dots, .xray-url-pill {
  direction: ltr;
}

.xray-mac-dots {
  display: flex;
  gap: 6px;
}

.xray-mac-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.xray-mac-dot.dot-red { background: #ef4444; } .xray-mac-dot.dot-yellow { background: #f59e0b; } .xray-mac-dot.dot-green { background: #10b981; }

.xray-url-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  padding: 4px 14px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 0.76rem;
  color: var(--text-secondary);
}
.xray-url-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xray-presets-bar {
  display: none !important;
}

.xray-preset-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.xray-preset-btn:hover {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.xray-preset-btn.active {
  background: #0f172a;
  color: #ffffff !important;
  border-color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

[data-theme="dark"] .xray-preset-btn.active {
  background: #10b981;
  color: #0f172a !important;
  border-color: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.xray-stage-wrap {
  position: relative;
  height: 535px;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

/* Layer 1: Normal Consumer Store View */
.xray-layer-normal {
  position: absolute;
  inset: 0;
  background: #fdfdfd;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 8px;
  box-sizing: border-box;
}

.xray-normal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  padding: 3px 8px;
  border-radius: 3px;
  border: none;
  border-right: 3px solid currentColor;
  font-size: 0.74rem;
  font-weight: 700;
  width: fit-content;
}

/* Note: Detailed boutique store & cyber layout styles are modularized in site-v2-store-simulation.css */

.xray-floating-accessibility-mock {
  position: absolute;
  bottom: 18px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  cursor: pointer;
}

/* Layer 2: Cyber Blueprint / X-Ray Layer */
.xray-layer-cyber {
  position: absolute;
  inset: 0;
  background: #080d1a;
  background-image: 
    linear-gradient(rgba(14, 165, 233, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  color: #e0f2fe;
  padding: 12px 20px;
  gap: 8px;
  box-sizing: border-box;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.xray-cyber-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: none;
  border-right: 3px solid #ef4444;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.74rem;
  font-weight: 700;
  width: fit-content;
}

/* Note: Cyber mirrored layout styles are modularized in site-v2-store-simulation.css */

/* Precision Hotspots / Radar Pins */
.xray-hotspot {
  position: absolute;
  cursor: pointer;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--transition-fast);
}

.xray-hotspot:hover {
  transform: scale(1.05);
}

.xray-hotspot.hotspot-tracking { top: 44px; left: 24px; }
.xray-hotspot.hotspot-cancellation { bottom: 10px; left: 24px; }
.xray-hotspot.hotspot-accessibility { bottom: 10px; right: 64px; }

.xray-hotspot-pin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px #ef4444;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  animation: radar-pulse 2s infinite ease-out;
  flex-shrink: 0;
}

@keyframes radar-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.xray-hotspot-chip {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(239, 68, 68, 0.6);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  color: #f1f5f9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.xray-hotspot-tag {
  color: #f87171;
  font-weight: 800;
  font-family: ui-monospace, monospace;
}

/* Divider Handle */
.xray-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
  cursor: ew-resize;
  z-index: 10;
  transform: translateX(-50%);
}

.xray-handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: grab;
}

.xray-handle-knob:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Telemetry Drawer Modal */
.xray-telemetry-drawer {
  background: #090e1a;
  border-top: 1px solid rgba(16, 185, 129, 0.3);
  padding: 14px 20px;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.xray-telemetry-title {
  color: #38bdf8;
  font-weight: 700;
}

/* Interactive Dossier Items */
.dossier-item {
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 8px 12px;
  margin: -8px -12px;
  border-radius: var(--radius-sm);
}

.dossier-item:hover {
  background: var(--bg-card);
  transform: translateX(-3px);
  box-shadow: var(--shadow-sm);
}

.dossier-telemetry-box {
  display: none;
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  animation: fadeIn 200ms ease;
}

.dossier-telemetry-box.active {
  display: block;
}

/* --- Statutory Pillar Cards Spotlight & Live Status --- */
.pillar-card {
  position: relative;
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.pillar-live-led {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #059669;
  margin-top: 8px;
}

.pillar-led-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: led-pulse 2s infinite ease-in-out;
}

@keyframes led-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* --- Report Interactive Turnkey Code & Copy Button --- */
.turnkey-code-wrap {
  margin-top: 10px;
  background: #0f172a;
  border-radius: 6px;
  padding: 8px 12px;
  border: 1px solid #1e293b;
}
.turnkey-code-label {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 4px;
}
.turnkey-code-block {
  margin: 0;
  padding: 0;
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #38bdf8;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.4;
}
[data-theme="dark"] .turnkey-code-wrap {
  background: #020617;
  border-color: #1e293b;
}

.btn-copy-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 6px;
}

.btn-copy-code:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.btn-copy-code.copied {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

/* --- Enhanced Scroll Reveal & Stagger Animations --- */
.reveal-on-scroll {
  transform: translateY(24px);
  transition: opacity 650ms cubic-bezier(0.16, 1, 0.3, 1), transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--stagger-idx, 0) * 80ms);
  will-change: opacity, transform;
}

.reveal-on-scroll:not(.is-revealed) {
  opacity: 0 !important;
  visibility: hidden !important;
}

.reveal-on-scroll.is-revealed {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
}

/* Note: Article reader modal styles are modularized in site-v2-article-modal.css */


@media (max-width: 768px) {
  .xray-browser-bar { padding: 8px 12px; }
  .xray-url-pill {
    max-width: 175px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  .xray-stage-wrap { height: 490px; }
  .xray-layer-normal,
  .xray-layer-cyber { padding: 12px; }
  .store-product-layout { grid-template-columns: 1fr; gap: 8px; }
  .store-shirt-icon { font-size: 1.6rem; margin: 2px 0; }
  .store-item-title { font-size: 0.88rem; }
  .store-perks-row, .store-mini-footer { display: none; }
  .store-side-col, .store-upsell-strip, .store-search-mock, .store-item-desc { display: none !important; }
  .cyber-side-col, .cyber-upsell-strip { display: none !important; }
  .xray-floating-accessibility-mock { bottom: 12px; right: 12px; }
  .xray-hotspot.hotspot-tracking { top: 52px; left: 12px; }
  .xray-hotspot.hotspot-cancellation { bottom: 14px; left: 12px; }
  .xray-hotspot.hotspot-accessibility { bottom: 14px; right: 12px; }
  .xray-hotspot-chip span:last-child { display: none; }
  .xray-telemetry-drawer {
    min-height: 112px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 10px 14px;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .xray-telemetry-title {
    font-size: 0.78rem;
    line-height: 1.2;
    margin: 0;
    flex-shrink: 0;
  }
  #xrayTelemetryText {
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 0;
  }
}
