/* Hallmark · v2.0.0 · theme: financial-editorial · critique: DesignBookmark springs mapped cleanly onto AllPrice tokens */
:root {
  --db-burst-a: #12b886;
  --db-burst-b: #f59f00;
  --db-burst-c: #ff4d6d;
  --db-burst-d: #3ec9ff;
  --db-focus-ring: rgba(18, 184, 134, 0.22);
}

[data-theme="light"] {
  --db-burst-a: #099268;
  --db-burst-b: #e67700;
  --db-burst-c: #e0315a;
  --db-burst-d: #1c7ed6;
  --db-focus-ring: rgba(9, 146, 104, 0.20);
}

/* Override static CSS transition when DesignBookmark two-spring engine owns the pill */
.sliding-indicator.db-spring-pill,
.mob-sub-pill.db-spring-pill,
.mobile-dock-pill.db-spring-pill,
.comm-tab-pill.db-spring-pill,
.re-pill.db-spring-pill,
.salary-tab-pill.db-spring-pill,
.salary-seg-pill.db-spring-pill,
.crypto-compare-pill.db-spring-pill {
  transition: opacity 160ms ease !important;
  will-change: transform;
}

/* Mobile Dock & Community Tabs Two-Spring Stretchy Pills (DesignBookmark) */
.mobile-dock-pill {
  position: absolute;
  top: 5px;
  bottom: calc(5px + env(safe-area-inset-bottom));
  left: 0;
  border-radius: 10px;
  background: var(--accent-soft, rgba(16, 185, 129, 0.14));
  border: 1px solid var(--accent-border, rgba(16, 185, 129, 0.28));
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  will-change: transform, width;
}

.mobile-bottom-nav .mobile-dock-btn {
  position: relative;
  z-index: 1;
}

.mobile-bottom-nav .mobile-dock-btn.active {
  background-color: transparent !important;
}

.comm-tabs {
  position: relative;
}

.comm-tab-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: 7px;
  background-color: var(--bg-raised);
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  will-change: transform, width;
}

.comm-tabs .comm-tab-btn {
  position: relative;
  z-index: 1;
}

.comm-tabs .comm-tab-btn.active {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Staggered Spring Card Entrance & View Transition (DesignBookmark spring curve) */
.db-stagger-in {
  animation: dbSpringCardIn 380ms cubic-bezier(0.22, 1, 0.36, 1) var(--db-stagger-delay, 0ms) both;
}

.db-view-enter {
  animation: dbSpringViewIn 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes dbSpringCardIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes dbSpringViewIn {
  0% {
    opacity: 0.35;
    transform: translate3d(0, 6px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Spring Dropdown entrance (replaces hard display swap cleanly with transform + opacity) */
.unit-dropdown-trigger .unit-dropdown-caret {
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.unit-dropdown-trigger[aria-expanded="true"] .unit-dropdown-caret {
  transform: rotate(180deg);
}

.unit-dropdown-menu.db-dd-anim {
  transform-origin: top center;
  animation: dbDropdownIn 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.unit-dropdown-menu.db-dd-anim .unit-menu-item {
  animation: dbDropdownRow 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.unit-dropdown-menu.db-dd-anim .unit-menu-item:nth-child(1) { animation-delay: 20ms; }
.unit-dropdown-menu.db-dd-anim .unit-menu-item:nth-child(2) { animation-delay: 44ms; }
.unit-dropdown-menu.db-dd-anim .unit-menu-item:nth-child(3) { animation-delay: 68ms; }
.unit-dropdown-menu.db-dd-anim .unit-menu-item:nth-child(4) { animation-delay: 92ms; }
.unit-dropdown-menu.db-dd-anim .unit-menu-item:nth-child(5) { animation-delay: 116ms; }

@keyframes dbDropdownIn {
  0% {
    opacity: 0;
    transform: translateY(-6px) scaleY(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

@keyframes dbDropdownRow {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Like Burst container & radial particle dots */
.db-burst-anchor {
  position: relative;
  overflow: visible;
}

.db-burst-ring {
  position: fixed;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2500;
}

.db-burst-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  will-change: transform, opacity;
}

/* Springy Input focus & invalid wave */
.cat-search-input:focus,
.mob-input:focus,
.re-input:focus,
.deal-input:focus {
  box-shadow: 0 0 0 3px var(--db-focus-ring);
}

.db-input-shake {
  animation: dbInputNope 420ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes dbInputNope {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  65% { transform: translateX(-3px); }
  85% { transform: translateX(2px); }
}

/* Copy Button morph & feedback pop */
.db-copy-pop {
  animation: dbPopTick 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes dbPopTick {
  0% { transform: scale(0.92); }
  55% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Tactile card press */
.cat-item-card,
.dash-card,
.re-stat-box,
.mob-stat-box {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 160ms ease;
}

.cat-item-card:active,
.re-cand-btn:active {
  transform: scale(0.985);
}

@media (prefers-reduced-motion: reduce) {
  .sliding-indicator.db-spring-pill,
  .mob-sub-pill.db-spring-pill,
  .re-pill.db-spring-pill,
  .salary-tab-pill.db-spring-pill,
  .salary-seg-pill.db-spring-pill,
  .salary-dist-seg,
  .unit-dropdown-trigger .unit-dropdown-caret,
  .cat-item-card,
  .dash-card,
  .re-stat-box,
  .mob-stat-box {
    transition-duration: 0.01ms !important;
  }

  .unit-dropdown-menu.db-dd-anim,
  .unit-dropdown-menu.db-dd-anim .unit-menu-item,
  .db-input-shake,
  .db-copy-pop,
  .db-stagger-in,
  .db-view-enter {
    animation-duration: 0.01ms !important;
  }
}
