/* Global LANraragi CSS. Don't mess !*/

body {
  touch-action: manipulation;
}

td.itd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.itdc {
  min-width: 35px;
}

#bookmarkheader,
td.bookmark {
  max-width: 70px;
}

#titleheader,
td.title {
  max-width: 400px;
}

[id^="customheader"],
td[class^="customheader"] {
  max-width: 100px;
}

#tagsheader,
td.tags {
  max-width: 250px;
}

.edit-header-btn {
  cursor: pointer;
}

span.tags {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 20px;
}

.tagger {
  min-height: 125px;
  cursor: text;
}


div.id1 {
  width: 228px;
}

div.id2 {
  width: 100%;
}

div.id3 img {
  max-height: 275px;
}

div.id3.nocrop img {
  max-width: 95%;
}

div.id3:not(.nocrop) img {
  object-fit: cover;
  object-position: left top;
  width: 95%;
  height: 100%;
}

div.id4 {
  white-space: nowrap;
}

.ttspinner {
  color: black;
  position: relative;
  top: -162px;
  left: -1px;
}

table.itg {
  table-layout: fixed;
}

/*Archive list Sorting*/
table thead a {
  padding-right: 14px;
  cursor: pointer;
}

table thead th a:after {
  border-left: 5px solid rgba(0, 0, 0, 0);
  border-right: 5px solid rgba(0, 0, 0, 0);
  border-top: 5px solid;
  content: "";
  height: 0;
  position: relative;
  right: -5px;
  width: 0;
  top: 10px;
}

table thead .sorting_asc a:after {
  border-left: 5px solid rgba(0, 0, 0, 0);
  border-right: 5px solid rgba(0, 0, 0, 0);
  border-top: 5px solid;
}

table thead .sorting_desc a:after {
  border-top: none;
  border-bottom: 5px solid;
  border-left: 5px solid rgba(0, 0, 0, 0);
  border-right: 5px solid rgba(0, 0, 0, 0);
  top: -10px;
}

table thead .sorting_disabled a:after {
  border-top: none;
  border-bottom: none;
  border-left: none;
  border-right: none;
}

.paginate_button.previous {
  display: none;
}

.paginate_button.next {
  display: none;
}

.paginate_button {
  min-width: 2rem;
  width: auto !important;
}

.ellipsis {
  margin-left: 1rem;
}

.table-options {
  display: flex;
}

.table-option {
  margin-left: 8px !important;
  vertical-align: bottom;
}

.index-carousel {
  margin-top: -20px;
  margin-bottom: 36px;
}

.index-carousel>.option-flyout {
  margin: 0 4%;
}

.index-carousel-container {
  margin-top: -10px;
}

.carousel-prev {
  position: absolute;
  top: 136px;
  left: 0;
  z-index: 20;
}

.carousel-next {
  position: absolute;
  top: 136px;
  right: 0;
  z-index: 20;
}

p#nb {
  font-size: 13px;
}

.tippy-box {
  background-color: transparent !important;
}

.tippy-content {
  padding: 0px !important;
}

.caption-namespace {
  width: 100px !important;
  font-size: 10pt;
  padding: 3px 0px 7px;
  vertical-align: top;
}

.caption-tags {
  width: 400px !important;
  min-width: 30% !important;
}

/* Reader overlays. */
.loading-overlay,
.page-overlay,
#overlay-shade {
  display: none;
}

.loading {
  min-height: 75vh;
}

.loading .loading-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.25);
  text-align: center;
  display: block !important;
}

.loading .loading-spinner {
  position: absolute;
  top: 50%;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 15em;
  margin: -3.9375rem auto 0;
  text-align: center;
}

#overlay-shade {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 8999;
  background-color: #000;
}

.base-overlay {
  position: fixed;
  top: 40px;
  min-height: 70%;
  z-index: 9000;
  box-shadow: 0 0 16px #000;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.page-overlay {
  left: 5%;
  width: 90% !important;
  overflow-y: scroll;
  max-height: 90vh;
}

.small-overlay {
  left: 32.5%;
  width: 35% !important;
  overflow-y: scroll;
  max-height: 90vh;
}

.ie7 .page-overlay {
  height: 50%;
}

.page-number {
  font-size: 20px;
  position: absolute;
  top: 40%;
  left: 30%;
  z-index: -1;
  padding: 5px;
  color: lightskyblue;
}

.quick-thumbnail:hover>.page-number {
  z-index: 300;
  background-color: #000000;
}

.reader-image {
  max-width: 100%;
  min-width: 0;
  height: auto;
  width: auto;
  user-select: none;
  align-self: center;
  cursor: pointer;
}

