/* «Поддержка» в профиле (js/components/support-stats.js + support-shine-effects.js), свой и чужой профиль. Блок-строка с тремя суммами под «Сменить профиль»; тап — «выезд» стеклянной карточки «Ethereal Monochrome», тап по её заголовку — обратно. Цвет метрики: ♡ --accent, ↗ --success, ✦ --warning. Только семантические переменные, обе темы. Всё движение — в блоке prefers-reduced-motion: no-preference внизу файла, поэтому при reduced-motion вид статичный без переопределений. Решение и отклонения: docs/UI-Design/DESIGN.md §11.3. */ /* Строка и карточка — две строки одной сетки: одна сворачивается (0fr), другая раскрывается (1fr). */ .profile-support { display: grid; grid-template-rows: 1fr 0fr; } .profile-support[data-expanded='true'] { grid-template-rows: 0fr 1fr; } .profile-support__line, .profile-support__panel { display: grid; min-height: 0; overflow: hidden; } /* После «выезда» орбита и искры выходят за край карточки (до 10px) — обрезку снимаем. */ .profile-support.is-settled .profile-support__panel { overflow: visible; } .profile-support .is-sent { --ps-tone: var(--accent); } .profile-support .is-received { --ps-tone: var(--success); } .profile-support .is-shine { --ps-tone: var(--warning); } /* Свёрнутый блок: ♡ 0.30★ · ↗ 0.50★ · ✦ 1.00★ ⌄ — по размеру и поверхности как соседний блок «Сменить профиль» (nav-list: surface, border-subtle, radius-lg; высота 64px — как у его строки с подписью), суммы — кеглем крупных чисел профиля (--text-lg). */ .profile-support__summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-1) var(--space-2); width: 100%; min-height: 64px; padding: 10px 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface); color: var(--text-primary); font-size: var(--text-lg); line-height: var(--leading-lg); cursor: pointer; -webkit-tap-highlight-color: transparent; } @media (hover: hover) { .profile-support__summary:hover:not(:disabled) { background: var(--surface-selected); } } .profile-support__summary:active:not(:disabled) { background: var(--surface-selected); } /* Строка обрезается при сворачивании — фокусное кольцо рисуем внутри кнопки. */ .profile-support__summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; } .profile-support__summary:disabled { color: var(--text-secondary); font-size: var(--text-md); cursor: default; } .profile-support__sep { color: var(--text-secondary); } .profile-support__chevron { width: 18px; height: 18px; flex: none; margin-left: var(--space-1); color: var(--text-secondary); } .profile-support-chip { display: inline-flex; align-items: center; gap: 5px; color: var(--ps-tone); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; white-space: nowrap; } .profile-support-chip.is-zero { color: var(--text-secondary); } .profile-support-chip__icon { width: 20px; height: 20px; flex: none; } .profile-support-chip__star { width: 14px; height: 14px; flex: none; } /* Узкий телефон: та же строка без переноса — чуть меньше кегль и зазоры. */ @media (max-width: 380px) { .profile-support__summary { gap: var(--space-1) 6px; padding-inline: 10px; font-size: var(--text-md); } .profile-support__chevron { margin-left: 0; } .profile-support-chip { gap: 4px; } .profile-support-chip__icon { width: 18px; height: 18px; } .profile-support-chip__star { width: 12px; height: 12px; } } /* Карточка: ночью тёмное стекло, днём светлое матовое. */ .profile-support-stats { --ps-edge: color-mix(in srgb, var(--text-primary) 14%, transparent); --ps-edge-lo: color-mix(in srgb, var(--text-primary) 7%, transparent); --ps-edge-hi: color-mix(in srgb, var(--text-primary) 42%, transparent); position: relative; /* Подкрутка к раскрытой карточке оставляет воздух у края экрана (и место орбите). */ scroll-margin: var(--space-4); display: grid; gap: var(--space-1); padding: var(--space-4) var(--space-4) var(--space-2); border-radius: var(--radius-xl); background: linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 78%, transparent) 0%, color-mix(in srgb, var(--surface) 92%, transparent) 100%); -webkit-backdrop-filter: blur(24px) saturate(1.15); backdrop-filter: blur(24px) saturate(1.15); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text-primary) 10%, transparent), inset 0 0 0 2px color-mix(in srgb, var(--text-primary) 3%, transparent), 0 18px 40px -24px rgb(0 0 0 / 0.55); color: var(--text-primary); -webkit-tap-highlight-color: transparent; } /* Грань стекла — металлический кант 1px градиентом маской (интерьер не подсвечивается): блики на правом верхнем и левом нижнем углах, тёмная середина; внутренняя фаска — второй inset-тенью выше. */ .profile-support-stats::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: linear-gradient(225deg, var(--ps-edge-hi) 0%, var(--ps-edge) 18%, var(--ps-edge-lo) 45%, var(--ps-edge-lo) 55%, var(--ps-edge) 82%, var(--ps-edge-hi) 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; } /* Заголовок «Поддержка ⌃» — кнопка сворачивания карточки. */ .profile-support-stats__title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); width: 100%; min-height: 44px; margin: calc(-1 * var(--space-2)) 0 0; padding: 0; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-primary); font-size: 1rem; line-height: 1.5; font-weight: var(--weight-bold); text-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent; } .profile-support-stats__title:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; } .profile-support-stats__title-chevron { width: 18px; height: 18px; flex: none; color: var(--text-secondary); } @media (hover: hover) { .profile-support-stats__title:hover .profile-support-stats__title-chevron { color: var(--text-primary); } } .profile-support-stats__content { display: grid; } .profile-support-stat { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-3); min-height: 44px; font-size: var(--text-md); line-height: var(--leading-md); } .profile-support-stat__icon { display: inline-flex; color: var(--ps-tone); } .profile-support-stat__icon svg { width: 22px; height: 22px; } .profile-support-stat__label { min-width: 0; overflow-wrap: anywhere; } .profile-support-stat .profile-support-amount__star { color: var(--ps-tone); } .profile-support-stat.is-zero .profile-support-stat__icon, .profile-support-stat.is-zero .profile-support-amount, .profile-support-stat.is-zero .profile-support-amount__star { color: var(--text-secondary); } .profile-support-amount { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 1rem; font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; white-space: nowrap; } .profile-support-amount__star { width: 14px; height: 14px; flex: none; } .profile-support-history { margin-top: var(--space-2); padding-top: var(--space-1); border-top: 1px solid var(--border-subtle); scroll-margin: var(--space-4); } /* Кнопка истории — : пружинный отклик и слой жидкого света под текстом. */ .profile-support-history__toggle { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; gap: var(--space-1); min-height: 44px; margin: 0 calc(-1 * var(--space-2)); padding: var(--space-2) var(--space-3); overflow: hidden; border-radius: var(--radius-md); color: var(--text-secondary); font-size: var(--text-md); list-style: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; } .profile-support-history__toggle::-webkit-details-marker { display: none; } .profile-support-history__toggle::marker { content: ""; } .profile-support-history__toggle:hover { color: var(--text-primary); } .profile-support-history__toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; } .profile-support-history__toggle:active, .profile-support-history__toggle.is-pressed { background-color: color-mix(in srgb, var(--text-primary) 6%, transparent); color: var(--text-primary); } .profile-support-history__label, .profile-support-history__chevron { position: relative; z-index: 1; } .profile-support-history__chevron { width: 18px; height: 18px; flex: none; } .profile-support-history[open] .profile-support-history__chevron { transform: rotate(90deg); } /* Фильтр #profile-support-goo — только на этом слое: капли непрозрачные (порог альфы их не стирает), интенсивность задаёт opacity слоя, текст над ним остаётся чётким. */ .profile-support-history__light { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: inherit; filter: url(#profile-support-goo); opacity: .22; pointer-events: none; } :root[data-theme='light'] .profile-support-history__light { opacity: .14; } .profile-support-goo { position: absolute; width: 0; height: 0; } .profile-support-goo__drop { position: absolute; left: calc(var(--drop) / -2); top: calc(var(--drop) / -2); width: var(--drop); height: var(--drop); border-radius: 50%; background: var(--text-primary); } .profile-support-history__rows { display: grid; gap: var(--space-2); padding: var(--space-2) 0 var(--space-3); } /* Перевод: «кому/от кого — сумма» сверху, «дата · SOL — транзакция» снизу (порядок DOM задаёт сетку). */ .profile-support-transfer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-2); row-gap: 2px; } .profile-support-transfer__peer { min-width: 0; overflow-wrap: anywhere; } .profile-support-transfer__link { justify-self: end; font-size: var(--text-sm); } .profile-support-transfer .profile-support-amount { font-size: var(--text-md); } /* Слои сияния (support-shine-effects.js) — декоративные, клики проходят сквозь них. */ .profile-support-fx { position: absolute; pointer-events: none; } .profile-support-fx__rim, .profile-support-fx__comets { left: 0; top: 0; overflow: visible; } /* Рамка на время сияния: кант чуть золотится, по нему ровно по контуру обходит тонкий блик и гаснет звёздочкой-вспышкой в правом верхнем углу. */ .profile-support-fx__rim-tint { fill: none; stroke: var(--warning); stroke-width: 1; opacity: 0; } .profile-support-fx__rim-glint { fill: none; stroke: var(--warning); stroke-width: 2; stroke-linecap: round; stroke-dasharray: .12 2; stroke-dashoffset: .12; } .profile-support-fx__flare { fill: color-mix(in srgb, var(--warning) 65%, var(--text-primary)); opacity: 0; transform-box: fill-box; transform-origin: center; } /* Комета «пополнения»: хвост — штрих по дуге (его смещение ведёт JS), голова — светящаяся точка, пылинки — за ней. */ .profile-support-fx__trail { fill: none; stroke-width: 2.5; stroke-linecap: round; } .profile-support-fx__comet { left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--ps-tone) 55%, var(--text-primary)); box-shadow: 0 0 6px 3px var(--ps-tone), 0 0 20px 7px color-mix(in srgb, var(--ps-tone) 50%, transparent); } /* Днём широкий ореол тёмного тона на светлом стекле выглядит пятном: светлая сердцевина и узкий прозрачный ореол. */ :root[data-theme='light'] .profile-support-fx__comet { background: color-mix(in srgb, var(--ps-tone) 60%, var(--surface)); box-shadow: 0 0 3px 1px color-mix(in srgb, var(--ps-tone) 70%, transparent), 0 0 10px 3px color-mix(in srgb, var(--ps-tone) 22%, transparent); } .profile-support-fx__mote { width: 3.5px; height: 3.5px; margin: -1.75px 0 0 -1.75px; border-radius: 50%; background: var(--ps-tone); box-shadow: 0 0 5px 1px var(--ps-tone); opacity: 0; } /* Сумма в момент пополнения — в цвете метрики с мягким свечением, затем плавно возвращается к обычному виду. */ .profile-support-stat .profile-support-amount.is-filling { color: var(--ps-tone); text-shadow: 0 0 12px color-mix(in srgb, var(--ps-tone) 60%, transparent); } .profile-support-fx__orbit { overflow: visible; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--warning) 70%, transparent)); } .profile-support-fx__ring { fill: none; stroke: var(--warning); stroke-opacity: .4; stroke-width: 1; stroke-dasharray: 1 7; stroke-linecap: round; } .profile-support-fx__dot { fill: var(--warning); } .profile-support-sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; } .profile-support-spark { position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%; background: var(--ps-tone, var(--warning)); box-shadow: 0 0 8px var(--ps-tone, var(--warning)); opacity: 0; } @media (prefers-reduced-motion: no-preference) { .profile-support { transition: grid-template-rows 420ms cubic-bezier(0.22, 1, 0.36, 1); } .profile-support__summary { transition: background-color var(--duration-fast) ease, transform 180ms cubic-bezier(0.175, 0.885, 0.32, 1.275); } .profile-support__summary:active:not(:disabled) { transform: scale(0.97); } /* Тап по карточке: вдавливание за 0.15 с, отпускание — пружина 0.4 с (кривая с перелётом). */ .profile-support-stats { transition: transform 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275); } .profile-support-stats.is-pressed { transform: scale(0.97); transition-duration: 150ms; transition-timing-function: ease-out; } /* «Дыхание» иконок и звёзд у ненулевых сумм: цикл 4 с, только пока карточка раскрыта. */ .profile-support[data-expanded='true'] .profile-support-stat:not(.is-zero) .profile-support-stat__icon svg, .profile-support[data-expanded='true'] .profile-support-stat:not(.is-zero) .profile-support-amount__star { animation: profile-support-breathe 2s ease-in-out infinite alternate; } .profile-support[data-expanded='true'] .profile-support-stat:nth-child(2) :is(.profile-support-stat__icon svg, .profile-support-amount__star) { animation-delay: -.67s; } .profile-support[data-expanded='true'] .profile-support-stat:nth-child(3) :is(.profile-support-stat__icon svg, .profile-support-amount__star) { animation-delay: -1.33s; } .profile-support-history__toggle { transition: transform 180ms cubic-bezier(0.175, 0.885, 0.32, 1.275), color var(--duration-fast) ease, background-color var(--duration-fast) ease; } .profile-support-history__toggle:active, .profile-support-history__toggle.is-pressed { transform: scale(0.97); } .profile-support-history__chevron { transition: transform var(--duration-fast) ease; } /* Жидкий свет на «Истории переводов» — 0.8 с. */ .profile-support-goo__drop.is-main { --drop: 44px; animation: profile-support-goo-main 800ms cubic-bezier(0.22, 1, 0.36, 1) forwards; } .profile-support-goo__drop.is-left, .profile-support-goo__drop.is-right { --drop: 18px; animation: profile-support-goo-drop 720ms 60ms cubic-bezier(0.22, 1, 0.36, 1) both; } .profile-support-goo__drop.is-left { --dir: -1; } .profile-support-goo__drop.is-right { --dir: 1; } .profile-support-fx__rim { animation: profile-support-fx-life 2.2s linear forwards; } .profile-support-fx__rim-tint { animation: profile-support-rim-tint 1.8s ease-in-out forwards; } .profile-support-fx__rim-glint { animation: profile-support-rim-glint 1.4s cubic-bezier(0.45, 0, 0.25, 1) forwards; } .profile-support-fx__flare { animation: profile-support-flare 700ms 1.3s ease-out forwards; } .profile-support-fx__comets { animation: profile-support-fx-life 1.8s linear forwards; } .profile-support-fx__mote { animation: profile-support-mote 800ms ease-out forwards; } .profile-support-fx__orbit { animation: profile-support-fx-fade 2.4s ease-in-out forwards; } .profile-support-spark { animation: profile-support-spark 800ms ease-out forwards; } .profile-support-stat .profile-support-amount { transition: color 600ms ease, text-shadow 600ms ease; } } @keyframes profile-support-breathe { from { filter: drop-shadow(0 0 1px color-mix(in srgb, var(--ps-tone) 25%, transparent)); opacity: .82; } to { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ps-tone) 70%, transparent)); opacity: 1; } } @keyframes profile-support-goo-main { 0% { transform: scale(.35); opacity: 1; } 60% { opacity: .85; } 100% { transform: scale(6); opacity: 0; } } @keyframes profile-support-goo-drop { 0% { transform: translateX(0) scale(.6); opacity: 1; } 100% { transform: translateX(calc(var(--dir) * 96px)) scale(1.6); opacity: 0; } } @keyframes profile-support-fx-fade { 0% { opacity: 0; } 15%, 75% { opacity: 1; } 100% { opacity: 0; } } /* Срок жизни слоя: держится и гаснет в самом конце — по его animationend слой удаляется. */ @keyframes profile-support-fx-life { 0%, 90% { opacity: 1; } 100% { opacity: 0; } } @keyframes profile-support-rim-tint { 0%, 100% { opacity: 0; } 45% { opacity: .5; } } /* Блик проходит полный круг (путь длиной 1) и уходит за конец — в правый верхний угол, где загорается вспышка. */ @keyframes profile-support-rim-glint { to { stroke-dashoffset: -1; } } @keyframes profile-support-flare { 0% { opacity: 0; transform: scale(0) rotate(0deg); } 35% { opacity: 1; transform: scale(1.15) rotate(20deg); } 100% { opacity: 0; transform: scale(.2) rotate(90deg); } } @keyframes profile-support-mote { 0% { opacity: .95; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--mx), var(--my)) scale(.4); } } /* Искра держит яркость до середины пути и гаснет на излёте — иначе вспышка не успевает читаться. */ @keyframes profile-support-spark { 0% { transform: rotate(var(--a)) translateX(6px) scale(1); opacity: 1; } 50% { opacity: 1; } 100% { transform: rotate(var(--a)) translateX(var(--d)) scale(.3); opacity: 0; } }