@import url("./design-tokens.css");
@import url("./base.css");
@import url("./responsive.css");

.cookie-banner[hidden] {
  display: none;
}

.product-card__cta:disabled,
.product-card__cta[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.header-basket-link {
  flex-shrink: 0;
  padding-inline: var(--space-4);
}

.site-header[data-hero-mode="true"]:not(.scrolled) .header-basket-link.btn--outline-primary {
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.75);
}

.site-header[data-hero-mode="true"]:not(.scrolled) .header-basket-link.btn--outline-primary:hover {
  background-color: rgba(255, 255, 255, 0.16);
  color: var(--color-white);
}

.basket-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.basket-feedback p {
  margin: 0;
}

.basket-feedback--success {
  border-color: rgba(22, 101, 52, 0.18);
  background-color: #f1fbf4;
}

.basket-feedback--info {
  border-color: rgba(30, 64, 175, 0.18);
  background-color: #eff6ff;
}

.basket-feedback--error {
  border-color: rgba(185, 28, 28, 0.18);
  background-color: #fef2f2;
}

.digital-shop-public-product__divider {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.digital-shop-public-eyebrow,
.digital-shop-public-section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(48, 83, 64, 0.14);
  border-radius: var(--radius-full);
  background-color: rgba(48, 83, 64, 0.08);
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
}

.digital-shop-public-note,
.digital-shop-public-support-copy {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.digital-shop-public-meta-value {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.digital-shop-public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

.digital-shop-public-actions .btn {
  justify-content: center;
}

.digital-shop-public-download-card {
  border-color: rgba(48, 83, 64, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf5 100%);
}

.digital-shop-public-download-actions {
  display: grid;
  gap: var(--space-2);
  justify-items: end;
  align-content: start;
}

.digital-shop-public-divider {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--color-border);
}

.digital-shop-public-product__available-soon-cta {
  display: grid;
  gap: var(--space-2);
}

.digital-shop-public-product__available-soon-cta p {
  margin: 0;
  line-height: 1.75;
  color: var(--color-text-muted);
}

.digital-shop-public-product__available-soon-cta a {
  justify-self: start;
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
}

.digital-shop-public-product__media-viewer {
  display: grid;
  gap: var(--space-4);
}

.digital-shop-public-product__media-frame {
  border-radius: var(--radius-xl);
}

.digital-shop-public-product__media-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}

.digital-shop-public-product__media-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.digital-shop-public-product__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.25rem, 1fr));
  gap: var(--space-3);
}

.digital-shop-public-product__gallery-thumb {
  padding: 0;
  border: 2px solid transparent;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: #f3f0e7;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.digital-shop-public-product__gallery-thumb:hover {
  transform: translateY(-2px);
}

.digital-shop-public-product__gallery-thumb.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(48, 83, 64, 0.14);
}

.digital-shop-public-product__gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.digital-shop-public-product__media-link:focus-visible,
.digital-shop-public-product__gallery-thumb:focus-visible,
.digital-shop-public-product__lightbox-close:focus-visible {
  outline: 3px solid rgba(48, 83, 64, 0.45);
  outline-offset: 3px;
}

.digital-shop-public-product__lightbox[hidden] {
  display: none;
}

.digital-shop-public-product__lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(17, 24, 39, 0.82);
}

.digital-shop-public-product__lightbox-dialog {
  width: min(100%, 64rem);
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background: var(--color-white);
  box-shadow: var(--shadow-lg);
}

.digital-shop-public-product__lightbox-close {
  justify-self: end;
}

.digital-shop-public-product__lightbox-frame {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: #111827;
}

.digital-shop-public-product__lightbox-frame img {
  display: block;
  width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  object-fit: contain;
}

.digital-shop-public-product__lightbox-caption {
  margin: 0;
  color: var(--color-text-muted);
}

.digital-shop-public-product__video-panel {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf5 100%);
  box-shadow: var(--shadow-sm);
}

.digital-shop-public-product__video-caption {
  margin: 0;
  font-weight: var(--font-weight-semibold);
}

.digital-shop-public-product__video-frame {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: #111827;
}

