/* Rarity page; builds on buildings.css. */

.lookup, .tabs, .result, .section_title, .item_shares {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.lookup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  color: #1a1218;
}

.lookup input {
  width: 140px;
  padding: 6px;
  font-size: 16px; /* stops iOS zooming on focus */
  color: #df7126;
  background-color: #f0f682;
  border: 2px solid #df7126;
}

.lookup button {
  padding: 8px 12px;
  font-size: 11px;
  color: #df7126;
  background-color: #f0f682;
  border: 3px solid #df7126;
  cursor: pointer;
}

.lookup button:hover {
  border-color: transparent;
}

.result {
  margin-bottom: 20px;
}

@media (min-width: 640px) {
  .result {
    flex-direction: row;
  }

  .result .building_image {
    flex: 0 0 50%;
    border-bottom: 0;
    border-right: 3px solid #df7126;
  }

  .result .building_info {
    flex: 1;
  }
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tabs a {
  padding: 6px 10px;
  font-size: 12px;
  text-decoration: none;
  border: 3px solid #df7126;
}

.tabs a.active {
  color: #f0f682;
  background-color: #df7126;
}

.building h2 a {
  text-decoration: none;
}

.rank_line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #1a1218;
}

.rank {
  font-size: 18px;
  color: #df7126;
}

.tier {
  padding: 2px 6px;
  font-size: 9px;
  text-transform: uppercase;
  color: #fff;
  background-color: #8a6a2a;
}

.tier_legendary { background-color: #c0392b; }
.tier_epic { background-color: #7d3c98; }
.tier_rare { background-color: #2471a3; }
.tier_uncommon { background-color: #1e8449; }

.traits {
  margin-top: 10px;
  list-style: none;
  font-size: 11px;
  color: #1a1218;
}

.traits li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px dashed #df7126;
}

.traits li.bonus span:first-child {
  color: #df7126;
}

.traits li span:last-child {
  flex-shrink: 0;
  color: #8a6a2a;
}

.section_title {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: normal;
  color: #1a1218;
}

.item_shares {
  list-style: none;
  font-size: 11px;
  color: #1a1218;
}

.item_shares li {
  display: grid;
  grid-template-columns: minmax(0, 12em) 1fr 3.5em;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
}

.item_name {
  overflow-wrap: anywhere;
}

.bar {
  height: 10px;
  background-color: #f0f682;
  border: 2px solid #df7126;
}

.bar span {
  display: block;
  height: 100%;
  background-color: #df7126;
}

.item_pct {
  text-align: right;
  color: #8a6a2a;
}
