/* Warehouse controls and two-pane layout. */
.npc-box.warehouse-box {
  width: min(1240px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  min-width: 0;
}

.npc-box.warehouse-box .wh-wrap,
.npc-box.warehouse-box .wh-top,
.npc-box.warehouse-box .wh-card,
.npc-box.warehouse-box .wh-command-bar,
.npc-box.warehouse-box .wh-split,
.npc-box.warehouse-box .wh-pane,
.npc-box.warehouse-box .wh-pane-head,
.npc-box.warehouse-box .wh-inventory-toolbar,
.npc-box.warehouse-box .wh-inv-tabs {
  min-width: 0;
  max-width: 100%;
}

.npc-box.warehouse-box .wh-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.npc-box.warehouse-box .wh-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  white-space: nowrap;
}

.npc-box.warehouse-box .wh-icon-btn > span,
.npc-box.warehouse-box .wh-inv-tab > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.npc-box.warehouse-box .wh-icon-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.npc-box.warehouse-box .wh-controls {
  grid-template-columns: minmax(150px, 1fr) repeat(2, minmax(104px, auto));
  gap: 8px;
  align-items: stretch;
}

.npc-box.warehouse-box .wh-number-field {
  position: relative;
  min-width: 0;
}

.npc-box.warehouse-box .wh-number-field .wh-input {
  width: 100%;
  min-width: 0;
  height: var(--qty-step-size);
  padding: 0 8px;
  font-size: 16px;
  text-align: left;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.npc-box.warehouse-box .wh-number-field .wh-input::-webkit-inner-spin-button,
.npc-box.warehouse-box .wh-number-field .wh-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.npc-box.warehouse-box .wh-number-stepper {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 29px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  border-left: 1px solid var(--glass-border);
  overflow: hidden;
}

.npc-box.warehouse-box .wh-number-stepper button {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-3);
  cursor: pointer;
}

.npc-box.warehouse-box .wh-number-stepper button + button {
  border-top: 1px solid var(--glass-border);
}

.npc-box.warehouse-box .wh-number-stepper button:hover {
  color: var(--gold-b);
  background: rgba(230, 196, 122, 0.08);
}

.npc-box.warehouse-box .wh-number-stepper .wh-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.npc-box.warehouse-box .wh-silver-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.npc-box.warehouse-box .wh-btn-secondary {
  background: rgba(255, 255, 255, 0.025);
}

.npc-box.warehouse-box .wh-fee-summary {
  margin-top: 8px;
  line-height: 1.35;
}

.npc-box.warehouse-box .wh-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.018);
}

.npc-box.warehouse-box .wh-command-bar > .wh-fee {
  flex: 1 1 auto;
  min-width: 220px;
  line-height: 1.35;
}

.npc-box.warehouse-box .wh-command-actions {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) repeat(2, minmax(92px, 0.7fr));
  gap: 7px;
  flex: 0 1 460px;
}

.npc-box.warehouse-box .wh-btn-primary {
  border-color: rgba(230, 196, 122, 0.46);
  background: linear-gradient(180deg, rgba(230, 196, 122, 0.13), rgba(230, 196, 122, 0.045));
  color: var(--gold-b);
  box-shadow: inset 0 1px 0 rgba(255, 239, 200, 0.08);
}

.npc-box.warehouse-box .wh-btn-primary:hover {
  border-color: rgba(230, 196, 122, 0.72);
  background: linear-gradient(180deg, rgba(230, 196, 122, 0.2), rgba(230, 196, 122, 0.07));
}

.npc-box.warehouse-box .wh-btn-quiet {
  background: transparent;
}

.npc-box.warehouse-box .wh-split {
  grid-template-columns: minmax(0, 1.05fr) minmax(410px, 0.95fr);
  gap: 12px;
}

.npc-box.warehouse-box .wh-pane-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.npc-box.warehouse-box .wh-pane-heading {
  flex: 0 0 auto;
}

