/*
 * Окно «Оцените нашу работу» после продажи (review-prompt.js).
 * Звёзды повторяют отзывы на главной (reviews.css): тот же значок, зелёный со свечением,
 * тот же «прыжок» при выборе. Стоит поверх окна сделки (у него z-index 1200).
 */
.srp {
  /* Левее кнопки чата Crisp (она в правом нижнем углу), как окно оценки у aim.market.
     Слой выше чата: окно временное и закрывается крестиком, а чат под ним не теряется. */
  position: fixed; right: 96px; bottom: 24px; z-index: 1000001;
  width: 340px; max-width: calc(100vw - 24px); box-sizing: border-box; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px;
  background: linear-gradient(#121216, #0c0c0f);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .3);
  color: #e8e8ee; font-family: Montserrat, system-ui, sans-serif; text-align: center;
  opacity: 0; transform: translateY(18px) scale(.97);
  transition: opacity .32s cubic-bezier(.22, 1, .36, 1), transform .32s cubic-bezier(.22, 1, .36, 1), height .34s cubic-bezier(.22, 1, .36, 1);
}
.srp.is-open { opacity: 1; transform: none }
.srp.is-closing { opacity: 0; transform: translateY(12px) scale(.98); transition-duration: .22s }

.srp-strip { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(62, 255, 158, .75), transparent) }

.srp-close {
  position: absolute; top: 10px; right: 10px; display: grid; width: 28px; height: 28px; place-items: center; padding: 0;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; background: rgba(255, 255, 255, .02);
  color: rgba(255, 255, 255, .5); cursor: pointer; transition: .15s;
}
.srp-close:hover { border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: #fff }
.srp-close svg { width: 13px; height: 13px }

.srp-body, .srp-done { padding: 22px 20px 16px }
.srp-title { margin: 0; color: #fff; font-family: "Space Grotesk", Montserrat, sans-serif; font-size: 17px; font-weight: 800; letter-spacing: .01em }
.srp-subtitle { margin: 6px 0 0; color: #8f8f97; font-size: 13px; font-weight: 500; line-height: 1.45 }

.srp-rating { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px }
.srp-rating input { position: absolute; opacity: 0; width: 0; height: 0 }
.srp-rating label {
  display: grid; place-items: center; padding: 3px; color: #34343a; cursor: pointer;
  transition: color .15s ease, transform .15s ease;
}
.srp-rating label svg { width: 34px; height: 34px; display: block }
.srp-rating label:hover { transform: scale(1.12) }
.srp-rating label.on {
  color: #2ff096;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, .55));
  animation: srp-star-pick .32s cubic-bezier(.2, 1.3, .4, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.srp-rating input:focus-visible + label { outline: 2px solid #22c55e; outline-offset: 2px; border-radius: 6px }
@keyframes srp-star-pick { 0% { transform: scale(.85) } 55% { transform: scale(1.25) } 100% { transform: scale(1) } }

.srp-more { display: grid; gap: 8px; margin-top: 14px; text-align: left; opacity: 0; transform: translateY(-4px); transition: opacity .22s ease, transform .22s ease }
.srp-more.is-open { opacity: 1; transform: none }
.srp-more[hidden] { display: none }
.srp-text {
  width: 100%; min-height: 84px; box-sizing: border-box; resize: vertical; padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; background: #151518;
  color: #f4f4f5; font: 500 13.5px/1.5 Montserrat, system-ui, sans-serif; outline: 0; transition: border-color .2s, box-shadow .2s;
}
.srp-text:focus { border-color: rgba(34, 197, 94, .5); box-shadow: 0 0 0 3px rgba(62, 255, 158, .07) }
.srp-text::placeholder { color: #55555d }
.srp-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 16px }
.srp-error { color: #fca5a5; font-size: 12px; font-weight: 600; line-height: 1.4 }
.srp-counter { flex: none; color: #5f5f67; font-size: 11px }
.srp-submit {
  height: 42px; border: 0; border-radius: 10px; background: #3eff9e; color: #06140c;
  font-family: "Space Grotesk", Montserrat, sans-serif; font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 10px 26px -12px rgba(62, 255, 158, .7); transition: filter .15s, transform .15s, opacity .15s;
}
.srp-submit:hover { filter: brightness(1.06) }
.srp-submit:active { transform: translateY(1px) }
.srp-submit:disabled { cursor: default; opacity: .6 }

.srp-never {
  display: block; width: 100%; height: 36px; margin-top: 12px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 10px;
  background: rgba(255, 255, 255, .03); color: #8f8f97; font: 700 12.5px Montserrat, system-ui, sans-serif; cursor: pointer; transition: .15s;
}
.srp-never:hover { border-color: rgba(255, 255, 255, .14); color: #d4d4d8 }

.srp-done[hidden] { display: none }

/* Смена формы на благодарность (showThanks в review-prompt.js). */
.srp-body { transition: opacity .2s ease, transform .2s ease }
.srp-body.is-leaving { opacity: 0; transform: translateY(-6px) }
.srp-done { padding: 26px 20px 24px }
/* Конечное состояние записано обычными свойствами, а появление — анимацией с заливкой
   backwards: она только приводит к нему. Не отыграла анимация (вкладка в фоне, пока
   человек подтверждает обмен в Steam) — значок и заголовок всё равно на месте. */
.srp-done-icon path { stroke-dasharray: 24; stroke-dashoffset: 0 }
.srp-done.is-in .srp-done-icon { animation: srp-done-pop .55s cubic-bezier(.2, 1.3, .4, 1) .08s backwards }
.srp-done.is-in .srp-done-icon path { animation: srp-done-check .38s cubic-bezier(.65, 0, .35, 1) .34s backwards }
.srp-done.is-in .srp-title { animation: srp-done-rise .42s cubic-bezier(.22, 1, .36, 1) .22s backwards }
@keyframes srp-done-pop { 0% { opacity: 0; transform: scale(.5) } 60% { opacity: 1; transform: scale(1.1) } 100% { opacity: 1; transform: scale(1) } }
@keyframes srp-done-check { from { stroke-dashoffset: 24 } to { stroke-dashoffset: 0 } }
@keyframes srp-done-rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.srp-done-icon {
  display: grid; width: 52px; height: 52px; margin: 0 auto 14px; place-items: center;
  border: 1px solid rgba(62, 255, 158, .35); border-radius: 14px; background: rgba(62, 255, 158, .1); color: #3eff9e;
  box-shadow: 0 0 22px rgba(62, 255, 158, .25);
}
.srp-done-icon svg { width: 24px; height: 24px }

/* Уже 1280px (та же граница, что у панели) внизу экрана своя навигация (skinsflux-runtime.js, .skc-bnav, до 76px):
   окно встаёт над ней, а когда панель уезжает — опускается. */
@media (max-width: 1279px) {
  html.skc-bottomnav .srp { right: 16px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)) }
  html.skc-bottomnav.skc-bnav-away .srp { bottom: 16px }
}
@media (max-width: 560px) {
  .srp, html.skc-bottomnav .srp { right: 12px; left: 12px; width: auto; max-width: none }
  .srp { bottom: 12px }
}
@media (prefers-reduced-motion: reduce) {
  .srp, .srp-more, .srp-body { transition: none }
  .srp-rating label.on { animation: none }
  .srp-done.is-in .srp-done-icon, .srp-done.is-in .srp-title, .srp-done.is-in .srp-done-icon path { animation: none }
}
