





.dialog {
  display: none;
  font: 22px/24px Kreon, Georgia, serif; 
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -1400px) scale(0.65);
  transform-origin: 50% 50%;
  width: 700px;
  -webkit-font-smoothing: antialiased;
}

.overlay {
  background: rgba(0, 0, 0, 0.75);
  display: none;
  height: 100%;
  left: 0;
  top: 0;
  position: absolute;
  width: 100%;
  transform: scale(var(--cqw_px_ratio));

  &.light {
    background: rgba(0, 0, 0, 0.5);
  }

  &.extra_light {
    background: rgba(0, 0, 0, 0.15);
  }
}

[data-dialog-id="intro"] .overlay {
  background: rgba(0, 0, 0, 0.05);
}

#ajax_dialogs {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  transform: scale(calc(1 / var(--cqw_px_ratio)));

  .on_screen,
  .static.ready {
    pointer-events: auto;
  }
}


.dialog.closed,
.overlay.closed,
.overlay.static {
  opacity: 0;
  pointer-events: none;
}


.dialog.ready,
.overlay.ready,
.dialog.static,
.overlay.static {
  display: block;
}

.dialog.on_screen,
.dialog.static.ready {
  transform: translate(-50%, -50%) scale(0.65);
}



.dialog.ready,
.dialog.static {
  transition: 0.5s ease;
  z-index: 3;
}

.overlay.ready,
.overlay.static {
  transition: opacity 1.5s ease;
  z-index: 3;
}



.dialog.on_top,
.overlay.on_top {
  z-index: 10;
}

.overlay.static.ready {
  opacity: 1;
}



.dialog.ultra_wide {
  width: 1400px;
}
.dialog.very_wide {
  width: 1200px;
}
.dialog.wider {
  width: 1000px;
}
.dialog.wide {
  width: 900px;
}
.dialog.mid_wide {
  width: 800px;
}
.dialog.narrow {
  width: 500px;
}
.dialog.flex {
  width: 80%;
}
.dialog.fullscreen {
  box-sizing: border-box;
  height: 1042px;
  width: 1436px;
}




.textured_box {
  background: url("/assets/dialogs/dialog_texture-fb6466f0.jpg");
  border: none;
  box-shadow: inset 0px 0px 87px 0px rgba(0, 0, 0, 0.9);
  padding: var(--dialog_padding);
  position: relative;
}

.dialog.fullscreen .textured_box {
  box-sizing: border-box;
  height: 100%;
}

.textured_box > hr {
  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 1);
  border: none;
  border-top: 2px solid rgb(70, 66, 53);
  margin: 0;
}


.simple_box {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgb(70, 66, 53);
  box-shadow: 0px 0px 24px 0px rgba(0, 0, 0, 0.66);
  padding: var(--dialog_padding);
  text-align: left;
  line-height: 1.3em;
  position: relative;
}

.dialog.fullscreen .simple_box {
  box-sizing: border-box;
  min-height: 100%;
}

.simple_box + div {
  margin-top: 24px;
}


.dialog .big_fancy_form {
  padding: 30px 40px;
  position: relative;
  z-index: 4;
}
.dialog .overflow {
  border: 4px solid #3d3b34;
  margin: 15px -100px 15px -100px;
  padding: 30px 40px;
}

.dialog .overflow li {
  border-right: 1px solid rgba(255, 255, 255, 0.33);
  box-sizing: border-box;
  float: left;
  list-style: none;
  padding: 0 30px;
}

.dialog .overflow li:last-child {
  border: none;
}


.dialog_close_background {
  background: url("/assets/ui/general/circle_smaller-c3a4fbe3.png") no-repeat;
  height: 81px;
  position: absolute;
  right: -40px;
  top: -40px;
  width: 81px;
  z-index: 4;

  &::before,
  &::after {
    content: "";
    display: block;
    position: absolute;
  }
}

.dialog_close_background::before,
.dialog_close_background::after {
  background: url("/assets/dialogs/close_button_deco-2cd55a9a.png") no-repeat bottom center;
  height: 100px;
  transform-origin: 40px 40px;
  width: 100%;
}

.dialog_close_background::before {
  transform: rotate(90deg);
}



.dialog_thumb,
.dialog > .circle_thumb {
  left: 50%;
  position: absolute;
  top: 0px;
  z-index: 4;

  &::before,
  &::after {
    content: "";
    display: block;
    position: absolute;
  }

  > img {
    border-radius: 50%;
  }
}

.dialog_thumb::before,
.dialog_thumb::after,
.dialog > .circle_thumb::before,
.dialog > .circle_thumb::after {
  background: url("/assets/dialogs/thumb_side_deco-50099a2c.png") no-repeat;
  height: 69px;
  width: 88px;
  z-index: -1;
}

