/* Crafting Calculator */
#tec-crafting-calculator {
  max-width: 900px;
  margin: .8rem 0 1.6rem;
}

.tec-craft-shell {
  overflow: hidden;
  color: #322e1e;
  background: rgba(226,219,186,.88);
  border: 1px solid #7f7b62;
  border-radius: 12px;
}

.tec-craft-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 7px 10px;
  border-bottom: 1px solid #8d876d;
  background: rgba(243,238,215,.72);
}

.tec-craft-toolbar strong {
  color: #39461f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .82rem;
}

.tec-craft-toolbar span {
  color: #665f49;
  font-size: .61rem;
}

.tec-craft-stack {
  display: grid;
  gap: 1px;
  background: #a39b7b;
}

.tec-craft-card {
  position: relative;
  padding: 12px;
  background: rgba(248,243,223,.92);
}

.tec-craft-fields {
  display: grid;
  grid-template-columns: minmax(130px,.75fr) minmax(220px,2fr) minmax(120px,.8fr) 90px;
  gap: 9px;
  align-items: end;
}

.tec-craft-fields label {
  display: grid;
  gap: 4px;
  margin: 0;
}

.tec-craft-fields label > span {
  color: #4e4a38;
  font-size: .58rem;
  font-weight: 700;
}

.tec-craft-fields select,
.tec-craft-fields input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 5px 7px;
  color: #322e1e;
  background: #fffdf4;
  border: 1px solid #8d876d;
  border-radius: 4px;
  font: inherit;
  font-size: .66rem;
}

.tec-craft-line-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 7px;
  margin-top: 10px;
}

.tec-craft-line-result > div {
  min-width: 0;
  padding: 7px 8px;
  background: rgba(226,219,186,.58);
  border: 1px solid #bbb292;
  border-radius: 5px;
}

.tec-craft-line-result span,
.tec-craft-line-result strong {
  display: block;
}

.tec-craft-line-result span {
  color: #6d6650;
  font-size: .55rem;
}

.tec-craft-line-result strong {
  margin-top: 2px;
  color: #39461f;
  font-size: .69rem;
}

.tec-craft-remove {
  display: table;
  margin: 8px 0 0 auto;
  padding: 2px 7px;
  color: #6d3d32;
  background: transparent;
  border: 0;
  font-size: .54rem;
  text-decoration: underline;
  cursor: pointer;
}

.tec-craft-summary {
  border-top: 1px solid #8d876d;
  background: rgba(226,219,186,.78);
}

.tec-craft-summary-title {
  padding: 7px 10px 5px;
  color: #39461f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .72rem;
  font-weight: 700;
}

.tec-craft-summary-body {
  padding: 0 10px 10px;
}

.tec-craft-summary-scroll {
  overflow-x: auto;
}

.md-typeset .tec-craft-summary table {
  display: table;
  width: 100%;
  min-width: 520px;
  margin: 0;
  background: #3e3e3e;
  border-collapse: collapse;
}

.md-typeset .tec-craft-summary th,
.md-typeset .tec-craft-summary td {
  padding: .32rem .45rem;
  border: 1px solid #5b5b5b;
  color: #f3f1e7;
  font-size: .61rem;
  text-align: left;
}

.md-typeset .tec-craft-summary thead th {
  color: #242418;
  background: #e7e4d7;
}

.tec-craft-summary-body > p {
  margin: 7px 0 0;
  color: #665f49;
  font-size: .56rem;
  font-style: italic;
}

/* Same visual language as the Rank Bonus Calculator's large + button. */
.tec-craft-add {
  display: block;
  width: 42px;
  height: 42px;
  margin: 10px auto 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #686d37;
  box-shadow: inset 0 1px rgba(255,255,255,.28), 0 1px 2px rgba(50,46,30,.25);
  cursor: pointer;
}

.tec-craft-add::before,
.tec-craft-add::after {
  content: "";
  position: absolute;
}

.tec-craft-add {
  position: relative;
}

.tec-craft-add::before {
  left: 10px;
  right: 10px;
  top: 19px;
  height: 4px;
  background: #f6f1db;
  border-radius: 2px;
}

.tec-craft-add::after {
  top: 10px;
  bottom: 10px;
  left: 19px;
  width: 4px;
  background: #f6f1db;
  border-radius: 2px;
}

.tec-craft-add:hover,
.tec-craft-add:focus-visible {
  background: #4f5828;
}

@media screen and (max-width: 59.984375em) {
  .tec-craft-fields {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .tec-craft-line-result {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media screen and (max-width: 44.984375em) {
  .tec-craft-toolbar {
    display: block;
  }

  .tec-craft-toolbar span {
    display: block;
    margin-top: 2px;
  }

  .tec-craft-card {
    padding: 9px;
  }

  .tec-craft-fields,
  .tec-craft-line-result {
    grid-template-columns: 1fr;
  }
}
