/* =========================================================
   SHELTER CARD
   ========================================================= */

.shelter-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.shelter-card[hidden] {
  display: none;
}


/* =========================================================
   SHELTER HEADER
   ========================================================= */

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

.shelter-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.shelter-subtitle {
  margin: 4px 0 0;

  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 800;
}

.shelter-type-badge {
  padding: 6px 10px;

  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 8px;

  background: rgba(52, 211, 153, 0.14);

  color: #bbf7d0;
  font-size: 0.75rem;
  font-weight: 900;
}


/* =========================================================
   SHELTER TOP
   ========================================================= */

.shelter-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.shelter-top h2 {
  margin: 0;
  font-size: 1.35rem;
}

.shelter-top small {
  display: block;

  margin-top: 2px;

  color: #94a3b8;
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 800;
}


/* =========================================================
   SHELTER SUMMARY
   ========================================================= */

.shelter-summary {
  display: flex;
  gap: 8px;

  margin-left: auto;
}

.shelter-summary span {
  min-height: 34px;
  padding: 8px 10px;

  border: 1px solid rgba(167, 243, 208, 0.2);
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.06);

  color: #d1fae5;
  font-size: 0.86rem;
  font-weight: 800;
}


/* =========================================================
   SHELTER STORAGE GRID
   ========================================================= */

.shelter-storage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}


/* =========================================================
   SHELTER STORAGE SLOT
   ========================================================= */

.shelter-storage-slot {
  position: relative;

  display: grid;
  grid-template-rows: minmax(0, 1fr);

  min-width: 0;
  min-height: 105px;
  padding: 8px;
  padding-bottom: 30px;

  box-sizing: border-box;
  overflow: hidden;

  border: 1px dashed rgba(148, 163, 184, 0.34);
  border-radius: 8px;

  background: rgba(15, 23, 42, 0.46);

  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 800;
}

/* Dolu slot */
.shelter-storage-slot.is-filled {
  border-style: solid;
  border-color: rgba(52, 211, 153, 0.28);

  background: rgba(30, 41, 59, 0.58);
}

/* Büyük footer varsa altta yer ayır */
.shelter-storage-slot.has-item-footer {
  min-height: 142px;
  padding-bottom: 62px;
}


/* =========================================================
   SHELTER ITEM INFO
   ========================================================= */

.shelter-storage-slot .item-info {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 5px;

  width: 100%;
  min-width: 0;
  min-height: 0;
}

.shelter-storage-slot .item-image {
  width: min(70px, 78%);
  height: 58px;

  object-fit: contain;
}

.shelter-storage-slot .item-info strong {
  display: block;

  width: 100%;
  max-width: 100%;

  overflow: hidden;

  color: #e2e8f0;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =========================================================
   SHELTER QUANTITY BADGE
   ========================================================= */

.shelter-storage-slot > .quantity-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 6;

  min-width: 22px;
  height: 22px;
  padding: 0 5px;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;

  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);

  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
}


/* =========================================================
   NORMAL ITEM WEIGHT
   Sağ altta küçük rozet
   ========================================================= */

.shelter-storage-slot > .item-standalone-weight {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 5;

  padding: 3px 7px;

  border: 1px solid rgba(70, 140, 255, 0.3);
  border-radius: 999px;

  background: rgba(8, 18, 40, 0.92);

  color: #ffffff;
  font-size: 0.63rem;
  font-weight: 800;
  line-height: 1;

  white-space: nowrap;
}


/* =========================================================
   LARGE FOOTER
   Durability ve container
   ========================================================= */

.shelter-storage-slot > .item-footer-box,
.shelter-storage-slot > .item-footer-metric {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  z-index: 5;

  width: auto;
  padding: 6px 7px;
}

/* Durability sayı alanı */
.shelter-storage-slot .item-footer-main-value {
  font-size: 0.67rem;
}

/* Container adı ve miktarı */
.shelter-storage-slot .item-footer-metric-title,
.shelter-storage-slot .item-footer-metric-value {
  font-size: 0.64rem;
}

/* ml yazısı */
.shelter-storage-slot .item-footer-metric-subtext {
  font-size: 0.6rem;
}

/* Footer içindeki ağırlık */
.shelter-storage-slot .item-footer-weight,
.shelter-storage-slot .item-footer-inline-weight {
  font-size: 0.61rem;
}

/* Barlar */
.shelter-storage-slot .item-footer-bar,
.shelter-storage-slot .item-footer-metric-bar {
  height: 4px;
}


/* =========================================================
   EMPTY SLOT
   ========================================================= */

.shelter-empty-label {
  align-self: center;
  justify-self: center;

  opacity: 0.25;
}


/* =========================================================
   DESTROY BUTTON
   ========================================================= */

.destroy-shelter-button {
  padding: 8px 12px;

  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: 8px;

  background: rgba(239, 68, 68, 0.15);

  color: #fecaca;
  cursor: pointer;

  font-size: 0.8rem;
  font-weight: 800;

  transition: background 150ms ease;
}

.destroy-shelter-button:hover {
  background: rgba(239, 68, 68, 0.3);
}