.dialog_thumb::before,
.dialog > .circle_thumb::before {
  transform: scaleX(-1);
}

.dialog_thumb.shield {
  margin-top: -180px;
  margin-left: -122px;
}

.dialog_thumb.shield::before,
.dialog_thumb.shield::after {
  bottom: 54px;
}

.dialog_thumb.shield::before {
  left: -23px;
}

.dialog_thumb.shield::after {
  right: -26px;
}

.dialog_thumb.empty::before,
.dialog_thumb.empty::after {
  display: none;
}


.dialog_thumb .shield_monster,
.dialog_thumb .shield_hero {
  height: 245px;
  min-height: 200px;
  width: 245px;
  display: block;
}

.dialog_thumb .alone {
  transform: translate(-50%, -75%);
}

.dialog_thumb.circle_container,
.dialog > .circle_thumb,
.dialog_thumb.weapon_circle_container {
  margin-top: -146px;
  margin-left: -94px;
}

.dialog_thumb.circle_container::before,
.dialog_thumb.circle_container::after,
.dialog > .circle_thumb::before,
.dialog > .circle_thumb::after,
.dialog_thumb.weapon_circle_container::before,
.dialog_thumb.weapon_circle_container::after {
  bottom: 30px;
}

.dialog_thumb.circle_container::before,
.dialog > .circle_thumb::before,
.dialog_thumb.weapon_circle_container::before {
  left: -63px;
}

.dialog_thumb.circle_container::after,
.dialog > .circle_thumb::after,
.dialog_thumb.weapon_circle_container::after {
  right: -63px;
}

.dialog_thumb .pivoted_monster {
  top: 75%;
  left: 50%;
}



.dialog_header {
  background: url("/assets/dialogs/dialog_header-784cbee5.png") repeat-x center;
  display: inline-block;
  filter: drop-shadow(0px 4px 16px rgba(0, 0, 0, 0.66));
  color: rgb(223, 182, 70);
  font: bold 36px/56px Almendra, Georgia, serif;
  margin: -3px 0; 
  text-align: center;
  height: 68px;
  line-height: 68px !important;
  position: absolute;
  top: 3px;
  left: 50%;
  text-shadow: 0px 0px 12px rgba(0, 0, 0, 0.66);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 4;
}

.dialog_header.small {
  color: #fafbd3;
  font: bold 36px/56px Kreon, serif;
  transform: translate(-50%, -50%) scale(0.8);
}

.dialog_header .text {
  position: relative;
  z-index: 0;
}

.dialog_header .edge {
  background: url("/assets/dialogs/dialog_header_edge-8814d521.png") no-repeat center;
  display: block;
  height: 68px;
  position: absolute;
  top: 0px;
  width: 25px;
  z-index: 1;
}

.dialog_header .edge.left {
  left: -24px;
}

.dialog_header .edge.right {
  right: -24px;
  transform: scaleX(-1);
}

.dialog_header + div {
  padding-top: 56px;
}

.dialog_header::before,
.dialog_header::after {
  background: url("/assets/dialogs/close_button_deco-2cd55a9a.png") no-repeat center;
  height: 21px;
  top: 34px;
  width: 14px;
  transform-origin: 50% 0%;
  z-index: 0;
}

.dialog_header::before {
  left: -26px;
  transform: rotate(90deg);
}

.dialog_header::after {
  right: -26px;
  transform: rotate(90deg) scaleY(-1);
}

.dialog_header.small::before,
.dialog_header.small::after {
  display: none;
}

.dialog_header.locked {
  padding-right: 70px;
}

.dialog_header .padlock {
  position: absolute;
  right: -5px;
  z-index: 1;
}


.dialog_content {
  padding: var(--dialog_padding);
  font-size: 32px;
  line-height: 1.2em;
}



.dialog_content > h2,
.dialog_content > div,
.dialog_content > ul {
  border-top: 1px solid rgba(235, 236, 298, 0.33);
  padding: 20px 0;
}


.dialog_content.narrow > h2,
.dialog_content.narrow > div,
.dialog_content.narrow > ul {
  padding: 12px 0;
}

.dialog_content > div.narrow {
  padding-top: 16px;
  padding-bottom: 16px;
}

.dialog_content > h2:first-child,
.dialog_content > div:first-child,
.dialog_content > ul:first-child {
  border: none;
  margin-top: -28px;
}

.dialog_content > h2:last-child,
.dialog_content > div:last-child,
.dialog_content > ul:last-child {
  margin-bottom: -28px;
}

.dialog_content > .scrollbar {
  max-height: 800px;
  margin: 0 calc(-1 * var(--dialog_padding));
  padding: var(--dialog_padding);
  padding-right: calc(var(--dialog_padding) - 12px);
}