.npc-box.warehouse-box .wh-btn-pane {
  min-height: 30px;
  height: 30px;
  padding: 0 9px;
  font-size: 8px;
  letter-spacing: 0.055em;
  background: rgba(255, 255, 255, 0.025);
}

.npc-box.warehouse-box .wh-btn-pane .wh-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.npc-box.warehouse-box .wh-inventory-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  row-gap: 6px;
}

.npc-box.warehouse-box .wh-inventory-toolbar {
  display: contents;
}

.npc-box.warehouse-box .wh-inv-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  flex: 1 1 auto;
  overflow: visible;
  padding: 0;
  grid-column: 1 / -1;
  grid-row: 2;
}

.npc-box.warehouse-box .wh-inv-tab {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 30px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 7.5px;
  letter-spacing: 0.035em;
  overflow: hidden;
}

.npc-box.warehouse-box .wh-inv-tab .wh-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.npc-box.warehouse-box .wh-btn-inv-sort {
  flex: 0 0 auto;
  grid-column: 2;
  grid-row: 1;
}

.tt.wh-item-tooltip {
  max-width: 304px;
}

.tt.wh-item-tooltip .wh-tooltip-title {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin-bottom: 5px;
}

.tt.wh-item-tooltip .wh-tooltip-title-copy {
  min-width: 0;
}

.tt.wh-item-tooltip .wh-tooltip-title-copy .tt-name {
  margin-bottom: 1px;
  line-height: 1.12;
}

.tt.wh-item-tooltip .wh-tooltip-title-copy .tt-enchantability {
  margin: 0;
}

.tt.wh-item-tooltip .wh-tooltip-item-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(230, 196, 122, 0.24);
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tt.wh-item-tooltip .wh-tooltip-item-icon > img {
  padding: 2px;
}

@media (max-width: 1180px) {
  .npc-box.warehouse-box .wh-top {
    grid-template-columns: minmax(235px, 0.72fr) minmax(390px, 1.28fr);
  }

  .npc-box.warehouse-box .wh-command-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .npc-box.warehouse-box .wh-command-bar > .wh-fee,
  .npc-box.warehouse-box .wh-command-actions {
    flex-basis: 100%;
  }

  .npc-box.warehouse-box .wh-command-actions {
    max-width: none;
  }

  .npc-box.warehouse-box .wh-inventory-head {
    align-items: stretch;
  }
}

@media (max-width: 980px) {
  .npc-box.warehouse-box .wh-top,
  .npc-box.warehouse-box .wh-split {
    grid-template-columns: 1fr;
  }

  .npc-box.warehouse-box .wh-grid.inv-side,
  .npc-box.warehouse-box .wh-grid.storage {
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  .npc-box.warehouse-box {
    width: calc(100vw - 18px);
    max-width: calc(100vw - 18px);
    padding: 16px;
  }

  .npc-box.warehouse-box .wh-controls {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(94px, auto));
  }

  .npc-box.warehouse-box .wh-command-actions {
    grid-template-columns: 1fr 1fr;
  }

  .npc-box.warehouse-box .wh-command-actions .wh-btn-primary {
    grid-column: 1 / -1;
  }

  .npc-box.warehouse-box .wh-inv-tabs {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .npc-box.warehouse-box .wh-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .npc-box.warehouse-box .wh-number-field {
    grid-column: 1 / -1;
  }

  .npc-box.warehouse-box .wh-inv-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .npc-box.warehouse-box .wh-btn-inv-sort {
    width: 100%;
  }
}

.npc-box.warehouse-box .wh-storage-head {
  flex-wrap: wrap;
}
.npc-box.warehouse-box .wh-storage-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.npc-box.warehouse-box .wh-storage-tabs .wh-inv-tab {
  font-size: 10px;
  min-height: 36px;
}
.npc-box.warehouse-box .wh-overflow-note {
  color: var(--gold-b);
  font-size: 11px;
  padding: 8px;
}
