/* ============================================================
   Mediateca – armadi / scaffali / scatoloni
   ============================================================ */

/* Griglie unità */
.storage-units-grid{
  display: grid;
  gap: 0.25rem;
}

.storage-units-row{
  display: flex;
  gap: 0.25rem;
}

.storage-unit-cell{
  flex: 1 1 0;
  min-width: 0;
}

.storage-unit-cell--full{
  flex: 0 0 100%;
}

/* Scatoloni */
.box-units-row{
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.box-unit-cell{
  flex: 0 0 20%;
  min-width: 140px;
}

/* Legenda settori */
.storage-sector-legend-wrap{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.75rem;
}

.storage-sector-legend-title{
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.6);
  font-weight: 600;
}

.storage-sector-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.storage-sector-chip{
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  padding: 0.12rem 0.5rem 0.12rem 0.35rem;
  background: rgba(255, 255, 255, 0.8);
  max-width: 220px;
}

.storage-sector-swatch{
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  border: 2px solid transparent;
  flex: 0 0 auto;
}

.storage-sector-letter{
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.storage-sector-label{
  min-width: 0;
  font-size: 0.88rem;
  color: rgba(0, 0, 0, 0.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 575.98px){
  .storage-sector-chip{
    max-width: 170px;
  }
}

/* Card armadio (solo bordo) */
.storage-cabinet-card{
  --storage-cabinet-title-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.35rem);
  border: 3px solid rgba(0, 0, 0, 0.55);
  border-radius: 0.95rem;
  padding: 0.75rem;
  background: transparent;
}

.storage-cabinet-title{
  font-size: var(--storage-cabinet-title-size);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.6rem;
}

.storage-shelves-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.storage-door-col{
  display: grid;
  gap: 0.5rem;
}

.storage-door-title{
  font-size: calc(var(--storage-cabinet-title-size) * 0.7);
  line-height: 1.15;
  text-align: center;
}

.storage-cabinets-row + .storage-cabinets-row{
  margin-top: 0.6rem;
}

/* Split testo / badge (unità logiche) */
.storage-unit-btn-inner{
  display: flex;
  align-items: stretch;
  width: 100%;
}

.storage-unit-btn-text{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 0.35rem;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.05;
  font-size: 0.94rem;
}

.storage-unit-btn-badge{
  flex: 0 0 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* Bottoni scaffale */
.shelf-btn{
  padding: 0.28rem 0.4rem;
  border-width: 2px;
  border-radius: 0.75rem;
}

/* Vuoti: più bassi (come già deciso) */
.shelf-btn-empty{
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.35) !important;
  border-style: solid !important;
  color: rgba(0, 0, 0, 0.65) !important;
  padding: 0.22rem 0.45rem;
}
