/* The gem store over the game: a pale-blue popup in the game's blue frame,
   gem cards with green Buy buttons, like Dragon City's own cash store. */

.btn--store { background: linear-gradient(180deg, #e08cff 0%, #b23cf0 55%, #7a1fb3 100%); color: #fff; text-shadow: 0 1px 0 var(--ink); }

.store {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.store::backdrop { background: rgba(5, 25, 55, 0.7); }

.store__board {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  padding: 16px 18px 14px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-deep) 100%);
  box-shadow: 0 0 0 5px var(--frame) inset, 0 0 0 7px var(--gold) inset, 0 18px 50px rgba(0, 0, 0, 0.5);
  font-size: 14px;
}

.store__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.store__title {
  margin: 0;
  color: var(--gold);
  font: 900 26px/1.1 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
}

.store__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(180deg, #ff8a6a 0%, #d62828 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}

.store__close svg { width: 18px; height: 18px; }
.store__close:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

.store__wallet {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 12px 0 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(13, 63, 122, 0.25);
}

.store__balance { display: flex; flex-direction: column; }
.store__label { color: var(--panel-text); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.store__balance strong { font-size: 20px; font-weight: 900; }
.store__topup { display: inline-grid; place-items: center; text-decoration: none; }

.store__sale {
  flex: none;
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: linear-gradient(180deg, #ff6b57 0%, #d62828 100%);
  color: #fff;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 1px 0 var(--ink);
  box-shadow: 0 2px 0 rgba(13, 63, 122, 0.25);
}

.store__sale[hidden] { display: none; }

.store__notice {
  flex: none;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff6cf;
  font-weight: 700;
}

.store__notice[hidden] { display: none; }
.store__notice--warn { background: #ffe7a8; }
.store__notice--error { background: #ffd6cc; }
.store__notice--done { background: #dcf6cc; }

.store__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 4px 4px 0; }

.store__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.store__offer {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 14px 10px 12px;
  border-radius: 18px;
  background: radial-gradient(90% 60% at 50% 30%, #ffffff 0%, #e4f2ff 100%);
  box-shadow: 0 0 0 2px #9cc8ee inset, 0 3px 0 rgba(13, 63, 122, 0.25);
  text-align: center;
}

/* Gems drawn here (the game's own art is inside the SWF): more gems for
   bigger packs, as the original store showed. */
.store__icon {
  --gem: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M6 1h12l5 7-11 13L1 8z' fill='%23c04bff' stroke='%23380a5c' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M1 8h22M9 1l3 20 3-20' fill='none' stroke='%23f3d2ff' stroke-width='1'/%3E%3C/svg%3E");
  width: 64px;
  height: 52px;
  background: var(--gem) center / 34px no-repeat;
  filter: drop-shadow(0 3px 2px rgba(56, 10, 92, 0.35));
}

.store__icon--2 { background: var(--gem) 14px 14px / 30px no-repeat, var(--gem) 26px 4px / 30px no-repeat; }
.store__icon--3, .store__icon--4 { background: var(--gem) 4px 18px / 28px no-repeat, var(--gem) 32px 18px / 28px no-repeat, var(--gem) 18px 2px / 28px no-repeat; }
.store__icon--5, .store__icon--6 { width: 76px; background: var(--gem) 0 22px / 28px no-repeat, var(--gem) 24px 24px / 28px no-repeat, var(--gem) 48px 22px / 28px no-repeat, var(--gem) 12px 2px / 28px no-repeat, var(--gem) 36px 2px / 28px no-repeat; }

.store__name { margin: 0; font: 900 17px/1.2 system-ui, sans-serif; color: var(--ink); }
.store__price { margin: 0 0 4px; display: flex; flex-direction: column; }
.store__price .store__normal { color: var(--panel-text); font-size: 12px; font-weight: 700; opacity: 0.75; }
.store__price strong { font-size: 15px; font-weight: 900; }
.store__price span { color: var(--panel-text); font-size: 11px; font-weight: 700; }
.store__buy { width: 100%; height: 34px; font-size: 14px; }
.store__buy:disabled { filter: grayscale(1); opacity: 0.55; cursor: not-allowed; }

.store__foot { flex: none; margin: 10px 0 0; color: var(--panel-text); font-size: 11px; font-weight: 600; line-height: 1.4; }

.store__confirm {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 22px;
  background: rgba(5, 25, 55, 0.55);
}

.store__confirm[hidden] { display: none; }

.store__confirm-card {
  width: min(380px, 100%);
  padding: 16px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 0 0 3px var(--gold) inset, 0 10px 30px rgba(0, 0, 0, 0.5);
  font-weight: 700;
  line-height: 1.45;
}

.store__confirm-card p { margin: 0 0 12px; }
.store__confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.store__confirm-actions .mini-btn { height: 34px; padding: 0 14px; }

@media (max-width: 640px) {
  .store { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .store__board { max-height: calc(100vh - 16px); padding: 12px 12px 10px; }
  .store__title { font-size: 21px; -webkit-text-stroke-width: 4px; }
  .store__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
