/* buyer-ux-v7.js: the moves between screens, Telegram «Назад», the waits, the lost connection and the desktop column
   (Alex 8.11 02:19Z–02:30Z). Numbers: a section fades in 0.15 s, a deeper screen moves 0.25 s, both on the curve
   cubic-bezier(.2,.8,.2,1); a shape waits 0.3 s before it shows. */
@view-transition { navigation: auto; }
/* A tap during a move reaches the new screen: the moving pictures never catch it. */
::view-transition { pointer-events: none; }
html[class*="ux-move-"]::view-transition-old(*),
html[class*="ux-move-"]::view-transition-new(*) { mix-blend-mode: normal; }
html[class*="ux-move-"]::view-transition-group(*) { animation-duration: .25s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }
/* The bottom bar stands still and changes its marked section at once. */
::view-transition-group(buyer-nav),
::view-transition-old(buyer-nav),
::view-transition-new(buyer-nav) { animation: none; }
@keyframes ux-in { from { opacity: 0; } }
@keyframes ux-out { to { opacity: 0; } }
@keyframes ux-from-right { from { transform: translateX(100%); } }
@keyframes ux-to-right { to { transform: translateX(100%); } }
/* «Плавное проявление»: the section appears over the one it replaces. */
html.ux-move-tab::view-transition-old(root) { animation: none; }
html.ux-move-tab::view-transition-new(root) { animation: ux-in .15s ease-out both; }
/* «Въезд справа»: the new screen over the old, which keeps its place; «Назад» takes it back to the right. */
html.ux-move-push::view-transition-old(root) { animation: none; }
html.ux-move-push::view-transition-new(root) { animation: ux-from-right .25s cubic-bezier(.2,.8,.2,1) both; box-shadow: -1px 0 0 rgb(0 0 0 / .06), -12px 0 32px rgb(0 0 0 / .16); }
html.ux-move-back::view-transition-new(root) { animation: none; }
html.ux-move-back::view-transition-old(root) { z-index: 1; animation: ux-to-right .25s cubic-bezier(.2,.8,.2,1) both; box-shadow: -1px 0 0 rgb(0 0 0 / .06), -12px 0 32px rgb(0 0 0 / .16); }
@media (prefers-reduced-motion: reduce) {
  html.ux-move-push::view-transition-new(root) { animation: ux-in .15s ease-out both; box-shadow: none; }
  html.ux-move-back::view-transition-old(root) { animation: ux-out .15s ease-out both; box-shadow: none; }
}

/* «Только «Назад» Telegram»: the screens' own returns stay in the page only as the place «Назад» goes to. */
html.ux-on .buyer-return, html.ux-on #dc-root#dc-root .buyer-return { display: none !important; }
/* A bar that held only the return goes too, so the screen starts right under Telegram's buttons. */
html.ux-on #dc-root#dc-root .buyer-return-bar:not(:has(> :not(.buyer-return))) { display: none !important; }
html.ux-on .ev-back, html.ux-on #dc-root#dc-root .ev-back { display: none !important; }
html.ux-on :is([data-events-root], [data-events-metrics]) .ev-header .ev-actions { margin-inline-start: auto; }
/* What stood beside a hidden return keeps its side: «Как получать опыт» on «Уровень» stays on the right. */
html.ux-on #dc-root#dc-root .rank-header .rank-help { margin-inline-start: auto; }

