/* Persik: окно «Бюджет» (brand/budget.js). Цвета — переменные темы витрины. */

/* Воронка «Все фильтры» открывает те же разделы, что кнопки ленты рядом (Цена, Коллекция, Модель, Фон,
   Узор), — владелец попросил убрать её 29.09. Сбросить всё можно кнопкой сброса, которая появляется в
   ленте, когда выбран фильтр. С выбранным фильтром подпись длиннее: «Все фильтры, выбрано: 1». */
button[aria-label^="Все фильтры"] {
  display: none !important;
}

/* Стрелки прокрутки ленты фильтров («<» и «>» по краям) лежат поверх кнопок. В сборке под ними почти
   прозрачная подложка, и подпись кнопки просвечивала сквозь стрелку — «р заезжает» (владелец, 29.09).
   Теперь под стрелкой плотный цвет фона, который растворяется к середине ленты: кнопки уходят под неё. */
nav[aria-label="Фильтры"] button[class*="absolute"][class*="inset-y-0"] {
  width: 48px !important;
}

/* Стрелки различаются по направлению своей подложки в сборке: правая — bg-linear-to-l, левая — to-r. */
nav[aria-label="Фильтры"] button[class*="absolute"][class*="bg-linear-to-l"] {
  background: linear-gradient(to left, var(--background, #141414) 55%, transparent) !important;
}

nav[aria-label="Фильтры"] button[class*="absolute"][class*="bg-linear-to-r"] {
  background: linear-gradient(to right, var(--background, #141414) 55%, transparent) !important;
}

/* Окно покупки: только «Карта или СБП» (ENOT). Строка «Криптовалюта — через Heleket» спрятана: Heleket выключен
   и на сервере (HELEKET_ENABLED=0), крипта есть на странице оплаты ENOT (владелец, 29.09). */
[role="dialog"] :has(> button[role="radio"][value="crypto"]) {
  display: none !important;
}

/* Окно онлайн-оплаты: ссылка «Купить через менеджера» под «Оплатить» убрана (владелец, 29.09). Кнопка «Купить»
   окна покупки через менеджера (дорогие подарки) — другая: a[data-slot=button], её правило не трогает. */
[role="dialog"] a[href^="https://t.me/"][class*="self-center"][class*="text-primary"] {
  display: none !important;
}

.persik-budget-active {
  box-shadow: inset 0 0 0 1.5px var(--primary, #1689ff);
}
.persik-budget-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(0 0 0 / 0.6);
  animation: persik-budget-fade 0.15s ease-out;
}
.persik-budget {
  box-sizing: border-box;
  width: 100%;
  max-width: 440px;
  padding: 20px 20px calc(16px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--popover, #212020);
  color: var(--foreground, #fff);
  box-shadow: 0 -8px 40px rgb(0 0 0 / 0.5);
  outline: none;
  animation: persik-budget-up 0.2s ease-out;
}
@media (min-width: 640px) {
  .persik-budget-overlay {
    align-items: center;
  }
  .persik-budget {
    border-radius: 24px;
    padding-bottom: 16px;
  }
}
.persik-budget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.persik-budget__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}
.persik-budget__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--muted, #3a3a3a);
  color: var(--foreground, #fff);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.persik-budget__range {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--primary, #1689ff);
  font-size: 15px;
  font-weight: 800;
}
.persik-budget__slider {
  position: relative;
  height: 32px;
  margin: 0 2px 18px;
}
.persik-budget__track {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 6px;
  margin-top: -3px;
  border-radius: 3px;
  background: var(--muted, #3a3a3a);
}
.persik-budget__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  background: var(--primary, #1689ff);
}
.persik-budget__slider input[type="range"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 32px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.persik-budget__slider input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
}
.persik-budget__slider input[type="range"]::-moz-range-track {
  background: transparent;
}
.persik-budget__slider input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  border: 6px solid var(--primary, #1689ff);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.4);
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
}
.persik-budget__slider input[type="range"]::-moz-range-thumb {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  border: 6px solid var(--primary, #1689ff);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  pointer-events: auto;
}
.persik-budget__slider input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 3px solid rgb(255 255 255 / 0.6);
  outline-offset: 2px;
}
.persik-budget__inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.persik-budget__inputs input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--secondary, #1c1c1c);
  color: var(--foreground, #fff);
  font: inherit;
  font-size: 16px; /* 16px: иначе iOS увеличивает страницу при вводе */
  font-weight: 700;
  text-align: center;
}
.persik-budget__inputs input::placeholder {
  color: var(--muted-foreground, #8e8e93);
  font-weight: 600;
}
.persik-budget__inputs input:focus {
  border-color: var(--primary, #1689ff);
  outline: none;
}
.persik-budget__inputs span {
  color: var(--muted-foreground, #8e8e93);
}
.persik-budget__foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 -20px;
  padding: 16px 20px 0;
  border-top: 1px solid var(--border, #454545);
}
.persik-budget__foot button {
  height: 48px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.persik-budget__foot [data-reset] {
  background: var(--muted, #3a3a3a);
  color: var(--foreground, #fff);
}
.persik-budget__foot [data-apply] {
  background: var(--primary, #1689ff);
  color: var(--primary-foreground, #fff);
}
.persik-budget__foot button:focus-visible,
.persik-budget__close:focus-visible {
  outline: 3px solid rgb(255 255 255 / 0.6);
  outline-offset: 2px;
}
@keyframes persik-budget-fade {
  from {
    opacity: 0;
  }
}
@keyframes persik-budget-up {
  from {
    transform: translateY(24px);
    opacity: 0.6;
  }
}
@media (prefers-reduced-motion: reduce) {
  .persik-budget-overlay,
  .persik-budget {
    animation: none;
  }
}
