/* ============================================================
   Tables — item reference tables, combo tables, rarity tables
   ============================================================ */

/* GRID DA ABA TABELAS */

#tablesArea {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

/* ITEM HEADER NA TABELA */

.tableItem {
  background: #2f1c0c;
  border: 2px solid #6a4a20;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* SLOT ITEM */

.tableIcon {
  width: 48px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 6px;
}

.tableName {
  text-align: center;
  font-weight: bold;
  margin-bottom: 6px;
}

.tableStats {
  text-align: center;
  margin-bottom: 8px;
  font-size: 13px;
}

/* TABELA DE COMBOS */

.comboTableTitle {
  font-weight: bold;
  font-size: 12px;
  text-align: center;
  margin: 10px 0 3px;
  color: #f0e0b0;
  opacity: 0.85;
  letter-spacing: 0.03em;
}

.comboTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-family: monospace;
}

.comboTable th {
  background: #3a2410;
  border: 1px solid #6a4a20;
  padding: 4px;
}

.comboTable td {
  border: 1px solid #6a4a20;
  padding: 4px;
  text-align: center;
}

.comboRange {
  display: block;
  font-weight: bold;
}

.comboReq {
  display: block;
  font-size: 0.85em;
  color: #ccc;
}

.singleStat {
  margin: 20px auto 0;
  height: 120px;
  padding: 12px 0;
  width: max-content;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  color: #cccccc;
  font-weight: bolder;
  text-align: center;
}

/* TABELA DE RARIDADE */

.rarityThresholds {
  width: 100%;
  margin: 8px 0 10px;
}

.rarityTitle {
  font-weight: bold;
  margin-bottom: 6px;
  text-align: center;
}

.rarityTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rarityTable th,
.rarityTable td {
  border: 1px solid #6a4a20;
  padding: 4px;
  text-align: center;
  font-size: 12px;
}

.rarityTable th {
  background: #3a2410;
}

.rarityName {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  font-weight: bold;
}

.rarityName::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
  flex: 0 0 10px;
}

.rarityRow.rarity-white .rarityName {
  color: #f2f2f2;
}

.rarityRow.rarity-blue .rarityName {
  color: #4ea8ff;
}

.rarityRow.rarity-purple .rarityName {
  color: #b47dff;
}

.rarityRow.rarity-gold .rarityName {
  color: #f0be3c;
}

@media (max-width: 740px) {
  #tablesArea {
    grid-template-columns: 1fr;
  }

  .tableItem {
    padding: 8px;
  }

  .comboTableTitle {
    font-size: 11px;
  }

  .comboTable td,
  .comboTable th,
  .rarityTable th,
  .rarityTable td {
    font-size: 11px;
    padding: 3px;
  }
}
