/* Loja de outfits (modal-store.js) */

#store-modal .modal-body {
  width: 560px;
  max-width: calc(100vw - 32px);
}

.store-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
  margin-bottom: 6px;
  background-image: url("/png/bg2.png");
  border: 1px solid rgba(0, 0, 0, 0.8);
}

.store-coins {
  white-space: nowrap;
  color: #f2d27a;
}

.store-message {
  flex: 1 1 auto;
  text-align: right;
  color: #9fe39f;
  min-height: 1em;
}

.store-message.error {
  color: #ff8a80;
}

.store-wrapper {
  display: flex;
  gap: 8px;
}

.store-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 4px;
  max-height: 340px;
  overflow-y: auto;
  padding: 2px;
}

.store-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.8);
  background-image: url("/png/bg2.png");
}

.store-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.store-card.selected {
  border-color: #f2d27a;
  box-shadow: inset 0 0 0 1px #f2d27a;
}

.store-card canvas {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.store-card-name {
  font-size: 11px;
  text-align: center;
  line-height: 1.1;
}

.store-card-price {
  font-size: 10px;
  color: #f2d27a;
}

.store-card.owned .store-card-price {
  color: #9fe39f;
}

.store-detail {
  flex: 0 0 180px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.store-detail-name {
  text-align: center;
  font-weight: bold;
  color: #f2d27a;
  min-height: 1.2em;
}

.store-preview-wrapper {
  position: relative;
  align-self: center;
  background-image: url("/png/bg2.png");
  border: 1px solid rgba(0, 0, 0, 0.8);
}

#store-preview {
  display: block;
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
}

#store-rotate {
  position: absolute;
  top: 2px;
  right: 2px;
}

.store-detail-checkboxes {
  display: flex;
  flex-direction: column;
}

.store-detail-status {
  font-size: 11px;
  text-align: center;
  min-height: 2.4em;
}

.store-buy {
  height: 22px;
}

.store-buy.armed {
  color: #ffd54f;
  border-color: #ffd54f;
}

.store-note {
  font-size: 10px;
  opacity: 0.75;
  text-align: center;
}

@media (max-width: 640px) {
  .store-wrapper {
    flex-direction: column;
  }

  .store-detail {
    flex-basis: auto;
  }

  .store-grid {
    max-height: 200px;
  }
}
