/* Yii cabinet + review extras on top of the new design system */

:root {
  --bg-0: var(--bg);
  --bg-1: var(--surface);
  --bg-2: var(--surface-2);
  --text-1: var(--text);
  --text-2: var(--muted);
  --text-3: var(--muted);
  --text-4: var(--faint);
  --border-1: var(--line);
  --brand-red: var(--accent);
  --brand-red-hover: var(--accent-strong);
  --brand-red-soft: var(--accent-dim);
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

body:has(.dash-page) .site-header {
  background: rgba(12, 11, 9, 0.92);
  border-bottom-color: var(--line);
}
body:has(.dash-page) main {
  padding-top: 76px;
}
html body section.section.dash-page {
  padding-top: 48px;
  padding-bottom: 96px;
  border-top: 0;
  margin-top: 0;
}
.dash-page .dash-tabs { margin: 32px 0 40px; }
.dash-page .dash-block-head { margin: 0 0 28px; }
.account-main,
.dash-page .dash-body {
  display: block;
  min-height: 160px;
  grid-template-columns: none;
}
.dash-tabs a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 14px 20px;
  position: relative;
  white-space: nowrap;
  transition: color 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.dash-tabs a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-swift);
}
.dash-tabs a:hover { color: var(--text); }
.dash-tabs a.is-active { color: var(--accent); }
.dash-tabs a.is-active::after { transform: scaleX(1); }

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 22px 24px;
  display: block;
  color: inherit;
  text-decoration: none;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.muted { color: var(--muted); }