.dialog_scroll_area {
  height: 620px;
  overflow-y: scroll;
  overflow-x: hidden;
}


.dialog h2 {
  color: rgb(223, 182, 70);
  font: bold 36px/56px Almendra, Georgia, serif;
  margin: -3px 0; 
  text-align: center;
}

.dialog_content > h2 {
  font: bold 54px/58px Almendra, Georgia, serif;
}

.dialog_content li {
  list-style: none;
  padding-left: 24px;
  position: relative;
}

.dialog_content li::before {
  color: #999;
  content: "\00bb";
  position: absolute;
  left: 0px;
  text-align: left;
}

.dialog_content p {
  margin: 0;
}

.dialog_content .text p + p {
  margin-top: 1em;
}

.dialog_content p.big {
  color: #fff;
  font-size: 1.25em;
  line-height: 1.2em;
}

.dialog_content .grey {
  color: #ccc;
}

.dialog_content > [data-icon] {
  background-repeat: no-repeat;
  background-position: left center;
  padding-left: 80px;
}

.dialog_content > .narrow[data-icon] {
  background-size: 40px 40px;
  padding-left: 50px;
}

.dialog_content > [data-icon="info"] {
  background-image: url("/assets/dialogs/info_icon_small-64835773.png");
}

.dialog_content > [data-icon="bubble"] {
  background-image: url("/assets/dialogs/bubble_icon_small-87d176cd.png");
}

.dialog_content > [data-icon="warning"] {
  background-image: url("/assets/dialogs/warning_icon_small-90f4621a.png");
}

.dialog_content > [data-icon="warning"] strong,
.dialog_content .warning {
  color: #f00;
}

.dialog_footer {
  height: 200px;
  position: absolute;
  bottom: -210px;
  text-align: center;
  width: 100%;
}


.monster_dialog .simple_box {
  position: relative;
}

.monster_dialog .simple_box > div:first-child {
  padding: 10px 0;
  position: absolute;
  top: 0px;
  left: 0px;
}

.monster_dialog .simple_box > div + div {
  border-left: 1px solid rgba(235, 236, 298, 0.33);
  margin: 28px 0 28px 222px;
  min-height: 221px;
  padding: 0 0 0 28px;
}

.monster_dialog .dialog_content h2 {
  line-height: 1em;
  padding-top: 0px;
  text-align: left;
}

.monster_dialog .dialog_content div:last-child {
  padding-bottom: 0px;
}


.selectable_items {
  font-size: 26px;
  text-align: center;
}

.selectable_item {
  border: none;
  box-sizing: border-box;
  display: inline-block;
  float: none;
  padding: 0 10px;
  position: relative;
}

.selectable_items[data-locked="true"] > .selectable_item {
  filter: grayscale(100%);
}

.selection_glow {
  cursor: url("/assets/cursors/hand_pointing-baf590c7.png"), pointer;
  opacity: 0.8;
  position: relative;
  transition: 0.4s ease;
  transform-origin: 50% 50%;
}

.selection_glow::before {
  background: url("/assets/hud/selection_glow-0d56a62b.png");
  background-size: 100% 100%;
  content: "";
  display: block;
  opacity: 0.7;
  pointer-events: none;
  position: absolute;
  top: -130px;
  left: -130px;
  transition: 0.6s ease;
  transform: scale(0.8);
  width: 500px;
  height: 500px;
}

[data-selected="true"] > .selection_glow::before,
.selection_glow[data-selected="true"]::before {
  opacity: 1;
  transform: scale(1);
}

.selectable_item > .selection_glow {
  display: block;
}

[data-selected="true"] > .selection_glow,
.selection_glow[data-selected="true"] {
  opacity: 1;
}

.selection_glow > img {
  filter: brightness(90%);
  transition: 0.4s ease;
  transform: scale(0.9);
}

.selectable_item[data-selected="true"] > .selection_glow > img,
.selection_glow[data-selected="true"] > img {
  filter: brightness(130%);
  transform: scale(1.1);
}

.selectable_item > .title {
  display: block;
  font-size: 110%;
  font-weight: bold;
  margin-top: -32px;
}

.selectable_item > .title + a {
  display: inline-block;
  height: 42px;
}

.selectable_items_description {
  color: #999;
  font-size: 26px;
  line-height: 1.2em;
  margin: 0;
  min-height: 56px;
  padding: 16px 32px;
  transition: 0.3s ease;
}

ul.selectable_items + .selectable_items_description {
  background: url("/assets/hud/separator-259f72ca.png") no-repeat top center;
  background-size: 100% 2px;
}


.dialog.selectable {
  user-select: text;
}

.dialog.selectable ::selection {
  color: white;
  background: black;
}

.dialog [data-action] > * {
  pointer-events: none;
}
