/* ==========================================================================
   CORNER SHOP
   Layout for the four money games. Shared chrome (screens, top bar, score
   pill, chips, answer buttons, settings, confetti) lives in kids-common.css.
   Coins and notes are SVGs drawn by shop-engine.js at their real relative
   sizes, so nothing here sets a coin's width.
   ========================================================================= */

.game-btn.mode-know { background: #c99a1e; }
.game-btn.mode-count { background: #1d9e75; }
.game-btn.mode-pay { background: #3f8fd9; }
.game-btn.mode-change { background: #c0504d; }

#scr-play {
  align-items: stretch;
}

/* Five ages have to sit on one row on a phone. */
#level-chips .chip {
  min-width: 54px;
  padding: 7px 6px;
}

#level-chips .chip-note {
  white-space: nowrap;
  font-size: 0.7rem;
}

.coin,
.coin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.coin-svg {
  display: block;
  filter: drop-shadow(0 2px 1px rgba(60, 52, 137, 0.25));
}

/* ===================== The counter ===================== */

.counter {
  width: 100%;
  max-width: 460px;
  background: #fffdf8;
  border: 3px solid #efe1c9;
  border-bottom: 8px solid #b98a55;   /* the wooden counter top */
  border-radius: 0 0 18px 18px;
  overflow: hidden;
}

/* Red and white stripes, as on every corner shop's awning. */
.awning {
  height: 18px;
  background: repeating-linear-gradient(90deg, #d94a3d 0 22px, #ffffff 22px 44px);
  border-bottom: 3px solid #b23a2f;
}

.counter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 10px 6px;
}

.customer {
  font-size: 3rem;
  line-height: 1;
}

.basket {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.item-pic {
  font-size: 2.6rem;
  line-height: 1;
}

/* A swing tag. */
.price-tag {
  background: #fff4c2;
  border: 2px solid #e0b93a;
  border-radius: 6px 14px 14px 6px;
  padding: 2px 10px 2px 8px;
  font-size: 1.2rem;
  font-weight: 900;
  color: #6a4b00;
  white-space: nowrap;
}

.counter-coins {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px 12px;
}

/* 1p coins on the first level go down in rows of five, so seven reads as
   "five and two more" - the same rule Number Adventures uses for its dots. */
.counter-coins.fives {
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: center;
}

/* ===================== Know your coins ===================== */

.shop-sign {
  font-size: 4.2rem;
  line-height: 1;
}

.same-show {
  display: flex;
  align-items: center;
  gap: 12px;
}

.same-eq {
  font-size: 2rem;
  font-weight: 900;
  color: var(--kids-ink);
}

.shop-answers {
  align-items: center;
}

.money-btn {
  font-size: 1.6rem;
  min-width: 96px;
}

.answer-grid.of-four {
  max-width: 230px;
}

/* A coin as an answer: no box, just the coin, with a ring to show right and
   wrong - a box round it would hide the shape, which is half the clue. */
.coin-btn {
  background: transparent;
  border: 3px solid transparent;
  border-radius: 50%;
  padding: 4px;
  cursor: pointer;
  font-family: inherit;
  min-width: 48px;
  min-height: 48px;
}

.coin-btn:active {
  transform: scale(0.93);
}

.coin-btn.answer-coin {
  min-width: 88px;
  min-height: 88px;
}

.coin-btn.right {
  border-color: var(--kids-green);
  background: #e4f6ef;
}

.coin-btn.wrong {
  border-color: var(--kids-red);
  background: #fdecea;
}

.coin-btn[disabled] {
  cursor: default;
}

/* ===================== Take the money and Give change ===================== */

.paid-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.paid-label {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--kids-ink-soft);
}

.tray {
  width: 100%;
  max-width: 460px;
  margin-top: 12px;
  background: #f3efe6;
  border: 3px dashed #c9bda6;
  border-radius: 16px;
  padding: 8px 10px 10px;
}

.tray-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.tray-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--kids-muted);
}

.tray-total {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--kids-green);
}

.tray-coins {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 60px;
}

.tray-empty {
  font-size: 0.9rem;
  font-weight: 700;
  color: #a39b8b;
}

.purse-area {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.purse-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--kids-ink-soft);
}

.purse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 6px;
  max-width: 460px;
  background: #fbf3ff;
  border: 3px solid #e6d6f5;
  border-radius: 18px;
  padding: 8px;
}

.done-btn {
  margin-top: 4px;
}

.done-btn[disabled] {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 380px) {
  .customer { font-size: 2.4rem; }
  .item-pic { font-size: 2.1rem; }
  .price-tag { font-size: 1.05rem; }
}
