/*
 * Wolf Currency — переключатель «местная / ₽ / $ / €». Здесь только устройство (что раскрывается, где панель, размеры под палец)
 * и запасной вид для темы без адаптера. Вид каждой темы свой — adapters/<тема>.css (Михаил, 15.11.2026).
 * Разметка: .wcur.wcur--<kind>.wcur--at-<desk|mob|foot>.wcur--v-<вид>; пункты .wcur__b[data-wcur][aria-pressed] внутри .wcur__set.
 */
.wcur { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; white-space: nowrap; font-family: inherit; line-height: 1.2; }
.wcur button, .wcur select { font: inherit; color: inherit; }
.wcur__set { display: inline-flex; align-items: center; }
.wcur__b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; transition: background-color 0.25s ease-out, color 0.25s ease-out, opacity 0.25s ease-out, box-shadow 0.25s ease-out; }
.wcur__b:focus-visible, .wcur__now:focus-visible, .wcur__sel:focus-visible, .wcur-sheet button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.wcur__sym { font-weight: 700; }
.wcur__caret { flex: none; transition: transform 0.25s ease-out; }
.wcur.is-open .wcur__caret { transform: rotate(180deg); }

/* кнопка и всплывающая панель */
.wcur__now { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; white-space: nowrap; }
.wcur__menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 1000; display: grid; gap: 2px; min-width: 220px; padding: 8px; white-space: normal; text-align: left; animation: wcur-in 0.2s ease-out; }
.wcur .wcur__menu[hidden] { display: none !important; } /* виды тем меняют display панели — скрытие сильнее */
.wcur__menu .wcur__set { display: grid; gap: 2px; }
.wcur__menu .wcur__b { justify-content: flex-start; width: 100%; }
.wcur__head { display: block; }
.wcur__note { display: block; font-size: 12px; line-height: 1.4; white-space: normal; }
@keyframes wcur-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* запасной вид: тема без адаптера */
.wcur--drop:not([class*="wcur--v-"]) .wcur__now { height: 28px; padding: 0 10px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 999px; font-size: 13px; font-weight: 700; }
.wcur--drop:not([class*="wcur--v-"]) .wcur__menu { border-radius: 14px; background: #fff; color: #1d2130; box-shadow: 0 12px 32px rgba(16, 20, 32, 0.18), 0 0 0 1px rgba(16, 20, 32, 0.06); }
.wcur--drop:not([class*="wcur--v-"]) .wcur__menu .wcur__b { padding: 10px 12px; border-radius: 10px; }
.wcur--drop:not([class*="wcur--v-"]) .wcur__menu .wcur__b[aria-pressed="true"] { background: #eef6ee; }
.wcur--inline:not([class*="wcur--v-"]) .wcur__b { min-width: 44px; height: 34px; padding: 0 10px; border-radius: 999px; opacity: 0.75; }
.wcur--inline:not([class*="wcur--v-"]) .wcur__b[aria-pressed="true"] { background: color-mix(in srgb, currentColor 18%, transparent); opacity: 1; }

/* мобильное меню и подвал: подпись слева, группа справа; в подвале не растягиваемся */
.wcur--at-mob { display: flex; flex-wrap: wrap; justify-content: space-between; width: 100%; margin: 0 0 12px; }
.wcur--at-foot { width: auto; max-width: max-content; margin: 0; align-self: flex-start; }

/* системный список */
.wcur__selwrap { position: relative; display: inline-flex; align-items: center; }
.wcur__sel { appearance: none; -webkit-appearance: none; margin: 0; padding: 0 30px 0 12px; border: 1px solid currentColor; border-radius: 0; background: transparent; cursor: pointer; }
.wcur__selwrap .wcur__caret { position: absolute; right: 11px; pointer-events: none; }

/* шторка снизу: живёт в body, поверх мобильного меню */
.wcur-sheet { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: flex-end; justify-content: center; }
.wcur-sheet[hidden] { display: none !important; }
.wcur-sheet__scrim { position: absolute; inset: 0; background: rgba(20, 14, 18, 0.45); animation: wcur-fade 0.25s ease-out; }
.wcur-sheet__panel { position: relative; width: 100%; max-width: 520px; max-height: 85vh; overflow: auto; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); background: #fff; color: #222; white-space: normal; animation: wcur-up 0.32s cubic-bezier(0.25, 1, 0.5, 1); }
.wcur-sheet__grab { display: block; width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: rgba(0, 0, 0, 0.18); }
.wcur-sheet .wcur__set { display: grid; gap: 6px; width: 100%; }
.wcur-sheet .wcur__b { justify-content: flex-start; width: 100%; min-height: 52px; }
.wcur-sheet__done { display: block; width: 100%; min-height: 48px; margin-top: 12px; border: 0; cursor: pointer; font: inherit; }
html.wcur-lock, html.wcur-lock body { overflow: hidden; }
@keyframes wcur-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes wcur-fade { from { opacity: 0; } to { opacity: 1; } }

/* корзина и оформление: строка «оплата в местной валюте» */
.wcur-pay { margin: 8px 0 16px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, currentColor 6%, transparent); font-size: 14px; line-height: 1.45; }
.wcur-pay[hidden] { display: none; }
.wcur-ref { display: inline-block; margin-left: 0.4em; font-size: 0.72em; font-weight: 500; line-height: 1.2; white-space: nowrap; opacity: 0.75; vertical-align: baseline; }
.wcur-ref::before { content: "("; } .wcur-ref::after { content: ")"; }

/* на сенсорном экране кнопки меню телефона, подвала и панелей — не меньше 44 × 44 (строку шапки ПК не раздуваем) */
@media (pointer: coarse) { .wcur--at-mob .wcur__b, .wcur--at-foot .wcur__b, .wcur__menu .wcur__b, .wcur-sheet .wcur__b, .wcur--at-mob .wcur__now, .wcur--at-foot .wcur__now, .wcur__sel { min-height: 44px; } .wcur--at-mob .wcur__b, .wcur--at-foot .wcur__b { min-width: 44px; } }
/* кнопка в строке шапки, видимой на телефоне (flowers365, flowberry): зона нажатия 44 px невидимой подложкой, строка не растёт */
@media (pointer: coarse) { .wcur--at-desk .wcur__now { position: relative; } .wcur--at-desk .wcur__now::after { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 44px; margin-top: -22px; } }
@media (prefers-reduced-motion: reduce) { .wcur__b, .wcur__caret { transition: none; } .wcur__menu, .wcur-sheet__panel, .wcur-sheet__scrim { animation: none; } }