.caption-reader {
  margin-left: auto;
  margin-right: auto;
  padding: 16px;
  min-width: 50% !important;
}

.reader-thumbnail {
  display: inline-block;
  vertical-align: middle;
  margin-right: 48px !important;
}

/* Option menu. */
.collapsible {
  box-shadow: none !important;
}

.option-td {
  padding-right: 20px;
  padding-bottom: 10px;
  vertical-align: top !important;
  width: 200px;
}

.collapsible-title {
  border: none !important;
}

.collapsible-right {
  padding: 1.2rem 1.2rem 0 0;
}

.collapsible-body {
  border: none !important;
}

.option-flyout>.collapsible-title {
  font-size: 18px;
  font-weight: bold;
}

.option-flyout>.collapsible-body {
  padding: 10px !important;
}

.left-column {
  display: inline-block;
  width: 400px;
  vertical-align: top;
}

.right-column {
  display: inline-block;
  width: 60%;
}

.tag-options .stdinput {
  width: auto !important;
}

.if a {
  margin-right: 10px;
}

li {
  list-style: none;
}

.checklist {
  height: 480px;
  overflow: auto;
  text-align: left;
  margin-left: -30px;
  margin-right: 5px;
  font-size: 9pt;
}

.checklist>li {
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.isnew {
  float: right;
  z-index: -1;
}

.log-panel {
  margin-top: 5px;
  margin-left: 5px;
  margin-right: 5px;
  margin-bottom: 5px;
  height: 300px;
  max-width: 100%;
  overflow: auto;
  text-align: left;
  white-space: pre-wrap;
  resize: vertical;
}

.logo-container {
  height: 196px;
  border-radius: 34px;
}

/* Position context menu above thumbnail-bookmark-icon */
.context-menu {
  z-index: 10;
}

.context-menu-list {
  border: none !important;
  border-radius: 0 !important;
}

.context-menu-item {
  background-color: transparent !important;
}

/* Center checkbox contextmenuitems */
.context-menu-input>label>* {
  vertical-align: unset !important;
}

.artist-tag {
  color: #22a7f0;
}

.series-tag,
.parody-tag {
  color: #d2527f;
}

.circle-tag,
.group-tag {
  color: #36d7b7;
}

.theme-preview {
  height: 64px;
  margin-top: 4px;
  margin-right: 8px;
  border-radius: 4px;
}

.edit-mode-stdinput {
  width: 98%;
  max-width: 100%;
  min-width: 33vw;
}

/* Indeterminate progress bar */
.indeterminate {
  height: 15px;
  overflow: hidden;
  position: relative;
  margin: auto;
  padding-bottom: 6px;
}

.indeterminate .bar-container {
  position: absolute;
  margin: 0;
  min-width: 100%;
  width: 100%;
  /* Starting position */
  -moz-transform: translateX(100%);
  -webkit-transform: translateX(100%);
  transform: translateX(100%);
  /* Apply animation to this element */
  -moz-animation: scroll-left 2s ease-in-out infinite;
  -webkit-animation: scroll-left 2s ease-in-out infinite;
  animation: scroll-left 2s ease-in-out infinite;
}

/* Move it (define the animation) */
@-moz-keyframes scroll-left {
  0% {
    -moz-transform: translateX(100%);
  }

  100% {
    -moz-transform: translateX(-100%);
  }
}

@-webkit-keyframes scroll-left {
  0% {
    -webkit-transform: translateX(100%);
  }

  100% {
    -webkit-transform: translateX(-100%);
  }
}

@keyframes scroll-left {
  0% {
    -moz-transform: translateX(100%);
    /* Browser bug fix */
    -webkit-transform: translateX(100%);
    /* Browser bug fix */
    transform: translateX(100%);
  }

  100% {
    -moz-transform: translateX(-100%);
    /* Browser bug fix */
    -webkit-transform: translateX(-100%);
    /* Browser bug fix */
    transform: translateX(-100%);
  }
}

/* Overrides */
.Toastify {
  --toastify-font-family: "Open Sans", arial, sans-serif;
}

.Toastify__toast-body {
  font-size: 13px;
  line-height: 1.3;
}

.Toastify__toast-body h2 {
  margin: 0;
  padding: 4px 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.Toastify__toast-body a {
  opacity: 0.75;
  text-decoration: underline;
}

.Toastify__toast-body a:hover {
  opacity: 1;
}

.Toastify__toast-body .Toastify__toast-icon {
  align-self: flex-start;
  padding: 4px 4px 0 0;
}

.swal2-popup {
  font-size: 9pt !important;
}

.swal2-styled.swal2-cancel {
  margin-right: 8px;
}

body.swal2-shown>[aria-hidden="true"] {
  transition: 0.1s filter;
  filter: opacity(0.8);
}

.awesomplete>ul {
  z-index: 99 !important;
}

/*Hide elements within the pages on small screens*/

@media all and (max-width: 1000px) {
  #i2 {
    display: none;
  }

  #i1 {
    padding: 2px;
  }

  #tagsheader,
  [id^="customheader"],
  td[class^="customheader"],
  td.tags {
    max-width: 50px;
  }

  #titleheader,
  td.title {
    max-width: 250px;
  }

  .page-overlay,
  .ie7 .page-overlay {
    min-height: 100% !important;
  }

  .left-column,
  .right-column {
    width: 100% !important;
  }

  .small-overlay {
    left: 20% !important;
    width: 60% !important;
  }

  .reader-thumbnail {
    margin-right: 0px !important;
  }
}

