/* static/vault.css
   Vault grid styling (drag/drop friendly).
*/

.vault-page{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

.vault-title{
  margin: 0 0 14px 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.vault-error{
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,120,120,.25);
  background: rgba(22,12,12,.55);
}

.vault-card{
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--border, rgba(255,255,255,.12));
  background: color-mix(in srgb, var(--bg-elevated, rgba(255,255,255,.04)) 92%, transparent);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}

/* Grid */
.inventory-grid{
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 12px;
}

/* Slot */
.slot{
  position: relative;

  width: 100%;
  aspect-ratio: 1 / 1;

  border-radius: 14px;

  display: grid;
  place-items: center;

  user-select: none;

  border: 1px dashed rgba(255,255,255,.14);
  background: rgba(0,0,0,.10);

  transition: transform .08s ease, border-color .12s ease, background .12s ease, filter .12s ease;
}

.slot.empty{
  opacity: .9;
}

.slot.filled{
  border-style: solid;
  border-color: rgba(255,255,255,.16);
  background: rgba(0,0,0,.14);
}

/* Hover + drop target feel */
.slot:hover{
  border-color: rgba(120,255,190,.18);
  background: rgba(0,0,0,.16);
}

.slot:active{
  transform: scale(.98);
}

/* Draggable hint */
.slot[draggable="true"]{
  cursor: grab;
}
.slot[draggable="true"]:active{
  cursor: grabbing;
}

/* Item image
   IMPORTANT: do NOT disable drag on .slot (container), only on the img.
   Also: pointer-events none so the container receives drag events reliably.
*/
.slot img{
  width: 58%;
  height: 58%;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.45));
  pointer-events: none;
  -webkit-user-drag: none; /* <-- safe here, NOT on the slot */
}

/* Quantity badge */
.count{
  position: absolute;
  right: 8px;
  bottom: 8px;

  padding: 4px 8px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;

  color: rgba(255,255,255,.92);
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.14);

  pointer-events: none;
}

/* Responsive */
@media (max-width: 1200px){
  .inventory-grid{ grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
@media (max-width: 820px){
  .inventory-grid{ grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
