/* TitsRP Custom Content shop
   Visual language shared with suggestions.titsrp.com */

:root {
  --bg: #15161c;
  --card: #1e212a;
  --surface: #1a1b21;
  --input: #16171d;
  --border: #ffffff12;
  --border-hover: #ffffff29;
  --input-border: rgba(173, 180, 208, 0.10);
  --focus: #5d6da1;
  --accent: #f6f8ff80;
  --accent-soft: #edf0ffbd;
  --text: #fff;
  --text-2: #d1d5db;
  --muted: #9ca3af;
  --muted-2: #6b7280;
  --muted-3: #4b5563;
  --label: #888b98;
  --radius: 8px;
  --radius-sm: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-gutter: stable; }

body {
  min-height: 100vh;
  color: var(--text);
  font: 14px/1.5 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg) url(https://forums.titsrp.com/uploads/monthly_2023_11/background.png.e34668897fc076c0d1e5df5eaf44dfcc.png) no-repeat;
  background-size: contain;
  background-position: center bottom;
  background-attachment: fixed;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2e3040; border-radius: 3px; }

a { color: var(--text); text-decoration: none; transition: color .15s; }
a:hover { color: #dbe4ff; }
img { max-width: 100%; }

.container {
  max-width: 64rem;
  margin: 0 auto;
  padding-inline: 16px;
}

/* ---------- Buttons & inputs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  font-family: inherit;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(to left, #738bd761, #697ec461);
  transition: background .15s, border-color .15s;
}
.btn:hover { color: #fff; background: linear-gradient(to left, #738bd790, #697ec490); }
.btn-sm { 
  padding: 6px 12px; 
  font-size: 13px; 
  min-width: 64px;
}

.input {
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  color: #fff;
  background: var(--input);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  transition: border-color .15s;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: var(--focus); outline: none; }

.label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--label);
}

.eyebrow {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 0 20px #0000000c;
}
.header-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo img { display: block; height: 32px; width: auto; }

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.header-user .avatar {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  background: #2e3040;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.header-user .avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.header-user .username {
  font-size: 14px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.header-user .logout { font-size: 14px; color: var(--muted); }
.header-user .logout:hover { color: #fff; }

/* Status pills (verified / not verified, etc.) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 999px;
}
.pill-green { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); color: #86efac; }
.pill-red   { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }
a.pill-red:hover { color: #fecaca; border-color: rgba(239, 68, 68, 0.5); }

/* ---------- Tab bar ---------- */

main { padding-block: 16px 48px; }

.tabbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.tab {
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.tab:hover { color: #fff; background: rgba(22, 23, 29, 0.5); }
.tab.active { color: #fff; background: var(--input); }
.tabbar .spacer { flex: 1; }

.searchdiv { display: flex; gap: 8px; }
.searchdiv .input { width: 200px; padding: 6px 12px; }

/* ---------- Notices ---------- */

.failure {
  display: none;
  margin-bottom: 16px;
  padding: 12px 16px;
  font-size: 14px;
  border-radius: var(--radius);
  background: rgba(185, 28, 28, 0.15);
  border: 1px solid rgba(185, 28, 28, 0.3);
  color: #fca5a5;
}
.failure b { color: #fff; }
.failure.notice-green  { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.3); color: #86efac; }
.failure.notice-yellow { background: rgba(234, 179, 8, 0.12); border-color: rgba(234, 179, 8, 0.3); color: #fde68a; }

/* ---------- Cards & layout ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color .15s;
}

.shop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.side { display: flex; flex-direction: column; gap: 16px; }

.card-title {
  font-size: 25px;
  font-weight: 600;
  margin-bottom: 16px;
}

.product {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.product-img {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--input-border);
  background: var(--input);
}
.product-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.url-row { display: flex; gap: 8px; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.stat {
  padding: 14px 16px;
  border-radius: var(--radius);
  text-align: center;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}
.stat-label { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.stat-price { background: rgba(22, 163, 74, 0.12); border: 2px solid rgba(22, 163, 74, 0.22); }
.stat-price .stat-value { color: #86efac; }
.stat-price .stat-label { color: #4ade80; }
.stat-neutral { background: rgba(94, 104, 137, 0.10); border: 2px solid rgba(115, 139, 215, 0.22); }
.stat-neutral .stat-value { color: var(--accent-soft); }
.stat-neutral .stat-label { color: var(--accent); }

.info-btn {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px;
  font-size: 14px;
  line-height: 1;
  vertical-align: middle;
  color: var(--muted-2);
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color .15s;
}
.info-btn i { color: inherit; }
.info-btn:hover { color: #fff; }
.info-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Modal ---------- */

[hidden] { display: none !important; }
body.modal-open { overflow: hidden; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal-card {
  width: 100%;
  max-width: 32rem;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-header h2 { font-size: 18px; font-weight: 600; }
.modal-close {
  padding: 0 4px;
  font-size: 22px;
  line-height: 1;
  color: var(--muted-2);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s;
}
.modal-close:hover { color: #fff; }
.modal-close:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.modal-body p {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}
.modal-body p:last-child { margin-bottom: 0; }

.callout {
  margin-bottom: 20px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  background: var(--input);
  border: 1px solid rgba(173, 180, 208, 0.08);
  border-radius: var(--radius);
}
.callout b { color: var(--text-2); font-weight: 500; }

.modal-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}
.modal-section-title .accent { color: var(--accent); font-weight: 700; }

.bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}
.bullets li { position: relative; padding-left: 16px; }
.bullets li::before {
  content: "\2022";
  position: absolute;
  left: 2px;
  color: var(--muted-2);
}
.bullets strong { color: #fff; font-weight: 600; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.hint { font-size: 13px; color: var(--muted-2); }
.hint a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.hint a:hover { color: var(--accent-soft); }

/* Checkout */
.paypalbutton { min-height: 45px; }
.paypal-locked { display: block; opacity: .5; }
.paypal-locked .paypalbutton { pointer-events: none; }
.login-hint { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* Gift row: one fixed-height line. Turning it on fades the label, slides the
   toggle to the left edge, then wipes the SteamID box open beside it.
   Turning it off plays the same steps in reverse.
   The row is only as tall as the toggle; the 34px box is vertically centred
   and overhangs into the card's padding so the card never changes size. */
.gift {
  position: relative;
  height: 22px;
  --gift-ease: cubic-bezier(.4, 0, .2, 1);
}
.gift-label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity .2s ease .5s;            /* off: returns after the toggle is back */
}
.gift .switch {
  position: absolute;
  top: 0;
  left: calc(100% - 40px);
  transition: left .35s var(--gift-ease) .2s;  /* off: waits for the box to close */
}
.GiftRec {
  position: absolute;
  top: -6px;
  left: 52px;
  right: 0;
  width: auto;
  height: 34px;
  padding-block: 6px;
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0 100% 0 0 round 6px);
  transition: clip-path .25s var(--gift-ease), opacity .2s ease, visibility 0s linear .25s;
}

.gift.is-gift .gift-label {
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.gift.is-gift .switch {
  left: 0;
  transition-delay: .1s;
}
.gift.is-gift .GiftRec {
  opacity: 1;
  visibility: visible;
  clip-path: inset(0 0 0 0 round 6px);
  transition: clip-path .3s var(--gift-ease) .45s, opacity .2s ease .45s, visibility 0s linear .45s;
}

@media (prefers-reduced-motion: reduce) {
  .gift-label, .gift .switch, .GiftRec,
  .gift.is-gift .gift-label, .gift.is-gift .switch, .gift.is-gift .GiftRec {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #2e3040;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  transition: background .2s, border-color .2s;
}
.slider:before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
input:checked + .slider { background: var(--accent); border-color: rgba(115, 139, 215, 0.6); }
input:focus-visible + .slider { box-shadow: 0 0 0 2px var(--focus); }
input:checked + .slider:before { transform: translateX(18px); }

/* ---------- FAQ ---------- */

.faqs .accordion { display: flex; flex-direction: column; gap: 8px; }
.accordion-item {
  background: var(--surface);
  border: 1px solid rgba(127, 131, 148, 0.06);
  border-radius: var(--radius-sm);
  transition: border-color .15s;
}
.accordion-item:hover { border-color: var(--border-hover); }
.accordion button {
  position: relative;
  display: block;
  width: 100%;
  padding: 12px 44px 12px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  font-family: inherit;
  text-align: left;
  color: #fff;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
}
.accordion button:focus-visible { box-shadow: 0 0 0 1px var(--focus); border-radius: var(--radius-sm); }
.accordion button[aria-expanded='true'] { color: var(--accent-soft); }
.accordion button .icon {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  color: var(--muted-2);
  transition: transform .2s, color .15s;
}
.accordion button:hover .icon { color: #fff; }
.accordion button .icon::before,
.accordion button .icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 1px;
}
.accordion button .icon::before { top: 8px; left: 3px; width: 12px; height: 2px; }
.accordion button .icon::after  { top: 3px; left: 8px; width: 2px; height: 12px; transition: height .2s; }
.accordion button[aria-expanded='true'] .icon { color: var(--accent-soft); }
.accordion button[aria-expanded='true'] .icon::after { height: 0; top: 9px; }
.accordion .accordion-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity .2s, max-height .2s;
}
.accordion button[aria-expanded='true'] + .accordion-content { max-height: 500px; opacity: 1; }
.accordion .accordion-content p {
  padding: 0 14px 14px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .shop-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .header-user .username, .searchdiv, .tabbar-no-tabs { display: none; }
  .product { flex-direction: column; align-items: stretch; }
  .product-img { width: 100%; height: auto; aspect-ratio: 1 / 1; max-width: 320px; align-self: center; }
  .card { padding: 16px; }
}