.link-orange { color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
}
.dash-block-head h2 {
  margin: 0;
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 500;
  flex: none;
  width: auto;
}
.dash-block-head > span,
.dash-block-head > a {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.dash-block-head > a { color: var(--accent); }
.dash-empty { color: var(--muted); }
.dash-empty-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  min-height: 180px;
}
.dash-empty-box p { margin: 0; font-size: 15px; }
.dash-more { margin-top: 8px; }
.form-error, .error_info { color: var(--bad); font-size: 13px; margin-bottom: 12px; }
.error_info { display: none; }
.error_info.active { display: block; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-links a:hover { color: var(--accent); }
.auth-submit { width: 100%; justify-content: center; }
.btn:disabled, button.btn[disabled] { opacity: 0.55; pointer-events: none; transform: none; }
.auth-note { margin-top: 16px; color: var(--faint); font-size: 12px; text-align: center; }
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lead, .section-sub { color: var(--muted); max-width: 640px; }
.btn-wide { width: 100%; justify-content: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dl-links { list-style: none; margin: 12px 0 18px; padding: 0; }
.dl-links a { color: var(--accent); }
.spec-panel { display: grid; gap: 8px; margin: 14px 0; }
.spec-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.spec-row b { color: var(--text); font-weight: 500; }
.ticket-board { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.ticket-side-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ticket-side-empty { color: var(--muted); }

.review-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.review { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review h4 { margin: 0 0 6px; font-size: 16px; }
.review .meta { color: var(--faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-mono); }
.stars { display: flex; gap: 1px; margin-bottom: 8px; color: var(--accent); }
.stars svg { width: 16px; height: 16px; }
.stars svg.off { color: #3a342c; }
.star-pick { display: flex; gap: 1px; }
.star-pick button { width: 22px; height: 22px; padding: 0; color: #3a342c; background: none; border: 0; cursor: pointer; }
.star-pick button svg { width: 20px; height: 20px; display: block; }
.star-pick button.is-on { color: var(--accent); }
.review-compose { margin-top: 18px; }
.review-compose h3 { margin: 0 0 12px; }
.review-errors { color: var(--bad); margin-bottom: 12px; }
.review-reply {
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--accent-dim), transparent 42%), var(--surface-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 10px;
}
.review-reply-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-reply-ico {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(232,127,62,.22);
}
.review-reply-ico svg { width: 14px; height: 14px; }
.review-reply-head b { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.review-reply-head .meta { margin-top: 3px; }
.review-reply p { margin: 0; color: #d8d2c8; font-size: 14px; }

.buy-note { color: var(--faint); font-size: 12px; margin-top: 12px; }
.check-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .review, .grid-2, .dash-split, .form-grid, .dl-grid, .ticket-board { grid-template-columns: 1fr; }
}

.h-captcha { margin: 12px 0; }
.cms-html { max-width: 720px; overflow: hidden; }
.cms-html style, .cms-html script, .cms-html .loader, .cms-html .bg-lines { display: none !important; }
.cms-html h1, .cms-html h2, .cms-html h3 {
  font-size: 20px;
  margin: 28px 0 12px;
  color: var(--text);
  background: none;
  -webkit-text-fill-color: inherit;
  animation: none;
}
.cms-html p { color: var(--muted); font-size: 14.5px; margin-bottom: 12px; max-width: 720px; line-height: 1.7; }
.cms-html ul, .cms-html ol { color: var(--muted); margin: 0 0 16px 18px; }
.cms-html a { color: var(--accent); }
.cms-html .container, .cms-html .section { max-width: none; width: auto; padding: 0; margin: 0 0 24px; }

.legal-hero { padding: 150px 0 36px; }
.legal-hero .page-title { max-width: 18ch; font-size: clamp(32px, 4.2vw, 46px); }
.legal-hero .section-sub { max-width: 40rem; }
.legal { padding: 36px 0 96px; }
.legal-wrap { max-width: 720px; }
.legal-item { padding: 28px 0; border-top: 1px solid var(--line); }
.legal-item:first-child { border-top: 0; padding-top: 0; }
.legal-item h2 {
  font-size: 20px;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--text);
}
.legal-item h2 .idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  flex: none;
}
.legal-item p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
  margin: 0 0 12px;
}
.legal-item p:last-child { margin-bottom: 0; }
.support-v2 .hidden, .ticket-board .hidden { display: none !important; }

.drawer-close {
  display: none;
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(12, 11, 9, 0.7);
  z-index: 2;
}
.m-buybar { display: none; }

.pd-section#reviews,
.review-list,
.review-compose,
.pub-tab[data-tab="reviews"],
.pub-pane#tab-reviews,
a[href="/reviews"],
a[href^="/reviews?"],
a[href="/profile/review"] {
  display: none !important;
}

@media (max-width: 900px) {
  body.nav-open .drawer-close { display: inline-flex; }
  .m-buybar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(12, 11, 9, 0.94);
    border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
  .m-buybar .btn { height: 44px; padding: 0 22px; flex: none; }
  .m-buybar__meta { min-width: 0; }
  .m-buybar__price {
    display: block;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    color: var(--text);
  }
  .m-buybar small {
    display: block;
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  body:has(.m-buybar) { padding-bottom: 88px; }
  body.nav-open .m-buybar,
  body:has(.checkout-modal:not([hidden])) .m-buybar { display: none; }
}


/* quantity stepper + discord footer badge */
.buy-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 16px 14px;
}
.buy-qty-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.buy-qty-ctrl {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.buy-qty-ctrl button {
  width: 36px;
  height: 36px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}
.buy-qty-ctrl button:hover { color: var(--accent); background: var(--accent-dim); }
.buy-qty-ctrl input {
  width: 44px;
  height: 36px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  -moz-appearance: textfield;
}
.buy-qty-ctrl input::-webkit-outer-spin-button,
.buy-qty-ctrl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.co-group .buy-qty-ctrl { width: 100%; justify-content: space-between; }
.co-group .buy-qty-ctrl input { flex: 1; width: auto; }
.discord-badge { margin-top: 10px; }
.discord-mark {
  color: #fff;
  background: #5865F2 !important;
}
.footer-brand .epvp-badge { display: flex; }


.key-string code {
  white-space: pre-wrap;
  word-break: break-all;
}

/* Personal / loyalty discount on product */
.buy-price-old,
.p-price .paymentTabPriceOld,
.product-price s {
  color: var(--faint);
  text-decoration: line-through;
  font-weight: 400;
}
.buy-price-old {
  display: inline-block;
  font-size: 18px;
  margin-right: 10px;
  vertical-align: middle;
}
.buy-price-old[hidden],
.paymentTabPriceOld.hidden {
  display: none !important;
}
.p-price .paymentTabPriceOld {
  font-size: 11px;
  margin-right: 6px;
}
.product-price .p-save {
  display: inline;
  margin: 0 0 0 6px;
}
.p-name .p-save {
  display: inline-block;
  margin-top: 0;
  margin-left: 8px;
}

.dash-head-actions { display: flex; align-items: center; gap: 12px; }
.dash-head-balance {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.topup-amounts { margin-bottom: 10px; }
.checkout-modal[data-wallet-topup] .co-input[type=number] { margin-top: 2px; }


/* Product gallery: Kinescope videos first, then screenshots */
.p2-video.is-video { cursor: default; background: #0b0a08; }
.p2-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0b0a08;
}
button.ph-thumb {
  position: relative;
  padding: 0;
  margin: 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
}
.ph-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.ph-thumb.is-video { cursor: pointer; }
.p2-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 7, 5, .38);
  pointer-events: none;
}
.p2-thumb-play span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #16110b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox .lb-frame {
  width: min(100%, 1100px);
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #0b0a08;
}
.lightbox .lb-frame[hidden],
.lightbox img[hidden] { display: none !important; }
.lightbox .lb-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.lightbox .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(12,11,9,.7);
  color: var(--text);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.lightbox.has-nav .lb-nav { display: flex; }
.lightbox .lb-prev { left: 18px; }
.lightbox .lb-next { right: 18px; }
.lightbox .lb-nav:disabled { opacity: .35; }
.lightbox .lb-count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--muted);
}