/* «Заготовки по форме»: the screen's own background with grey shapes of its lines, pictures and boxes. */
.ux-veil { position: fixed; z-index: 2147482000; left: 0; right: 0; top: 0; overflow: hidden; pointer-events: none; transition: opacity .15s ease-out; }
.ux-veil.ux-gone { opacity: 0; }
.ux-veil i { position: absolute; display: block; }
.ux-veil .ux-t, .ux-veil .ux-b { background: color-mix(in srgb, currentColor 9%, transparent); }
.ux-veil .ux-l { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 8%, transparent); }
.ux-veil .ux-b, .ux-veil .ux-l { background-clip: padding-box; }
.ux-veil.ux-shapes::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--tg-theme-bg-color, #fff) 55%, transparent) 50%, transparent 70%); background-size: 220% 100%; animation: ux-sheen 1.1s linear infinite; }
@keyframes ux-sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .ux-veil.ux-shapes::after { animation: none; display: none; } }
/* A spinner only inside the pressed button. */
.ux-busy { position: relative !important; color: transparent !important; pointer-events: none; }
.ux-busy > * { visibility: hidden; }
.ux-busy::after { content: ""; position: absolute; inset: 0; width: 18px; height: 18px; margin: auto; box-sizing: border-box; border: 2.2px solid var(--tg-theme-button-text-color, #fff); border-right-color: transparent; border-radius: 50%; animation: ux-spin .7s linear infinite; }
@keyframes ux-spin { to { transform: rotate(1turn); } }

/* «Нет связи»: one line at the top, under Telegram's buttons; the buttons that ask the shop wait, dimmed. */
.ux-line { position: fixed; z-index: 2147482500; left: 12px; right: 12px; top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px) + 6px); min-height: 34px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 6px 14px; border-radius: 17px; background: var(--ux-line-bg, #1f2421); color: var(--ux-line-ink, #fff); font: 500 13px/1.25 Onest, system-ui, sans-serif; box-shadow: 0 6px 18px rgb(0 0 0 / .18); animation: ux-drop .2s cubic-bezier(.2,.8,.2,1) both; transition: opacity .15s ease-out; }
.ux-line b { font-weight: 700; }
.ux-line .ux-dot { width: 7px; height: 7px; border-radius: 50%; background: #f0a63c; flex: none; animation: ux-blink 1.4s ease-in-out infinite; }
.ux-line.ux-gone { opacity: 0; }
.ux-line.ux-nudge { animation: ux-nudge .32s ease-out; }
@keyframes ux-drop { from { transform: translateY(-10px); opacity: 0; } }
@keyframes ux-blink { 50% { opacity: .35; } }
@keyframes ux-nudge { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@media (prefers-reduced-motion: reduce) { .ux-line, .ux-line.ux-nudge, .ux-line .ux-dot { animation: none; } }
html.ux-offline .ux-shop { opacity: .45; filter: saturate(.3); }

/* «Колонка по центру» (Telegram Desktop): beside the phone-width column, the theme's own background. */
html.ux-on, html.ux-on body { background: var(--ux-side, transparent); }

/* «Звук в играх» in «Профиль»: a row of the account panel with a switch (buyer-sound-v7.js). */
.pfm-row.pfm-sound { grid-template-columns: 24px minmax(0, 1fr) auto; cursor: pointer; }
.pfm-sound input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pfm-knob { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: color-mix(in srgb, var(--tg-theme-text-color) 18%, transparent); transition: background-color .2s ease; }
.pfm-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .22s cubic-bezier(.3,.7,.3,1); }
.pfm-sound input:checked + .pfm-knob { background: var(--tg-theme-button-color); }
.pfm-sound input:checked + .pfm-knob::after { transform: translateX(18px); }
.pfm-sound input:focus-visible + .pfm-knob { outline: 2px solid var(--tg-theme-link-color); outline-offset: 2px; }

/* Narrow phones (320 px) in the long languages: a word never breaks in the middle. A tab keeps its word whole and the
   longest tab takes the room it needs; the day's check-in button keeps its word and, below 360 px, goes under the prize. */
#dc-root .pz-tabs { grid-template-columns: repeat(3, minmax(min-content, 1fr)); }
#dc-root .pz-tabs button { white-space: nowrap; overflow-wrap: normal; }
#dc-root .rw-claim > .sc-interp { white-space: nowrap; }
#dc-root .rw-checkin-action > .rw-action-slot { flex-shrink: 0; }
#dc-root .rw-checkin-action > .rw-prize { min-width: 0; }
@media (max-width: 359px) { #dc-root .rw-checkin-action { flex-direction: column; align-items: stretch; } #dc-root .rw-checkin-action .rw-claim { width: 100%; } #dc-root .rw-checkin-action .rw-action-slot > small { margin-inline: auto; } }
/* A prize of four digits and more (the 30th and the 365th day of a series, Л-18, sync92) does not fit beside «Отметиться»
   on a phone: the button goes under the prize, as on a narrow screen, and the prize keeps its size. */
#dc-root .rw-checkin-action[data-long="long"] { flex-direction: column; align-items: stretch; }
#dc-root .rw-checkin-action[data-long="long"] .rw-claim { width: 100%; }
#dc-root .rw-checkin-action[data-long="long"] .rw-action-slot > small { margin-inline: auto; }
