body>div.modals_container, body>div.modals_container * {
  box-sizing: border-box;
}
body>div.modals_container {
  --content_bg_color: #FFFFFF;
  --content_color: #000000;
  --title_bg_color: var(--primary_color);
  --title_color: #ffffff;
  --footer_bg_color: #fafafa;
  --shadow_bg_color: #444444a8;
  --links_bg_color: #00000000;
  --links_color: #000000;
  --links_hover_bg_color: #0000003d;

  --default_modal_width: 80%;
  --default_modal_height: 40%;

  position: fixed;
  display: block;
  top:0;
  left:0;
  width: 100%;
  height: 100%;
  z-index: -1;
  transition: z-index 1s;
}
body>div.modals_container>.modal {
  --width: var(--default_modal_width);
  --height: var(--default_modal_height);
  display: flex;
  position: absolute;
  width: var(--width);
  height: var(--height);
  top: calc( (100% - var(--height))/3 );
  left: calc( (100% - var(--width))/2 );
  overflow: auto;
  flex-flow: column;
  z-index:0;
  opacity:0;
  border: 3px solid black;
}
body>div.modals_container>.modal>* {
  background: var(--content_bg_color);
}
body>div.modals_container>.modal>div.title {
  font-size: 2em;
  padding: 0.2em 0.5em;
  background: var(--title_bg_color);
  color: var(--title_color);
}
body>div.modals_container>.modal>div.content {
  flex-basis: 100%;
  font-size: 1em;
  padding: 1em;
  font-family: 'Lato';
  color:#333;
  overflow: auto;
}
body>div.modals_container>.modal>div.footer {
  margin-top: auto;
  font-size: 1.1em;
  display: flex;
  flex-flow: row;
  justify-content: flex-end;
  padding: 0.5%;
  background: var(--footer_bg_color);
}
body>div.modals_container>.modal>div.footer a, body>div.modals_container>.modal>div.footer button {
display: block;
    padding: 0.6em;
    background: var(--links_bg_color);
    text-decoration: none;
    color: var(--links_color);
    font-family: 'Lato';
    cursor: pointer;
    border: 0;
    background-color: #ccc;
    margin-right: 15px;
    font-size: 0.9em;
    border-radius: 5px;
    /* margin: 0; */
}
body>div.modals_container>.modal>div.footer a:hover, body>div.modals_container>.modal>div.footer button:hover {
  background: var(--links_hover_bg_color);
}
body>div.modals_container>.modal>div.shadow {
  background: var(--shadow_bg_color);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
body>div.modals_container>.modal>div.shadow::after {
  content: "X";
  font-family: sans-serif;
  font-size: 1.5em;
  position: fixed;
  top: calc( ((100% - var(--height))/3) - 1em);
  right: calc( (100% - var(--width))/2 );
  color: white;
}

body>div.modals_container.visible {
  z-index: 1;
  transition: none;
}
body>div.modals_container>.modal.visible {
  opacity:1;
  z-index:2000;
}
body>div.modals_container>.modal {
  transition: opacity 0.2s, z-index 2s;
}
body>div.modals_container>.modal.visible~.modal {
  transition: opacity 0.2s;
}

/*Sizes*/
body>div.modals_container>.modal.sw {
  --width: 35%;
}
body>div.modals_container>.modal.lh {
  --height: 90%;
}
body>div.modals_container>.modal.mh {
  --height: 70%;
}

@media all and (max-width: 800px) {
  body>div.modals_container>.modal, body>div.modals_container>.modal.sw {
    --width: 95%;
  }
  body>div.modals_container>.modal.mh {
    --height: 90%;
  }
}