.digital-shop-public-product__video-frame--widescreen {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.digital-shop-public-product__video-frame--tiktok {
  width: min(100%, 400px);
  margin: 0 auto;
  aspect-ratio: 9 / 16;
}

.digital-shop-public-product__video-frame iframe,
.digital-shop-public-product__video-frame video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.digital-shop-public-product__video-help {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

.digital-shop-public-product__video-help a {
  font-weight: var(--font-weight-semibold);
}

.steam-auth-login,
.steam-auth-account {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 2.75rem;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

.steam-auth-login:focus-visible,
.steam-auth-logout:focus-visible {
  outline: 3px solid rgba(48, 83, 64, 0.45);
  outline-offset: 3px;
}

.steam-auth-icon {
  width: 1.5rem;
  height: 1.5rem;
  max-width: none;
  object-fit: contain;
  flex: 0 0 auto;
}

.steam-auth-avatar {
  width: 2.25rem;
  height: 2.25rem;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.steam-auth-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: var(--font-weight-bold);
}

.steam-auth-user {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.steam-auth-account form { flex: 0 0 auto; }

.steam-auth-logout {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background-color: transparent;
  color: var(--color-primary);
  font: inherit;
  font-weight: var(--font-weight-semibold);
}

@media (max-width: 480px) {
  .steam-auth-account { max-width: 100%; gap: var(--space-2); padding: var(--space-2) var(--space-3); }
  .steam-auth-user { max-width: 10rem; }
}

.product-card__availability {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  margin-top: var(--space-2);
  padding: 0 var(--space-3);
  border-radius: 999px;
  background-color: rgba(48, 83, 64, 0.08);
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

.digital-shop-basket-layout {
  display: grid;
  gap: var(--space-8);
}

.digital-shop-basket-items {
  display: grid;
  gap: var(--space-6);
}

.digital-shop-basket-item {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.digital-shop-basket-item__media {
  display: block;
  width: 100%;
  max-width: 12rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background-color: #f3f0e7;
  box-shadow: var(--shadow-sm);
}

.digital-shop-basket-item__media img,
.digital-shop-basket-item__placeholder {
  width: 100%;
  height: 100%;
}

.digital-shop-basket-item__media img {
  object-fit: cover;
}

.digital-shop-basket-item__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.digital-shop-basket-item__body {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  min-width: 0;
}

.digital-shop-basket-summary {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(249,247,241,1) 100%);
  box-shadow: var(--shadow-sm);
  align-self: start;
}

.digital-shop-basket-summary__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.digital-shop-basket-summary__row span {
  color: var(--color-text-muted);
}

.digital-shop-basket-summary__row strong {
  text-align: right;
}

.header-steam-auth { min-width: 0; }
.steam-auth-modal[hidden]{display:none}.steam-auth-modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:var(--space-4)}.steam-auth-modal__backdrop{position:absolute;inset:0;background:rgba(17,24,39,.58)}.steam-auth-modal__card{position:relative;width:min(100%,30rem);padding:var(--space-6);border-radius:var(--radius-xl);background:var(--color-white);box-shadow:var(--shadow-lg)}.steam-auth-modal__card h2{margin:0 0 var(--space-3)}.steam-auth-modal__card p{margin:0 0 var(--space-5);line-height:1.6}
.header-steam-auth--desktop { display: none; }
.header-steam-auth--mobile { margin-top: var(--space-3); }
.site-header .steam-auth-login,
.site-header .steam-auth-account { min-height: 2.25rem; gap: var(--space-2); padding: var(--space-1) var(--space-3); box-shadow: none; }
.site-header .steam-auth-icon { width: 1.25rem; height: 1.25rem; }
.site-header .steam-auth-avatar { width: 2rem; height: 2rem; }
.site-header .steam-auth-user { max-width: 8rem; font-size: var(--font-size-sm); }
.site-header .steam-auth-logout { min-height: 2rem; padding-inline: var(--space-2); font-size: var(--font-size-xs); }

@media (min-width: 768px) {
  .header-steam-auth--desktop { display: block; }
  .header-steam-auth--mobile { display: none; }
}

@media (min-width: 960px) {
  .digital-shop-basket-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.9fr);
    align-items: start;
  }

  .digital-shop-basket-item {
    grid-template-columns: minmax(10rem, 12rem) minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 959px) {
  .digital-shop-public-actions .btn,
  .digital-shop-public-actions form {
    width: 100%;
  }

  .digital-shop-public-actions form button {
    width: 100%;
  }

  .digital-shop-public-download-actions {
    justify-items: stretch;
  }

  .digital-shop-public-download-actions .btn {
    width: 100%;
  }

  .digital-shop-basket-item__media {
    max-width: 100%;
  }

  .digital-shop-public-product__gallery {
    grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
  }
}
