/* ---Manga Details Modal--- */
#manga-thumbnail {
  height: 225px;
  width: 150px;
}

.manga-header {
  align-items: flex-start;
  background: var(--manga-header-bg);
  background-position: center;
  background-size: cover;
  display: flex;
  overflow: hidden;
  position: relative;
}

.manga-header::before {
  backdrop-filter: blur(5px);
  background: linear-gradient(to bottom, rgba(51, 51, 51, 0.5) 0%, rgba(51, 51, 51, 1) 90%);
  content: '';
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 0;
}

#manga-modal span.link-icon {
  font-size: 0.5em;
  margin: 0 0 0 0.25rem;
  vertical-align: super;
}

.manga-meta {
  position: relative;
  text-align: justify;
  width: 100%;
  z-index: 2;
}

.manga-details > p {
  align-items: center;
  display: flex;
  font-size: 15px;
  margin: 3px 0;
  padding-right: 4px;
  width: fit-content;
}

.manga-body {
  display: inline;
  margin-top: 20px;
}

#manga-chapters {
  display: flex;
  flex-flow: column;
  margin-top: 0.5em;
}

#manga-chapters.desc {
  flex-flow: column-reverse;
}

#chapter-buttons {
  display: flex;
  flex-direction: row-reverse;
}

#chapters-filter-button,
#chapters-sort-button {
  cursor: pointer;
  display: block;
  margin: 0 0 0 0.5em;
  text-align: right;
}

#chapters-filter-button.active {
  color: var(--color-filter-active);
}

#chapter-filters-modal > .modal-content {
  display: inline-grid;
  grid-template-areas:
    'title title'
    '. .'
    'scanlator scanlator'
    '. .';
  grid-template-columns: 1fr 1fr;
  row-gap: 0.5em;
}
#chapter-filters-modal > .modal-content > h2 {
  grid-area: title;
  margin: 0;
}
#chapter-filters-modal > .modal-content > label:has(#scanlator-filter) {
  grid-area: scanlator;
}

#manga-title-link,
#manga-source > a,
#manga-chapters a {
  color: white;
  text-decoration: none;
}

#manga-title {
  margin-bottom: 8px;
  text-align: start;
}

.status-source {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25em;
  margin: 3px 0 0.75em;
}

#manga-status,
#manga-source {
  align-items: center;
  display: flex;
  font-size: 13px;
  margin-right: 5px;
  margin-top: 0px;
}

#manga-thumbnail {
  border-radius: 5px;
  margin-right: 30px;
  position: relative;
  z-index: 2;
}

#manga-description {
  text-align: justify;
}

#manga-description-div {
  max-height: 3.6em;
  overflow: hidden;
  position: relative;
  transition: max-height 0.2s linear;
}

#manga-description {
  margin-bottom: 1.8em;
}

.fade-out {
  background: linear-gradient(transparent, rgba(51, 51, 51, 1));
  bottom: 0;
  cursor: pointer;
  height: 1.8em;
  left: 0;
  position: absolute;
  right: 0;
  user-select: none;
}

#description-expand-icon {
  font-size: 2.7em;
  margin: 0px;
  transition: transform 0.2s linear;
}

#manga-genres,
#manga-categories,
#manga-tracking {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 0.5em;
  padding-left: 0px;
  text-align: left;
}

#manga-tracking {
  margin-right: 3em;
  margin-top: 0em;
}

#manga-genres li {
  background: var(--color-genres-bg);
  border: 1px solid;
  border-radius: 5px;
  cursor: pointer;
  display: inline;
  font-size: 11pt;
  line-height: 1.75;
  list-style-type: none;
  padding: 6px;
}

#manga-categories {
  margin: 0.75em 0;
}

#manga-categories li {
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  font-size: 8pt;
  line-height: 1.5;
  list-style-type: none;
  padding: 6px;
}

#manga-categories .material-symbols-outlined {
  margin-right: 10px;
}

#manga-tracking li {
  background: var(--color-genres-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border: 1px solid;
  border-radius: 5px;
  cursor: pointer;
  display: inline-block;
  height: 20px;
  list-style-type: none;
  padding: 0;
  width: 20px;
}

.chapter-box {
  align-items: center;
  background-color: var(--color-button-bg);
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  min-width: calc(100% - 20px);
  padding: 10px;
}

.chapter-box a {
  color: white;
  text-decoration: none;
}

.chapter-box a:hover {
  text-decoration: underline;
}

.chapter-date {
  color: darkseagreen;
}

#manga-chapters > div.chapter-box > div {
  &.read {
    &,
    & > a {
      color: #808080;
      font-style: italic;
    }
  }
  &.bookmark::before {
    content: 'bookmark';
    font-family: 'Material Symbols Outlined';
    padding-right: 0.2em;
  }
}

.chapter-box > div {
  text-align: start;
}

div.scanlator {
  color: var(--color-scanlator);
  font-size: 75%;
  text-align: start;
}

.portrait .manga-meta {
  display: grid;
  grid-template-areas: 'title' 'cover' 'info ';
}
.portrait .manga-details {
  display: flex;
  flex-wrap: wrap;
  grid-area: info;
  justify-content: space-evenly;
}
.portrait .manga-meta #manga-title {
  grid-area: title;
  margin-bottom: 0;
  text-align: center;
}
.portrait .manga-meta #manga-thumbnail {
  grid-area: cover;
  height: unset;
  justify-self: center;
  margin: 0.5em;
  max-width: 90%;
  width: unset;
}
