/* Regional Steam wallet codes (SEAGM) — section of /gift-cards under the Egypt showcase.
   Store-style layout: product header, quick country chips, value list + order summary, country picker
   (dialog on desktop, bottom sheet on mobile). Scoped under .tbg .rgc; reuses the page tokens and the .tbg-wc card art. */
.rgc { --acc: 102,192,244; }
.rgc[hidden], .rgc [hidden] { display: none; }
.rgc :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rgc .flag { object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.rgc .ltr { direction: ltr; unicode-bidi: isolate; }

/* product header */
.rgc-intro { margin: 0 0 20px; }
.rgc-intro p { color: var(--tx2); font-weight: 600; font-size: 16px; margin: 8px 0 0; max-width: 640px; }
.rgc-hero { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 150px 1fr auto; gap: 24px; align-items: center; padding: 24px; border-radius: 26px; border: 1px solid var(--line); background: linear-gradient(180deg, #131317, #0f0f12); }
.rgc-hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(520px 260px at 92% 0%, rgba(var(--acc), .22), transparent 70%), repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px); }
.rgc-hero .bgflag { position: absolute; z-index: -1; width: 340px; height: 230px; left: -60px; top: -40px; object-fit: cover; opacity: .07; transform: rotate(-10deg); filter: blur(1px) saturate(1.3); border-radius: 20px; }
.rgc-cover .tbg-wc { --g3: rgb(var(--acc)); --g2: #a5f3fc; border-radius: 16px; aspect-ratio: 300/380; box-shadow: 0 18px 40px rgba(0,0,0,.55); }
.rgc-cover .tbg-wc .in { padding: 9cqw; } .rgc-cover .tbg-wc .hd { justify-content: center; }
.rgc-cover .tbg-wc .brand { font-size: 9cqw; } .rgc-cover .tbg-wc .brand svg { width: 13cqw; height: 13cqw; }
.rgc-cover .tbg-wc .amt { margin: auto 0; font-size: 22cqw; }
.rgc-cover .tbg-wc .ft { font-size: 5.4cqw; justify-content: center; } .rgc-cover .tbg-wc .ft span:last-child { display: none; }
.rgc-ttl .tbg-kicker { display: block; }
.rgc .rgc-ttl h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.35; }
.rgc-ttl h2 .ltr { font: 800 .62em var(--mono); color: rgb(var(--acc)); margin-inline-start: 6px; vertical-align: middle; }
.rgc-note { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--tx3); line-height: 1.8; max-width: 620px; }
.rgc-note b { color: #fde68a; font-family: var(--mono); }
.rgc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rgc-tag { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: 13px; font-weight: 800; color: var(--tx2); }
.rgc-tag .flag { width: 20px; height: 14px; border-radius: 3px; }
.rgc-tag svg { width: 15px; height: 15px; color: rgb(var(--acc)); }
.rgc-change { align-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid rgba(var(--acc), .5); background: rgba(var(--acc), .08); color: #fff; font: 800 14px var(--ar); cursor: pointer; white-space: nowrap; transition: background .2s; }
.rgc-change:hover { background: rgba(var(--acc), .16); }
.rgc-change svg { width: 18px; height: 18px; color: rgb(var(--acc)); }

/* quick country chips */
.rgc-quick { margin-top: 14px; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.rgc-quick::-webkit-scrollbar { display: none; }
.rgc-qf { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--s2); color: var(--tx2); font: 800 13.5px var(--ar); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.rgc-qf .flag { width: 24px; height: 16px; border-radius: 3px; }
.rgc-qf svg { width: 18px; height: 18px; flex: none; }
.rgc-qf small { font: 800 11px var(--mono); color: var(--tx3); }
.rgc-qf:hover { border-color: var(--line2); color: #fff; }
.rgc-qf[aria-pressed="true"] { border-color: rgb(var(--acc)); background: rgba(var(--acc), .12); color: #fff; }
.rgc-qf.more { color: rgb(var(--acc)); border-style: dashed; }

/* value list + summary */
.rgc-body { margin-top: 18px; display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.rgc-card { border-radius: 22px; border: 1px solid var(--line); background: #111115; }
.rgc-card > h3 { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font: 900 16px var(--ar); color: #fff; }
.rgc-card > h3 small { font: 700 12.5px var(--ar); color: var(--tx3); }
.rgc-list { padding: 10px; display: grid; gap: 8px; }
.rgc-row { width: 100%; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px; border-radius: 14px; border: 1px solid transparent; background: var(--s2); color: var(--tx); cursor: pointer; text-align: start; transition: border-color .2s, background .2s; }
.rgc-row:hover:not(:disabled) { border-color: var(--line2); }
.rgc-row .rd { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line2); display: grid; place-items: center; color: #0b0b0d; transition: background .2s, border-color .2s; }
.rgc-row .rd svg { width: 14px; height: 14px; opacity: 0; }
.rgc-row .nm { font: 800 15px var(--ar); color: #fff; }
.rgc-row .nm .ltr { font: 900 16px var(--lat); }
.rgc-row .pr { font: 800 16px var(--mono); direction: ltr; color: rgb(var(--acc)); white-space: nowrap; }
.rgc-row .pr small { font-size: 11px; color: var(--tx3); margin-inline-start: 3px; }
.rgc-row[aria-checked="true"] { border-color: rgb(var(--acc)); background: rgba(var(--acc), .1); }
.rgc-row[aria-checked="true"] .rd { background: rgb(var(--acc)); border-color: rgb(var(--acc)); }
.rgc-row[aria-checked="true"] .rd svg { opacity: 1; }
.rgc-row:disabled { cursor: not-allowed; opacity: .45; }
.rgc-row:disabled .pr { color: var(--tx3); font: 800 13px var(--ar); }

.rgc-sum { position: sticky; top: 92px; padding: 18px; }
.rgc-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; font-weight: 800; color: var(--tx2); }
.rgc-line + .rgc-line { border-top: 1px solid var(--line); }
.rgc-line .v { color: #fff; }
.rgc-line .v.g { color: var(--green); display: inline-flex; align-items: center; gap: 6px; }
.rgc-line .v.g svg { width: 15px; height: 15px; }
.rgc-qty { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; direction: ltr; }
.rgc-qty button { width: 44px; height: 44px; border: 0; background: rgba(255,255,255,.05); color: #fff; font: 900 18px var(--mono); cursor: pointer; }
.rgc-qty button:disabled { opacity: .35; cursor: not-allowed; }
.rgc-qty output { min-width: 34px; text-align: center; font: 800 15px var(--mono); color: #fff; }
.rgc-total { margin-top: 6px; padding: 14px 0 4px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.rgc-total span { font-weight: 900; font-size: 15px; color: #fff; }
.rgc-total b { font: 900 32px/1 var(--mono); direction: ltr; color: rgb(var(--acc)); text-shadow: 0 0 26px rgba(var(--acc), .4); }
.rgc-total b small { font-size: .38em; color: var(--tx2); text-shadow: none; margin-inline-start: 4px; }
.rgc-ack { margin-top: 12px; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(251,191,36,.07); border: 1px solid rgba(251,191,36,.25); cursor: pointer; font-size: 13px; font-weight: 800; color: #fde68a; line-height: 1.7; transition: background .2s, border-color .2s; }
.rgc-ack input { width: 20px; height: 20px; margin-top: 3px; accent-color: rgb(var(--acc)); flex: none; cursor: pointer; }
.rgc-ack b { color: #fff; font-family: var(--mono); }
.rgc-ack:has(input:checked) { background: rgba(var(--acc), .08); border-color: rgba(var(--acc), .4); color: #fff; }
.rgc-ack.nudge { animation: rgc-nudge .5s; border-color: #fbbf24; }
@keyframes rgc-nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.rgc-btns { margin-top: 14px; display: flex; gap: 8px; }
.rgc-btns .tbg-cta { flex: 1; min-height: 52px; white-space: nowrap; }
.rgc .rgc-cartbtn { flex: none; width: 52px; padding: 0; }
.rgc-cartbtn svg { width: 22px; height: 22px; }
.rgc .tbg-cta:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* country picker: dialog on desktop, bottom sheet on mobile */
.rgc-dlg { position: fixed; inset: 0; z-index: 9990; display: grid; place-items: center; padding: 20px; }
.rgc-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(3px); animation: rgc-fade .25s; }
.rgc-box { position: relative; width: min(720px, 100%); max-height: min(640px, 86dvh); display: flex; flex-direction: column; border-radius: 24px; border: 1px solid var(--line2); background: #131317; box-shadow: 0 40px 90px rgba(0,0,0,.7); animation: rgc-pop .3s var(--spring); }
.rgc-bh { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.rgc-bh h3 { flex: 1; font: 900 18px var(--ar); color: #fff; }
.rgc-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line2); background: none; color: #fff; cursor: pointer; display: grid; place-items: center; }
.rgc-find { position: relative; display: block; padding: 12px 18px 4px; }
.rgc-find input { width: 100%; min-height: 48px; padding: 0 44px 0 16px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: #fff; font: 700 16px var(--ar); }
.rgc-find input:focus { outline: none; border-color: rgb(var(--acc)); box-shadow: 0 0 0 3px rgba(var(--acc), .2); }
.rgc-find input::placeholder { color: var(--tx3); }
.rgc-find svg { position: absolute; right: 33px; top: 50%; width: 18px; height: 18px; translate: 0 -30%; color: var(--tx3); pointer-events: none; }
.rgc-opts { overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 18px; scrollbar-width: thin; }
.rgc-opts h4 { font: 800 12px var(--ar); color: var(--tx3); margin: 14px 2px 8px; }
.rgc-og { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rgc-opt { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); color: #fff; cursor: pointer; text-align: start; font: 800 14px var(--ar); }
.rgc-opt:hover { border-color: var(--line2); }
.rgc-opt[aria-selected="true"] { border-color: rgb(var(--acc)); background: rgba(var(--acc), .12); }
.rgc-opt .flag { width: 28px; height: 19px; border-radius: 4px; }
.rgc-opt span { flex: 1; min-width: 0; line-height: 1.3; }
.rgc-opt small { font: 800 11px var(--mono); color: var(--tx3); }
.rgc-none { padding: 24px; text-align: center; color: var(--tx3); font-weight: 700; }
@keyframes rgc-fade { from { opacity: 0; } }
@keyframes rgc-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes rgc-up { from { transform: translateY(100%); } }
body.rgc-lock { overflow: hidden; }

.rgc-bar { display: none; }

@media (max-width: 900px) {
  .rgc-body { grid-template-columns: 1fr; }
  .rgc-sum { position: static; }
}
@media (max-width: 640px) {
  .rgc-hero { grid-template-columns: 84px 1fr; gap: 14px; padding: 16px; border-radius: 22px; }
  .rgc-hero .rgc-change { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .rgc .rgc-ttl h2 { font-size: 21px; }
  .rgc-note { font-size: 12.5px; margin-top: 6px; }
  .rgc-tags { gap: 6px; margin-top: 6px; } .rgc-tag { min-height: 28px; padding: 0 9px; font-size: 12px; } .rgc-tag.x { display: none; }
  .rgc-quick { margin-inline: -16px; padding: 2px 16px; }
  .rgc-card > h3 { padding: 14px 16px; }
  .rgc-list { padding: 8px; }
  .rgc-row { padding: 0 12px; gap: 10px; min-height: 58px; }
  .rgc-row .nm .pre { display: none; }
  .rgc-sum .rgc-btns, .rgc-sum .rgc-total { display: none; }
  .rgc-body { padding-bottom: 76px; }
  /* fixed buy bar */
  .rgc-bar:not([hidden]) { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(17,17,21,.96); backdrop-filter: blur(14px); border-top: 1px solid rgba(var(--acc), .35); animation: rgc-up .3s cubic-bezier(.2,.9,.2,1); }
  .rgc-bar .t { flex: 1; min-width: 0; }
  .rgc-bar .t small { display: block; font: 700 11.5px var(--ar); color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rgc-bar .t b { font: 900 22px/1.2 var(--mono); color: rgb(var(--acc)); direction: ltr; unicode-bidi: isolate; }
  .rgc-bar .t b small { display: inline; font: 800 11px var(--mono); color: var(--tx2); margin-inline-start: 3px; }
  .rgc-bar .tbg-cta { min-height: 50px; padding: 0 18px; font-size: 15px; white-space: nowrap; }
  .rgc-bar .rgc-cartbtn { width: 50px; }
  /* picker becomes a bottom sheet */
  .rgc-dlg { padding: 0; place-items: end stretch; }
  .rgc-box { width: 100%; max-height: 88dvh; border-radius: 24px 24px 0 0; border-bottom: 0; animation: rgc-up .35s cubic-bezier(.2,.9,.2,1); padding-bottom: env(safe-area-inset-bottom); }
  .rgc-og { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .rgc *, .rgc *::before { animation: none !important; transition: none !important; } }
