/* shop page styles — uses CSS variables from base.css */

.shop-page {
  padding: 20px 16px 40px;
  max-width: 560px;
}

.shop-header {
  text-align: center;
  margin-bottom: 28px;
}

.shop-header-icon {
  font-size: 2.6rem;
  margin-bottom: 4px;
}

.shop-title {
  margin: 0 0 14px;
  font-weight: 800;
}

.shop-balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 800;
  font-size: 1.3rem;
}

.shop-balance-icon {
  font-size: 1.3rem;
}

.shop-balance-amount {
  color: var(--gold);
}

.shop-balance-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.shop-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shop-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 0 var(--shadow);
}

.shop-item-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.shop-item-body {
  flex: 1;
  min-width: 0;
}

.shop-item-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.shop-item-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.shop-item-meta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.shop-item-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.btn-shop-buy {
  border: none;
  border-radius: 12px;
  background: var(--green);
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 18px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--green-dark);
  transition: transform 0.1s ease;
  white-space: nowrap;
}
.btn-shop-buy:active:not([disabled]) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--green-dark);
}
.btn-shop-buy[disabled] {
  background: var(--border);
  color: var(--border-strong);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-shop-buy-cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shop-item-reason {
  max-width: 160px;
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Toast / purchase confirmation */
.shop-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 12px);
  min-width: 240px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card-bg);
  border: 2px solid var(--green);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 8px 20px var(--shadow);
  opacity: 0;
  z-index: 2000;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.shop-toast-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.shop-toast-error {
  border-color: var(--red);
}
.shop-toast-title {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text);
}
.shop-toast-error .shop-toast-title {
  color: var(--red);
}
.shop-toast-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .shop-toast {
    transition: opacity 0.01ms linear;
    transform: translate(-50%, 0);
  }
  .btn-shop-buy {
    transition: none;
  }
}

@media (max-width: 420px) {
  .shop-item {
    flex-wrap: wrap;
  }
  .shop-item-action {
    align-items: flex-start;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .shop-item-reason {
    text-align: left;
  }
}
