/* Custom Styling for Height Comparison Tool */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --chart-baseline-height: 28px;
  --chart-max-height: 440px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-font {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Comparison Stage Grid Background */
.comparison-stage {
  background-color: #fafbfc;
  background-image: 
    radial-gradient(circle at center, rgba(99, 102, 241, 0.03) 0%, transparent 70%),
    linear-gradient(to right, rgba(226, 232, 240, 0.45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.45) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
}

/* Studio Baseline Floor */
.stage-floor {
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  position: relative;
}

.stage-floor::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #3b82f6;
  opacity: 0.7;
}

/* Model Container Animations */
.model-wrapper {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  transform-origin: bottom center;
}

.model-wrapper:hover {
  transform: translateY(-4px);
}

.model-wrapper.anim-enter {
  animation: modelEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.model-wrapper.anim-leave {
  animation: modelExit 0.25s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes modelEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modelExit {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(25px) scale(0.9);
  }
}

/* Model SVG Shadow */
.model-shadow {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.22) 0%, rgba(15, 23, 42, 0) 70%);
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.model-wrapper:hover .model-shadow {
  transform: translateX(-50%) scale(1.15);
  opacity: 0.85;
}

/* SVG Silhouette Styling */
.human-silhouette {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
  transition: filter 0.2s ease;
  height: 100% !important;
  width: auto !important;
  max-width: none !important;
  display: block;
}

.model-wrapper:hover .human-silhouette {
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}

/* Uploaded Human Photo Styling */
.human-photo {
  height: 100% !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
  transition: filter 0.2s ease, transform 0.2s ease;
  display: block;
}

.model-wrapper:hover .human-photo {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
}

/* Tooltip Styling */
.model-tooltip {
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}

.model-wrapper:hover .model-tooltip,
.model-wrapper:focus-within .model-tooltip,
.model-wrapper.active .model-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

/* Model Pedestal & Grounding */
.model-pedestal {
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.model-wrapper:hover .model-pedestal {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.12);
}

/* Vertical Ruler Styles */
.ruler-container {
  border-right: 2px solid #cbd5e1;
}

.ruler-tick {
  position: absolute;
  right: 0;
  width: 10px;
  height: 1px;
  background-color: #94a3b8;
  transform: translateY(50%);
}

.ruler-tick.major {
  width: 16px;
  height: 1.5px;
  background-color: #475569;
}

.ruler-label {
  position: absolute;
  right: 20px;
  transform: translateY(50%);
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.ruler-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background-color: rgba(226, 232, 240, 0.85);
  pointer-events: none;
  z-index: 1;
}

.ruler-grid-line.major {
  background-color: rgba(203, 213, 225, 0.95);
  border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
}

/* Color Picker Swatch Ring */
.swatch-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.swatch-btn:hover {
  transform: scale(1.12);
}

.swatch-btn.selected {
  outline: 2.5px solid #2563eb;
  outline-offset: 2px;
  transform: scale(1.08);
}

/* Toast Notification */
.toast-msg {
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
