/* Feature workspace: equal-height sidebar + large preview + light tircha */
.feature-showcase {
  overflow: visible !important;
}

.feature-showcase .site-shell {
  overflow: visible !important;
}

.feature-showcase .mac-experience,
.crystal-site .feature-showcase .mac-experience {
  contain: none !important;
  content-visibility: visible !important;
  overflow: visible !important;
  perspective: 1600px !important;
  perspective-origin: 38% 42% !important;
  display: grid !important;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: clamp(20px, 3vw, 40px) !important;
  padding: 18px 4px 28px !important;
  transform-style: flat !important;
}

/* Compact left stack — matches window height */
.feature-showcase .mac-sidebar,
.crystal-site .feature-showcase .mac-sidebar {
  position: relative !important;
  z-index: 40 !important;
  height: 100% !important;
  align-self: stretch !important;
  align-content: stretch !important;
  padding: 4px 2px !important;
  gap: 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  /* Flat stack — preserve-3d + negative Z was burying lower tabs under the window */
  transform: perspective(1400px) rotateY(18deg) rotateZ(-1deg) !important;
  transform-origin: right center !important;
  transform-style: flat !important;
  pointer-events: auto !important;
  will-change: transform;
}

.feature-showcase .mac-sidebar::before {
  content: "";
  position: absolute;
  inset: -28px -36px -28px -20px;
  z-index: 0;
  border-radius: 36px;
  background:
    radial-gradient(circle at 30% 20%, rgba(9, 92, 255, 0.12), transparent 55%),
    radial-gradient(circle at 70% 90%, rgba(79, 70, 229, 0.08), transparent 50%);
  pointer-events: none;
}

/* Compact glossy bubbles */
.feature-showcase .mac-sidebar button,
.crystal-site .feature-showcase .mac-sidebar button {
  position: relative !important;
  z-index: 1 !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 0 12px 0 10px !important;
  border-radius: 14px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.95) !important;
  color: #24324a !important;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(232, 241, 255, 0.78) 45%, rgba(255, 255, 255, 0.88) 100%) !important;
  box-shadow:
    0 10px 22px rgba(20, 48, 110, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.45) !important;
  backdrop-filter: blur(18px) saturate(1.45) !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease !important;
}

/* 2D stagger only — no translateZ (it stole clicks from tabs 04+) */
.feature-showcase .mac-sidebar button:nth-child(1) { transform: translateX(0) !important; }
.feature-showcase .mac-sidebar button:nth-child(2) { transform: translateX(5px) !important; }
.feature-showcase .mac-sidebar button:nth-child(3) { transform: translateX(10px) !important; }
.feature-showcase .mac-sidebar button:nth-child(4) { transform: translateX(4px) !important; }
.feature-showcase .mac-sidebar button:nth-child(5) { transform: translateX(9px) !important; }
.feature-showcase .mac-sidebar button:nth-child(6) { transform: translateX(3px) !important; }
.feature-showcase .mac-sidebar button:nth-child(7) { transform: translateX(8px) !important; }
.feature-showcase .mac-sidebar button:nth-child(8) { transform: translateX(2px) !important; }
.feature-showcase .mac-sidebar button:nth-child(9) { transform: translateX(7px) !important; }
.feature-showcase .mac-sidebar button:nth-child(10) { transform: translateX(1px) !important; }
.feature-showcase .mac-sidebar button:nth-child(11) { transform: translateX(6px) !important; }
.feature-showcase .mac-sidebar button:nth-child(12) { transform: translateX(2px) !important; }

.feature-showcase .mac-sidebar button:hover {
  border-color: rgba(9, 92, 255, 0.35) !important;
  box-shadow: 0 14px 28px rgba(20, 60, 150, 0.18), 0 1px 0 #fff inset !important;
  transform: translateX(12px) scale(1.02) !important;
}

.feature-showcase .mac-sidebar button.active,
.crystal-site .feature-showcase .mac-sidebar button.active {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.75) !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.45), transparent 40%),
    linear-gradient(118deg, #4ea0ff 0%, #095cff 42%, #4f46e5 100%) !important;
  box-shadow:
    0 16px 36px rgba(9, 92, 255, 0.34),
    0 0 0 4px rgba(9, 92, 255, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.5) inset !important;
  transform: translateX(14px) scale(1.02) !important;
}

