/* Crest Calculator layout isolation and responsive table fixes. */
.crest-calculator {
  width: 100%;
  max-width: none;
}

.crest-calculator__panel {
  width: 100%;
  max-width: none;
  margin: 1rem 0 0;
  border: 1px solid var(--cc-border, rgba(255,255,255,.11));
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.025));
  padding: clamp(1rem, 2.5vw, 1.65rem);
  box-shadow: 0 24px 70px rgba(0,0,0,.18);
}

.crest-calculator__panel.crest-calculator__input {
  margin-top: 0;
}

.crest-calculator__panel.crest-calculator__results {
  padding-bottom: .9rem;
}

.crest-calculator table,
.crest-calculator .table,
.crest-calculator .wrapper,
.crest-calculator__slot-table,
.crest-calculator__info-panel,
.crest-calculator__info-panel > div {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.crest-calculator table {
  display: table;
  border-collapse: collapse;
}

.crest-calculator__slot-table {
  overflow-x: auto;
}

.crest-calculator #cc_slots {
  width: 100%;
  min-width: 720px;
}

.crest-calculator__yield-grid {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.crest-calculator__yield-grid > .left,
.crest-calculator__yield-grid > .right {
  display: flex !important;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 1rem;
  text-align: left !important;
}

.crest-calculator__yield-grid .wrapper {
  display: block;
  align-self: stretch;
  margin: 0;
}

.crest-calculator__yield-grid .wrapper > b,
.crest-calculator__yield-grid th,
.crest-calculator__info-panel .wrapper > b,
.crest-calculator__info-panel th {
  text-align: left !important;
}

.crest-calculator__yield-grid .table,
.crest-calculator__info-panel .table {
  overflow-x: auto;
}

.crest-calculator__yield-grid table,
.crest-calculator__info-panel .cc-mini,
.crest-calculator #cc_upgrade_costs_inner table,
.crest-calculator #cc_crest_achievements_inner table {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
}

.crest-calculator__info-panel[open] {
  min-height: 0;
}

.crest-calculator__info-panel > :not(summary) {
  margin-top: 0;
}

@media (max-width: 900px) {
  .crest-calculator__yield-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .crest-calculator__panel {
    border-radius: .8rem;
    padding: 1rem;
  }

  .crest-calculator #cc_slots {
    min-width: 650px;
  }
}


.crest-calculator .cc-info-heading {
  display: block;
  margin-bottom: .75rem;
}

.crest-calculator .cc-track-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: .75rem;
}

.crest-calculator .cc-track-card {
  min-width: 0;
  border-left: 2px solid rgba(255,255,255,.12);
  padding-left: .75rem;
}

.crest-calculator .cc-track-card__title {
  margin-bottom: .55rem;
}

.crest-calculator .cc-track-card__ranks {
  display: grid;
  gap: .3rem;
}

.crest-calculator .cc-track-rank {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  align-items: baseline;
  gap: .5rem;
}

.crest-calculator .cc-track-rank span {
  color: #a1a1aa;
}

.crest-calculator .cc-track-rank strong {
  color: #f4f4f5;
}

.crest-calculator .cc-track-rank.is-display-only {
  opacity: .48;
}


.crest-calculator .cc-upgrade-cost-heading {
  margin-top: 1rem;
}

.crest-calculator .cc-upgrade-cost-table {
  margin-top: 0;
}

@media (max-width: 760px) {
  .crest-calculator .cc-track-grid {
    grid-template-columns: 1fr;
  }
}
