/* Streets of London RP - store page
   Loaded after /styles.css. The header, footer, type, colours, buttons and
   page transitions are the site's own; this only lays out the store. Kept
   deliberately plain: the package art carries the colour. */

body.is-locked { overflow: hidden }

.button.wide { width: 100% }
.button.is-owned { color: var(--good) }
.button[disabled] { cursor: progress }

/* ============================================================== Accounts */

.accounts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.account {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 10px 10px 16px;
  background: var(--surface);
  border-radius: var(--round-sm);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.account-label { display: block; font-family: RevainUI, sans-serif; font-size: 12px; color: var(--dim); line-height: 1.3 }
.account-name { display: block; font-family: RevainUI, sans-serif; font-size: 15px; font-weight: 500; color: var(--muted); line-height: 1.4 }
.account.is-done { padding-right: 16px }
.account.is-done .account-name { color: var(--text) }
.account.is-done .account-name::before { content: '\2713'; margin-right: 8px; color: var(--good) }
.account .button { padding: 8px 16px; font-size: 14px }

.sign-out {
  padding: 8px 6px;
  border: 0;
  background: none;
  color: var(--dim);
  font-family: RevainUI, sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: color .2s ease;
}
.sign-out:hover { color: var(--text) }

.account-help { margin: 0; font-size: 14px; color: var(--dim) }

/* ============================================================ Categories */

.store-category { margin-top: 56px }
.category-head { margin-bottom: 18px }
.category-head h2 { margin-bottom: 2px }
.category-head p { margin: 0; color: var(--muted) }
.coming-soon { color: var(--dim); margin: 0 }

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.package-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 12px 12px 14px;
  background: var(--surface);
  border-radius: var(--round);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: box-shadow .3s ease, transform .4s var(--ease);
}
.package-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px rgba(0, 0, 0, .4) }

.card-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.card-media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 18px;
  border-radius: var(--round-sm);
  background: var(--ink);
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ease) }
.package-card:hover .card-media img { transform: scale(1.04) }

.card-info { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 4px 0 }
.card-name { font-family: RevainUI, sans-serif; font-size: 16px; font-weight: 500; line-height: 1.35 }

.price {
  flex: none;
  font-family: RevainUI, sans-serif;
  font-size: 16px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price small { font-size: 13px; color: var(--dim) }

.package-card.loading { min-height: 330px; animation: pulse 1.6s ease-in-out infinite }
@keyframes pulse { 50% { opacity: .5 } }

.refunds { margin: 64px 0 0; font-size: 14px; color: var(--dim) }

/* ================================================================ Basket */

.basket-button {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px 13px 20px;
  border: 0;
  border-radius: var(--round-sm);
  background: var(--accent);
  color: var(--ink);
  font: 500 15px/1 RevainUI, sans-serif;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  cursor: pointer;
  animation: rise .4s var(--ease) both;
  transition: background .2s ease;
}
.basket-button:hover { background: #fff }
.count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--accent);
  font-size: 12px;
}

.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(4, 5, 7, .6); animation: fade .25s ease both }

.basket {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: min(400px, 100%);
  background: var(--surface);
  box-shadow: inset 1px 0 0 var(--line-soft);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .4s var(--ease), visibility .4s;
}
.basket.is-open { transform: none; visibility: visible }

.basket-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line-soft) }
.basket-head h2 { margin: 0; font-size: 22px }
.basket-body { flex: 1; overflow-y: auto; padding: 6px 22px }
.basket-empty { padding: 18px 0; color: var(--dim) }

.basket-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-soft) }
.basket-item:first-child { border-top: 0 }
.basket-item .name { flex: 1; min-width: 0 }
.basket-item strong { display: block; font-family: RevainUI, sans-serif; font-weight: 500 }
.basket-item .name span { font-size: 13px; color: var(--dim) }
.basket-item .amount { font-family: RevainUI, sans-serif; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap }

.x {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--raise);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.x:hover { background: rgba(255, 255, 255, .12); color: var(--text) }

.basket-foot { display: grid; gap: 14px; padding: 18px 22px 22px; border-top: 1px solid var(--line-soft) }
.inline-form { display: flex; gap: 8px }
.inline-form input { flex: 1; min-width: 0 }
.basket-total { display: flex; justify-content: space-between; align-items: baseline; font-family: RevainUI, sans-serif }
.basket-total strong { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums }
.basket .small { margin: 0; font-size: 13px; color: var(--dim); text-align: center }

/* =============================================================== Details */

.package-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--round);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 0 0 1px var(--line-soft);
  overflow: auto;
}
.package-dialog[open] { display: grid; grid-template-columns: 1fr 1fr; animation: rise .35s var(--ease) both }
.package-dialog::backdrop { background: rgba(4, 5, 7, .65) }
.dialog-media { display: grid; place-items: center; padding: 28px; background: var(--ink) }
.dialog-media img { width: 100%; height: auto }
.dialog-body { display: flex; flex-direction: column; padding: 30px 26px 24px }
.dialog-body h2 { margin: 0 0 4px; padding-right: 30px }
.dialog-body > .price { margin: 0 0 16px; font-size: 18px }
.dialog-body .prose { flex: 1; margin-bottom: 22px }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 1 }

.prose { color: var(--muted); font-size: 15.5px; line-height: 1.7; overflow-wrap: anywhere }
.prose [style] { font-family: inherit !important; font-size: inherit !important; text-align: left !important; color: inherit !important }
.prose u { text-decoration: none }
.prose em, .prose i { font-style: normal }
.prose strong, .prose b { color: var(--text); font-weight: 500 }
.prose ul { padding-left: 20px; margin: 0 0 10px }
.prose p { margin: 0 0 10px }

/* ================================================================= Toast */

.toast {
  position: fixed;
  top: 86px;
  left: 50%;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 10px 10px 10px 16px;
  background: var(--surface-2);
  border-radius: var(--round-sm);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line);
  font-size: 14.5px;
  transform: translateX(-50%);
  animation: toast-in .4s var(--ease) both;
}
.toast-success #toast-text::before { content: '\2713'; margin-right: 8px; color: var(--good) }
.toast-error #toast-text::before { content: '!'; margin-right: 8px; color: var(--danger); font-weight: 700 }
.toast.is-leaving { animation: toast-out .25s ease both }
.toast button { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--raise); font-size: 16px; cursor: pointer }

/* ================================================================ Footer */

.store-footer .tebex-legal { flex-basis: 100%; margin: 2px 0 0; font-size: 12.5px; color: var(--dim) }
.store-footer .tebex-legal a { font-size: 12.5px; margin-left: 10px; text-decoration: underline; text-underline-offset: 3px }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -10px) } to { opacity: 1; transform: translate(-50%, 0) } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, -8px) } }

/* ================================================================ Mobile */

@media (max-width: 760px) {
  .package-dialog[open] { grid-template-columns: 1fr }
  .dialog-media { padding: 22px }
  .dialog-media img { max-height: 200px; width: auto }
}

@media (max-width: 600px) {
  .accounts { display: grid; grid-template-columns: 1fr }
  .account { justify-content: space-between }
  .sign-out { justify-self: start }
  .package-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)) }
  .toast { top: auto; bottom: 84px }
  .dialog-body { padding: 22px 18px 18px }
}
