/* ============================================================================
   Landing · 05 «Бюджет» — живая подсказка (T-1416)
   ----------------------------------------------------------------------------
   Слой не меняет канон секции: он рисуется поверх `.budget-wrap` и показывает,
   что коэффициенты и суммы в демо — настоящие поля, а не картинка.
   Всё вне потока: раскладка секции не сдвигается ни на пиксель.
   ========================================================================== */

.budget-wrap { position: relative; }

.wlh {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- стрелки ------------------------------------------------------- */

.wlh-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.wlh-line {
  fill: none;
  stroke: #0a1628;
  stroke-width: 2.1;
  stroke-linecap: round;
}

.wlh-line--halo {
  stroke: rgba(216, 250, 75, 0.6);
  stroke-width: 6.5;
  opacity: 0.38;
}

/* бегущая искра по стрелке — «нажмите сюда» */
.wlh-trail {
  fill: none;
  stroke: #14b8a6;
  stroke-width: 3.1;
  stroke-linecap: round;
  stroke-dasharray: 13 110;
  animation: wlh-travel 2.6s linear infinite;
}

@keyframes wlh-travel {
  from { stroke-dashoffset: 123; }
  to   { stroke-dashoffset: 0; }
}

.wlh-head { fill: #0a1628; }

.wlh-spark {
  fill: #14b8a6;
  stroke: #f2f3f0;
  stroke-width: 1.6;
  animation: wlh-spark 2.4s ease-in-out infinite;
}

@keyframes wlh-march {
  to { stroke-dashoffset: -13; }
}

@keyframes wlh-spark {
  0%, 100% { r: 3.2; }
  50%      { r: 4.6; }
}

/* ---------- мишени ------------------------------------------------------- */

.wlh-ring {
  position: absolute;
  border-radius: 8px;
  pointer-events: none;
  outline: 1.3px dashed rgba(10, 22, 40, 0.22);
  outline-offset: 2px;
}

.wlh-ring--hot {
  outline: 1.5px dashed rgba(20, 184, 166, 0.9);
  box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.32);
  animation: wlh-ping 2.4s ease-out infinite;
}

@keyframes wlh-ping {
  0%   { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.32); }
  70%  { box-shadow: 0 0 0 7px rgba(20, 184, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
}

/* ---------- стикеры ------------------------------------------------------ */

.wlh-tip {
  position: absolute;
  width: var(--wlh-w, 186px);
  transform: rotate(var(--wlh-rot, -4deg));
  transform-origin: 50% 60%;
  animation: wlh-sway 6.6s ease-in-out -0.2s infinite;
}

.wlh-tip--sum {
  --wlh-rot: 3.2deg;
  animation-delay: -3.3s;
}

@keyframes wlh-sway {
  0%, 100% { transform: rotate(var(--wlh-rot, -4deg)) translateY(0); }
  50%      { transform: rotate(calc(var(--wlh-rot, -4deg) + 2.1deg)) translateY(-2px); }
}

.wlh-card {
  position: relative;
  padding: 7px 11px 8px;
  border-radius: 10px;
  color: #f2f3f0;
  background: linear-gradient(158deg, #0a1628 0%, #0d3b4e 76%, #10525c 100%);
  border: 1px solid rgba(216, 250, 75, 0.5);
  box-shadow:
    0 16px 30px -20px rgba(10, 22, 40, 0.75),
    0 0 0 3px rgba(255, 255, 255, 0.82);
  animation: wlh-pop 0.5s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.wlh-tip--sum .wlh-card {
  background: linear-gradient(158deg, #0d3b4e 0%, #0a1628 80%, #081324 100%);
  animation-delay: 0.5s;
}

@keyframes wlh-pop {
  from { opacity: 0; transform: scale(0.92) translateY(5px); }
  to   { opacity: 1; transform: none; }
}

.wlh-kicker {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 700 7px/1 var(--mono, ui-monospace, "SF Mono", Menlo, monospace);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #d8fa4b;
  margin-bottom: 3px;
  white-space: nowrap;
}

.wlh-kicker i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d8fa4b;
  box-shadow: 0 0 0 2px rgba(216, 250, 75, 0.2);
  animation: wlh-blink 2s ease-in-out infinite;
}

@keyframes wlh-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.wlh-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #f2f3f0;
  white-space: nowrap;
}

.wlh-title b {
  font-weight: 700;
  color: #d8fa4b;
}

/* Отклик счёта: короткая подсветка карточки «кто кому должен»
   на каждое пересчитывание (срабатывает и после того, как подсказка ушла). */
.settle-card.is-wlh-flash {
  animation: wlh-flash 0.95s ease-out;
}

@keyframes wlh-flash {
  0%   { box-shadow: 0 0 0 0 rgba(216, 250, 75, 0.5), 0 18px 36px -16px rgba(10, 22, 40, 0.5); }
  40%  { box-shadow: 0 0 0 7px rgba(216, 250, 75, 0.18), 0 18px 36px -16px rgba(10, 22, 40, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(216, 250, 75, 0), 0 18px 36px -16px rgba(10, 22, 40, 0.5); }
}

.wlh.is-out { transition: opacity 0.34s ease; opacity: 0; }

/* ---------- компактный режим (узкие экраны) ------------------------------ */

.wlh-tip--compact {
  --wlh-rot: 0deg;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 14px;
  width: auto;
  max-width: none;
  animation: wlh-rise 0.5s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

@keyframes wlh-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.wlh-tip--compact .wlh-card {
  padding: 9px 14px;
  border-radius: 999px;
  text-align: center;
  box-shadow: 0 18px 34px -18px rgba(10, 22, 40, 0.85), 0 0 0 3px rgba(255, 255, 255, 0.7);
}

.wlh-tip--compact .wlh-title {
  font-size: 11.5px;
  white-space: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.wlh-tip--compact .wlh-title::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d8fa4b;
  box-shadow: 0 0 0 3px rgba(216, 250, 75, 0.22);
  animation: wlh-blink 2s ease-in-out infinite;
}
.wlh-tip--compact .wlh-kicker { display: none; }

/* ---------- reduced motion ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .wlh-tip,
  .wlh-tip--sum { animation: none; transform: rotate(var(--wlh-rot, -4deg)); }
  .wlh-card { animation: none; }
  .wlh-line { stroke-width: 1.9; }
  .wlh-trail { display: none; }
  .wlh-kicker i,
  .wlh-title::before,
  .wlh-spark,
  .wlh-ring--hot { animation: none; }
  .settle-card.is-wlh-flash { animation: none; }
  .wlh.is-out { transition: none; }
}
