@charset "UTF-8";
/* ==========================================================================
   DirectChina Sourcing | carbix.store - Architectural UX & CSS Design System
   File: css/custom.css
   Architecture & UI Foundation for sourcing.carbix.store
   ========================================================================== */

@import url('styles.css');

/* --------------------------------------------------------------------------
   1. Design Tokens & Visual Hierarchy Overrides
   -------------------------------------------------------------------------- */
:root {
  --brand-blue-glow: rgba(37, 99, 235, 0.25);
  --brand-emerald-glow: rgba(16, 185, 129, 0.25);
  --tooltip-bg: #0F172A;
  --tooltip-text: #F8FAFC;
  --tooltip-border: rgba(255, 255, 255, 0.12);
  --slider-track-empty: #E2E8F0;
  --slider-track-fill: #2563EB;
}

.dark {
  --brand-blue-glow: rgba(37, 99, 235, 0.4);
  --brand-emerald-glow: rgba(16, 185, 129, 0.35);
  --tooltip-bg: #1E293B;
  --tooltip-text: #F8FAFC;
  --tooltip-border: rgba(255, 255, 255, 0.16);
  --slider-track-empty: #1E293B;
  --slider-track-fill: #3B82F6;
}

/* --------------------------------------------------------------------------
   2. Pure CSS Tooltip System (Zero Layout Shift, High Performance)
   -------------------------------------------------------------------------- */
.ux-tooltip-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  outline: none;
}

.ux-tooltip-trigger:focus-visible {
  ring: 2px solid var(--primary-500);
  border-radius: 9999px;
}

.ux-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--tooltip-border);
  white-space: normal;
  width: max-content;
  max-width: 230px;
  z-index: 60;
  text-align: center;
}

.ux-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--tooltip-bg) transparent transparent transparent;
}

.ux-tooltip-trigger:hover .ux-tooltip,
.ux-tooltip-trigger:focus .ux-tooltip,
.ux-tooltip-trigger:focus-within .ux-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   3. Interactive Quantity Presets & Micro-interactions
   -------------------------------------------------------------------------- */
.calc-preset-chip {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.calc-preset-chip:hover {
  transform: translateY(-1px);
}

.calc-preset-chip.active {
  background-color: #2563EB !important;
  color: #FFFFFF !important;
  border-color: #2563EB !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.dark .calc-preset-chip.active {
  background-color: #3B82F6 !important;
  border-color: #3B82F6 !important;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.45);
}

/* --------------------------------------------------------------------------
   4. Reactive Metric Highlight Pulse (Value Updates)
   -------------------------------------------------------------------------- */
@keyframes metricValuePulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.05);
    color: #2563EB;
  }
  100% {
    transform: scale(1);
  }
}

.metric-pulse {
  display: inline-block;
  animation: metricValuePulse 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   5. Anti-CLS Form Wizard & Smooth Stepper Animations
   -------------------------------------------------------------------------- */
#rfq-card {
  /* Stabilize layout bounding box across step progressions */
  min-height: 520px;
}

.rfq-step {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.rfq-step.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Animated Field Validation Error with Height Cushion */
.field-error-msg {
  display: flex;
  align-items: center;
  gap: 4px;
  animation: errorSlideDown 0.22s ease-out forwards;
}

@keyframes errorSlideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 30px;
  }
}

/* --------------------------------------------------------------------------
   6. Hero Elevation & Button Hover Glow Physics
   -------------------------------------------------------------------------- */
.btn-hero-primary {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -4px rgba(37, 99, 235, 0.55);
}

.btn-hero-secondary {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.dark .btn-hero-secondary:hover {
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   7. Live Ground Radar Indicator
   -------------------------------------------------------------------------- */
.live-ground-pill {
  box-shadow: 0 2px 10px -2px rgba(37, 99, 235, 0.15);
  transition: all 0.3s ease;
}

.live-ground-pill:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 4px 14px -2px rgba(37, 99, 235, 0.25);
}