.feature-showcase .mac-sidebar button i {
  width: 26px !important;
  height: 26px !important;
  border-radius: 999px !important;
  background: linear-gradient(145deg, #fff, #d7e6ff) !important;
  color: #095cff !important;
  font-weight: 800 !important;
  font-size: 8px !important;
  box-shadow: 0 4px 10px rgba(30, 70, 160, 0.12), inset 0 1px 0 #fff !important;
}

.feature-showcase .mac-sidebar button.active i {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.22) !important;
}

.feature-showcase .mac-sidebar button span {
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1.15 !important;
}

.feature-showcase .mac-sidebar button b {
  color: #8fa0b8 !important;
  font-size: 13px !important;
}

.feature-showcase .mac-sidebar button.active span,
.feature-showcase .mac-sidebar button.active b {
  color: #fff !important;
}

/* Main panel — stretch equal to sidebar, bigger picture */
.feature-showcase .mac-window,
.crystal-site .feature-showcase .mac-window {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-self: stretch !important;
  height: 100% !important;
  min-height: 100% !important;
  border-radius: 24px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.98) !important;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(238, 245, 255, 0.95)) !important;
  box-shadow:
    0 32px 64px rgba(18, 45, 110, 0.16),
    0 1px 0 #fff inset !important;
  transform: perspective(1400px) rotateY(-10deg) rotateX(1.5deg) !important;
  transform-origin: left center !important;
  transform-style: flat !important;
  overflow: hidden !important;
  will-change: transform;
}

.feature-showcase .mac-titlebar {
  flex: 0 0 auto !important;
  background: linear-gradient(180deg, #fff, #f3f7ff) !important;
  border-bottom: 1px solid rgba(40, 80, 160, 0.1) !important;
}

.feature-showcase .mac-canvas {
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 10px 12px !important;
  place-items: stretch !important;
  background:
    radial-gradient(800px 260px at 15% 0%, rgba(9, 92, 255, 0.08), transparent 55%),
    linear-gradient(180deg, #f4f8ff, #e9f0ff) !important;
}

/* Kill 16:9 cap — picture fills the tall equal panel */
.feature-showcase .mac-canvas .feature-canvas,
.feature-showcase .mac-canvas .feature-canvas.is-dashboard,
.feature-showcase .mac-canvas .feature-canvas.is-realistic {
  aspect-ratio: auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  flex: 1 1 auto !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

.feature-showcase .mac-canvas .feature-canvas > img,
.feature-showcase .mac-canvas .feature-canvas.is-dashboard > img,
.feature-showcase .mac-canvas .feature-canvas.is-realistic > img {
  max-height: none !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: top center !important;
}

.feature-showcase .mac-benefits,
.feature-showcase .mac-navigation {
  flex: 0 0 auto !important;
}

.feature-showcase .mac-navigation button {
  border-radius: 999px !important;
  border: 1px solid rgba(9, 92, 255, 0.18) !important;
  background: linear-gradient(145deg, #fff, #e8f0ff) !important;
  box-shadow: 0 8px 18px rgba(24, 55, 120, 0.08) !important;
}

@media (max-width: 1100px) {
  .feature-showcase .mac-experience {
    perspective: 1400px !important;
    gap: 18px !important;
    grid-template-columns: minmax(190px, 220px) minmax(0, 1fr) !important;
  }
  .feature-showcase .mac-sidebar {
    transform: rotateY(16deg) rotateZ(-1deg) !important;
  }
  .feature-showcase .mac-window {
    transform: rotateY(-9deg) rotateX(1.5deg) !important;
  }
  .feature-showcase .mac-sidebar button {
    min-height: 40px !important;
  }
}

@media (max-width: 900px) {
  .feature-showcase .mac-experience {
    perspective: none !important;
    grid-template-columns: 1fr !important;
    align-items: start !important;
  }
  .feature-showcase .mac-sidebar,
  .feature-showcase .mac-window,
  .feature-showcase .mac-sidebar button,
  .feature-showcase .mac-sidebar button:nth-child(n),
  .feature-showcase .mac-sidebar button.active,
  .feature-showcase .mac-sidebar button:hover {
    transform: none !important;
  }
  .feature-showcase .mac-window {
    height: auto !important;
    min-height: 0 !important;
  }
  .feature-showcase .mac-canvas {
    min-height: 280px !important;
  }
  .feature-showcase .mac-canvas .feature-canvas,
  .feature-showcase .mac-canvas .feature-canvas.is-dashboard {
    min-height: 260px !important;
    aspect-ratio: 16 / 10 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-showcase .mac-sidebar,
  .feature-showcase .mac-window,
  .feature-showcase .mac-sidebar button {
    transform: none !important;
    transition: none !important;
  }
}
