.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;
}

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

/* The NPC trade window: css/npc-trade.css (r182) */

/* The book (r182, as Minibia's): the text on a parchment, the speaker on the title bar, facing the close button */
#readable-modal {
  width: min(300px, 92vw);
}

.book-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.book-page {
  position: relative;
}

#book-text-area {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 250px;
  resize: none;
  scrollbar-width: thin;
  scrollbar-color: #a8916a #e6d3a6;
  background: linear-gradient(180deg, #f1e4c3 0%, #e7d4a8 100%);
  color: #2b1d10;
  font-weight: bold;
  line-height: 1.45;
  padding: 14px 10px 14px 14px;
  font-size: 12px;
  font-family: Verdana;
  box-shadow: inset 0 0 14px rgba(120, 85, 40, 0.45), 0 1px 3px black;
  border: 1px solid #7a5f36;
  border-radius: 3px;
}

#book-text-area[readonly] {
  cursor: default;
}

/* The size and height of the close button (18 px, centred on the 23 px title bar), as far from the left edge as it is from
   the right one */
.book-speaker {
  position: absolute;
  top: 0;
  left: 6px;
  z-index: 1;
  width: 18px;
  height: 18px;
  padding: 0;
  font-size: 12px;
  line-height: 16px;
  border: 1px solid #7a5f36;
  border-radius: 50%;
  background: #e7d4a8;
  color: #3b2812;
  cursor: pointer;
}

.book-speaker:hover {
  background: #f6ead0;
}

.book-speaker.playing {
  background: #d9b44a;
  color: #2b1d10;
}

.book-speaker.unavailable {
  opacity: 0.45;
}

.book-hint {
  color: #bdbdbd;
  font-size: 11px;
}

#book-text-area:disabled {
  color: #7b6a50;
}

#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;
}

/* TabTibia r138: the Report Bug window (Tibia's, OTClient game_bugreport): the warning, the text, its count and Send */
#bug-report-modal .bug-report-warning {
  margin: 0 0 6px 0;
}

#bug-report-modal textarea {
  width: 100%;
  box-sizing: border-box;
  resize: none;
  font-family: inherit;
  font-size: 12px;
}

#bug-report-modal .bug-report-info {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  opacity: 0.8;
  margin: 4px 0 8px 0;
}
/* r180: the window that asks which dummy a training scroll brings */
#dummy-modal {
  max-width: 92vw;
}

#dummy-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 420px;
}

#dummy-modal .dummy-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 92px;
  padding: 6px 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #2b2d33;
  color: #d8d8d8;
  cursor: pointer;
}

#dummy-modal .dummy-choice.selected {
  border-color: #f2c46d;
  box-shadow: 0 0 0 1px rgba(242, 196, 109, 0.45), 0 0 8px rgba(242, 196, 109, 0.3);
  color: #fff2c4;
}

#dummy-modal .dummy-choice-look {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

#dummy-modal .dummy-choice-name {
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

/* Chat Options (ChatModal, r182, as Minibia's): the channels as rows, the chosen one in gold with a bar on its left, and
   the name of a private channel in a sunken field */
#chat-modal {
  width: min(360px, 92vw);
}

.chat-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-options-label {
  font-weight: bold;
  color: #e6e6e6;
}

.chat-options-list {
  max-height: 236px;
  overflow-y: auto;
  border: 1px solid #111;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  outline: none;
}

.chat-options-row {
  padding: 4px 10px;
  border-left: 3px solid transparent;
  color: #d8d8d8;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.chat-options-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

.chat-options-row:hover {
  background: rgba(255, 255, 255, 0.10);
}

.chat-options-row.selected {
  border-left-color: #d9b44a;
  background: rgba(217, 180, 74, 0.16);
  color: #f0cf6a;
}

.chat-options-input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid #111;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  color: #f0f0f0;
}

.chat-options-input:focus {
  outline: 1px solid #d9b44a;
}

.chat-options .modal-footer {
  margin-top: 4px;
}