@media all and (max-width: 1024px) {

  .table-options {
    margin-bottom: 0 !important;
  }

  .index-carousel {
    margin-bottom: 0px !important;
  }
}

@media all and (max-width: 560px) {

  div.id1 {
    width: 164px;
    height: 256px !important;
  }

  div.id3 {
    height: 196px !important;
    position: relative;
  }

  div.id3 img {
    max-height: 196px;
  }

}

@media all and (max-width: 540px) {

  .absolute-options {
    margin-top: 30px;
  }

  #i1 {
    padding: 2px;
  }

  #i2,
  [id^="customheader"],
  #tagsheader,
  td[class^=" customheader"],
  td.tags {
    display: none;
  }

  #titleheader,
  td.title {
    max-width: 180px;
  }

  div.sni h1 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .option-td {
    width: 150px !important;
  }

  .small-overlay {
    left: 0 !important;
    width: 100% !important;
  }

}

.absolute-options {
  position: absolute;
  z-index: 20;
}

.absolute-left {
  left: 12px;
}

.absolute-right {
  right: 1px;
}

.absolute-options a {
  padding-right: 10px;
  text-decoration: none;
}

.pagecount {
  vertical-align: unset !important;
}

.page-link {
  cursor: pointer;
}

#archivePagesOverlay {
  height: 90vh;
}

.archive-summary {
  text-align: left;
  margin: 18px 12px 8px 12px;
  font-size: 9pt;
  white-space: pre-wrap;
}

#settingsOverlay {
  height: unset;
}

#settingsOverlay>div {
  margin: auto;
  font-size: 8pt;
}

#changelog {
  margin: 12px;
  text-align: left;
}

#changelog>*>img {
  max-width: 400px;
}

/* Infinite Scrolling Reader */

body.infinite-scroll .sn,
body.infinite-scroll .file-info,
body.infinite-scroll .reading-direction,
body.infinite-scroll #toggle-manga-mode,
body.infinite-scroll #preload-images,
body.infinite-scroll #toggle-header,
body.infinite-scroll #toggle-double-mode {
  display: none;
}

body.infinite-scroll #i4 .absolute-options {
  position: fixed;
  top: 20px;
}

body.infinite-scroll #i2 {
  display: none;
}

body.infinite-scroll #display {
  display: flex;
  flex-direction: column;
}

body.infinite-scroll #display img {
  margin: 5px auto;
  cursor: pointer;
}

body.infinite-scroll .sb {
  margin-top: 10px;
}

/* Double Page & Fullscreen */

div.sni img[src=""] {
  display: none;
}

div.fullscreen img {
  height: unset !important;
  max-height: 100vh !important;
  margin: 0px !important;
}

#display {
  display: flex;
  justify-content: center;
}

.fullscreen-infinite {
  overflow-y: scroll;
}

.thumbnail-bookmark-icon {
  cursor: pointer;
  position: absolute;
  right: 24px;
  bottom: 20px;
  z-index: 2;
  font-size: 24px;
  text-shadow: 0 0 3px rgba(0, 50, 116, 0.9);
}

.title-bookmark-icon {
  cursor: pointer;
  position: relative;
  right: auto;
  bottom: auto;
  font-size: inherit;
  text-shadow: none;
  vertical-align: middle;
  margin-right: 5px;
}

.thumbnail-bookmark-icon:hover {
  opacity: 0.8;
}

.thumbnail-bookmark-icon:active {
  opacity: 0.6;
}

.title-bookmark-icon:hover {
  opacity: 0.8;
}

.title-bookmark-icon:active {
  opacity: 0.6;
}

body.infinite-scroll .fullscreen-infinite img {
  margin: 0 auto !important;
}