.modal-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  position: absolute;
}

.modal {
  display: none;
  position: absolute;
  z-index: 30000;
  border: 1px solid black;
  box-shadow: 0px 0px 10px 0px black;
  background-image: url("/png/bg.png");
}

.modal-header {
  background-image: url("/png/bg2.png");
  cursor: grab;
  text-align: center;
  padding: 4px;
}

.modal .modal-footer {
  text-align: right;
}

.modal-body {
  box-shadow: inset 0 0 6px black;
  padding: 12px;
}

.tab-flex {
  display: flex;
}

.offer-tab {
  flex: 1 1 auto;
  padding: 4px;
  background-image: url("/png/bg2.png");
}

.offers {
  display: flex;
  padding: 16px;
  justify-content: center;
  align-items: center;
  background-image: url("/png/bg3.png");
}

.offers canvas {
  margin: 2px;
}

.offer-tab.selected {
  border-bottom: 0px;
  background-image: url("/png/bg3.png");
}

.modal input {
  color: white;
  border: 1px solid black;
}

#offer-modal {
  width: 350px;
}

#offer-price {
  width: 32px;
  display: inline-block;
}

#offer-name-wrapper {
  flex: 1 0 auto;
  text-align: right;
}

#buy-count-wrapper {
  display: flex;
}

#buy-count {
  width: 100px;
  margin-left: 8px;
  margin-right: 8px;
}

#offer-count {
  width: 32px;
  text-align: right;
}

#offer-info {
  height: 16px;
  display: flex;
  border: 1px solid black;
  padding: 4px;
  background-image: url("/png/bg2.png");
}

#book-text-area {
  height: 220px;
  resize: none;
  scrollbar-width: thin;
  background-image: url("/png/bg2.png");
  color: white;
  font-weight: bold;
  padding: 16px;
  padding-right: 8px;
  font-size: 12px;
  font-family: Verdana;
  box-shadow: inset 0 0 8px black;
  border: 1px solid black;
  border-radius: 16px 0px 0px 16px;
}

#book-text-area:disabled {
  color: grey;
}

#book-text-area:focus {
  outline: none;
}

.map-modal-wrapper {
  position: relative;
}

.map-modal-wrapper span {
  position: absolute;
  left: 4px;
  top: 4px;
}

.map-modal-wrapper .vline {
  pointer-events: none;
  border-bottom: 1px solid white;
  width: 256px;
  top: 128px;
  position: absolute;
}

.map-modal-wrapper .hline {
  pointer-events: none;
  border-right: 1px solid white;
  left: 128px;
  position: absolute;
  height: 256px;
}

#spellbook-list {
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  background-image: url("/png/bg.png");
  width: 400px;
}
.spellbook-wrapper {
  width: 45%;
  border: 1px solid black;
  flex: 1 1 auto;
  display: flex;
  margin: 4px;
  align-items: center;
  background-image: url("/png/bg2.png");
}

.spellbook-wrapper canvas {
  flex: 0 1 auto;
  width: 32px;
  height: 32px;
  box-shadow: 0px 0px 4px 0px black;
  cursor: pointer;
}

.spellbook-wrapper span {
  flex: 0 1 auto;
  text-align: center;
  width: 100%;
}

#spellbook-wrapper-prototype {
  display: none;
}
/* V26.3 spell/text hotkeys */
#spellbook-modal{width:min(540px,calc(100vw - 36px));max-height:85vh;overflow:auto}
#spellbook-modal [hidden]{display:none!important}
#rook263-spell-status,#rook263-hotkey-preview{font-size:12px;color:#e1d8bd;margin:8px 0;line-height:1.4}
#rook263-spell-search,#rook263-hotkey-text{box-sizing:border-box;width:100%;background:#171717;color:#eee;border:1px solid #797365;padding:8px;margin:5px 0;font:13px Arial}
#spellbook-list{display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:flex-start;width:100%;max-height:min(360px,45vh);overflow-y:auto;gap:4px;box-sizing:border-box;padding:4px}
.rook263-spell-row{display:flex;gap:9px;align-items:center;text-align:left;padding:7px;width:100%;min-height:60px;background:#292722;border:1px solid #666050;color:#eee;cursor:pointer;white-space:normal}
.rook263-spell-row:disabled{opacity:.65;cursor:not-allowed}.rook263-spell-row:not(:disabled):hover{border-color:#dfc883;background:#373126}
.rook263-spell-row canvas{flex:none;width:32px;height:32px}.rook263-spell-row>span:nth-child(2){flex:1;min-width:0}.rook263-spell-row strong,.rook263-spell-row small{display:block;line-height:1.35}.rook263-spell-row small{color:#d4c8ac;font-size:11px}.rook263-ready{font-size:10px;color:#e3c785;flex:none}
.rook263-check{display:flex;align-items:center;gap:7px;margin:9px 0}#rook263-hotkey-error{color:#ff9999;font-size:12px}
