/**
 * @author Joel Espinosa Longi
 * @licencia Atribución-CompartirIgual 4.0 Internacional  - https://creativecommons.org/licenses/by-sa/4.0/deed.es
 */

@import "loader.css";

:root {
  --pages_container_width: 1280px;
  --pages_container_height: 825px;
  --left_right_margin_pages: 30px;

  --page-left-margin: 50px;
  --page-right-margin: 50px;
  --page-top-margin: 30px;
  --page-bottom-margin: 20px;
}

html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
}
#book_container {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #ecf0f1;
}
.page {
  position: relative;
  background-color: white;
  text-align: justify;
  width: calc(var(--pages_container_width) / 2);
  min-width: calc(var(--pages_container_width) / 2);
  height: var(--pages_container_height);
  padding: var(--page-top-margin) var(--page-right-margin) var(--page-bottom-margin) var(--page-left-margin);
}
/* Style needed to help the rendering in chrome */
.page[show="true"] * {
  display: none;
}
.page_viewer {
  transform-origin: 0 0 0;
}
#pages_container {
  transition: all 0.3s;
  -webkit-transition: all 0.3s;
}

.toc_link {
  position: relative;
  font-size: 95%;
  padding: 0;
  margin-bottom: 0.5em;
  cursor: pointer;

  /* background-repeat: repeat-x;
  background-image: url("img/dot.svg"); */
}

.toc_link::before {
  content: "";
  position: absolute;
  left: 2em;
  right: 0;
  top: 15px;
  height: 2px;
  z-index: 0;

  background-image: linear-gradient(to right, black 33%, rgba(255,255,255,0) 0%);
  background-position: bottom;
  background-size: 6px 4px;
  background-repeat: repeat-x;
}

.toc_link:hover,
.toc_link:hover a,
.toc_link:hover .toc_number,
.toc_link:hover a > span:first-child {
  background-color: hsl(205, 87%, 90%);
}

.toc_link a > span:first-child {
  position: relative;
  color: #273c75;
  background-color: white;
  display: inline-block;
  max-width: 90%;
  padding-right: 0.2em;
  z-index: 1;
}

.toc_number {
  position: relative;
  color: #192a56;
  background-color: white;
  float: right;
  padding-left: 0.2em;
  z-index: 1;
}

.page_number {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-weight: bold;
  font-size: 80%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.footnote {
  display: block;
}

.footnote::before {
  content: attr(number);
  position: absolute;
  display: inline;
  font-size: 75%;
  left: -0;
}

.footnote_container {
  position: absolute;
  width: calc(100% - var(--page-left-margin) - var(--page-right-margin));
  bottom: 48px;
  font-size: 75%;
  border-top: 2px solid #3c6382;
  padding-left: 1em;
}

/*  */
sup {
  font-size: 65%;
  font-weight: bold;
  padding-left: 0.2em;
}

sub {
  font-size: 65%;
}

h1 {
  font-size: 160%;
  margin-top: 0;
}

.note {
  padding-left: 1em;
  padding-right: 1em;
  font-size: 90%;
}
.num_block {
  padding-left: 1em;
}

.image_expand {
  display: block;
  margin: 0.5em auto 1em auto;
  cursor: pointer;
}

.image_link {
  position: relative;
  display: block;
  cursor: pointer;
}

.btn_link {
  position: absolute;
  width: 2em;
  height: 2em;
  right: -3px;
  top: 0;
  margin: 0;
  padding: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background-color: white;
  background-size: cover;
  background-image: url("img/link.svg");
  cursor: pointer;
}

iframe {
  border: none;
}

video {
  display: block;
  margin: 1.25 auto 0 auto;
}

.btn_ampliar {
  position: absolute;
  width: 2em;
  height: 2em;
  right: 0;
  top: 0;
  margin: 0;
  padding: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background-color: white;
  background-size: cover;
  background-image: url("img/ampliar.svg");
  cursor: pointer;
}

.interactive {
  position: relative;
  margin: 0 auto;
  padding: 15px 0;
  -webkit-overflow-scrolling: touch;
  overflow-y: scroll;
}

figure {
  width: 100%;
  margin: 0;
  padding: 0;
}

figcaption {
  text-align: center;
  font-size: 80%;
  margin-top: 1.5em;
  margin-bottom: 2em;
}

bibref {
  display: inline;
  position: relative;
  color: #0089cd;
  border-bottom: 1px dashed #0089cd;
}
bibitem {
  display: block;
  position: relative;
  padding-bottom: 1em;
}
.bibitem_title {
  font-style: italic;
  font-weight: bold;
}

/* Style for screen  */
@media screen {
  body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  }
 
  #go_to_table_of_content {
    position: absolute;
    left: 0;
    top: 0;
    cursor: pointer;
    outline: none;
    border: none;
    z-index: 1;
    background-color: #ecf0f1;
    background-size: cover;
    padding: 0;
    background-image: url("img/table_of_content.svg");
  }
  
  #btn_back_page,
  #btn_next_page {
    position: absolute;
    height: 100%;
    top: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
    z-index: 1;
  }
  
  #btn_back_page {
    background-image: url("img/back.svg");
    left: 0;
  }
  
  #btn_next_page {
    background-image: url("img/next.svg");
    right: 0;
  }
  
  .page_viewer {
    position: absolute;
    overflow: hidden;
    height: var(--pages_container_height);
  }
  
  #pages_container {
    position: absolute;
    display: flex;
    height: var(--pages_container_height);
  }
  
  #pages_container .page:nth-child(odd) {
    border-right: 1px solid rgba(0, 0, 0, 0.1);
  }
}

/* Style for print */
@media print {
  @page {
    margin: 0cm;
    size: 640px 825px;
  }
  
  body {
    width: 640px;
    height: 825px;
  }

  #go_to_table_of_content,
  #btn_back_page,
  #btn_next_page {
    display: none;
  }
  
  .page {
    page-break-after: always !important;
  }
  
  .page_viewer {
    position: relative;
    transform: none !important;
    width: 640px !important;
    top: calc(-1 * var(--pages_container_height)) !important;
    left: 0px !important;
  }
  
  #pages_container {
    position: relative;
    background-color: red;
    left: 0px !important;
  }
}

