/*
Theme Name: Madara-Child
Description:  A child theme for Madara - WordPress Theme for Manga, Novel sites
Author:       Madara
Author URI:   https://mangabooth.com/
Template: madara
Tags: one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Version: 1.0.39
*/

/* Blackdoujin: rounded manga cover with a universal MANHWA badge. */
body.text-ui-light .site-header .c-sub-header-nav {
  background-color: #fff !important;
}

body.text-ui-light.manga-page .profile-manga .tab-summary .summary_image img {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

/* Madara keeps .show-more after hiding the control for short summaries. */
body.manga-page.text-ui-light
  .description-summary.hide_show-more
  .summary__content.show-more::after {
  content: none;
  display: none;
}

@media (min-width: 993px) {
  body.text-ui-light.manga-page .profile-manga .tab-summary .summary_image {
    width: 350px;
    padding: 0;
    vertical-align: top;
  }

  body.text-ui-light.manga-page .profile-manga .tab-summary .summary_image img {
    display: block;
    width: 100%;
    height: auto;
  }
}

.page-item-detail {
  --bd-card-accent: #ffbf00;
}

.page-item-detail .item-thumb {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 16px;
  background: #1d1d1f;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.page-item-detail .item-thumb::before {
  content: "Manga";
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 0 0 11px 0;
  background: var(--bd-card-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.page-item-detail.bd-badge-manhwa .item-thumb::before {
  content: "Manhwa";
}

.page-item-detail .item-thumb > a {
  display: block;
  overflow: hidden;
  border-radius: inherit;
}

.page-item-detail .item-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  transition: transform 220ms ease;
}

.page-item-detail .item-thumb:hover img {
  transform: scale(1.025);
}

/* Match Madara's stronger list selectors without changing its HTML. */
.page-listing-item .page-item-detail .item-thumb {
  overflow: hidden !important;
  border-radius: 16px !important;
}

.page-listing-item .page-item-detail .item-thumb img {
  border-radius: inherit !important;
}

@media (max-width: 767px) {
  .page-item-detail .item-thumb,
  .page-listing-item .page-item-detail .item-thumb {
    border-radius: 14px !important;
  }

  .page-item-detail .item-thumb::before {
    min-height: 27px;
    padding: 0 11px;
    font-size: 10px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .page-item-detail .item-thumb img {
    transition: none;
  }

  .page-item-detail .item-thumb:hover img {
    transform: none;
  }
}

/*
 * Blackdoujin: manga archive grid.
 * Phone: 2 columns; tablet/iPad: 4; desktop: 6.
 */
#loop-content.page-content-listing.item-big_thumbnail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 14px;
}

body.page #loop-content.page-content-listing.item-big_thumbnail > .page-listing-item {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

#loop-content.page-content-listing.item-big_thumbnail .bd-manga-archive-grid-item {
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 0;
}

body.page #loop-content.page-content-listing.item-big_thumbnail .page-item-detail {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  #loop-content.page-content-listing.item-big_thumbnail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  #loop-content.page-content-listing.item-big_thumbnail {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Blackdoujin: six most-viewed Korean titles above the latest manga loop. */
.bd-korean-top-views {
  width: 100%;
  margin-bottom: 34px;
}

.bd-korean-top-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 0;
}

body.home .main-col-inner > .c-blog__heading.style-2 {
  margin-bottom: 0;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

body.home .bd-korean-top-heading {
  margin-bottom: 12px;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

body.home .main-col-inner > .c-blog__heading.style-2 h1.h4 {
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

body.home .main-col-inner > .c-blog__heading.style-2::before,
body.home .main-col-inner > .c-blog__heading.style-2::after {
  display: none !important;
  content: none !important;
}

body.text-ui-light .c-blog__heading.style-2.bd-korean-top-heading {
  border-color: transparent;
}

body.home .main-col-inner > .c-blog__heading.style-2 h1.h4,
.bd-korean-top-title {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.bd-korean-top-all {
  margin-bottom: 8px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #b7a5ff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: color 160ms ease;
}

.bd-korean-top-all::after {
  content: "›";
  display: inline-block;
  margin-left: 7px;
  font-size: 20px;
  font-weight: 400;
  line-height: 0;
  transform: translateY(1px);
}

.bd-korean-top-all:hover,
.bd-korean-top-all:focus {
  color: #fff;
}

.bd-korean-top-all:focus-visible {
  outline: 1px dashed currentColor;
  outline-offset: 4px;
}

.bd-korean-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 12px;
}

.bd-korean-top-card {
  min-width: 0;
  margin: 0;
}

.bd-korean-top-card .item-thumb > a {
  aspect-ratio: 350 / 476;
}

.bd-korean-top-card .item-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bd-korean-top-card-title {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 10px 0 4px;
  overflow: hidden;
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bd-korean-top-card-title a {
  color: inherit;
}

@media (min-width: 768px) {
  .bd-korean-top-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px 16px;
  }
}

/*
 * Blackdoujin: related manga uses the homepage Latest Manga card language.
 * Phone: 2 columns; tablet: 4 columns; desktop: 6 columns.
 */
.bd-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 14px;
}

.bd-related-grid .bd-related-grid-item {
  min-width: 0;
  margin: 0;
}

.bd-related-grid .item-thumb img {
  width: 100%;
  aspect-ratio: 350 / 476;
  object-fit: cover;
}

.bd-related-grid .item-summary {
  padding-top: 12px;
}

.bd-related-grid .post-title h3 {
  margin: 0 0 10px;
}

@media (min-width: 768px) {
  .bd-related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .bd-related-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Blackdoujin: manga search results reuse the homepage card language. */
body.search.post-type-archive-wp-manga #loop-content.page-content-listing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 14px;
}

body.search.post-type-archive-wp-manga #loop-content.page-content-listing > .bd-search-card {
  min-width: 0;
  margin: 0;
}

.bd-search-card .item-thumb > a {
  aspect-ratio: 350 / 476;
  background: #1d1d1f;
}

.bd-search-card .item-thumb img,
.bd-search-card__cover-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.bd-search-card .item-thumb img {
  object-fit: cover;
}

.bd-search-card__cover-placeholder {
  background: #242424;
}

.bd-search-card .item-summary {
  padding-top: 12px;
}

.bd-search-card .post-title h3 {
  margin: 0 0 10px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.bd-search-card__extensions:empty {
  display: none;
}

@media (min-width: 768px) {
  body.search.post-type-archive-wp-manga #loop-content.page-content-listing {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  body.search.post-type-archive-wp-manga #loop-content.page-content-listing {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Blackdoujin: compact, fully server-rendered chapter browser. */
.bd-single-chapters {
  --bd-chapter-bg: #333;
  --bd-chapter-panel: #1d1d1d;
  --bd-chapter-border: #444;
  --bd-chapter-muted: #999999;
  --bd-chapter-text: #f3f3f3;
  width: 100%;
  margin: 0 0 28px;
  overflow: hidden;
  border: 1px solid var(--bd-chapter-border);
  border-radius: 10px;
  background: var(--bd-chapter-bg);
  color: var(--bd-chapter-text);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.bd-single-chapters__toolbar {
  padding: 14px 16px 15px;
  border-bottom: 1px solid var(--bd-chapter-border);
  background: var(--bd-chapter-panel);
}

.bd-single-chapters__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.bd-single-chapters__title {
  margin: 0;
  color: var(--bd-chapter-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.bd-single-chapters__order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid #ffbf00;
  border-radius: 7px;
  background: #ffbf00;
  color: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.bd-single-chapters__order svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.bd-single-chapters__order:hover,
.bd-single-chapters__order:focus-visible {
  border-color: #c92f2f;
  background: #c92f2f;
  color: #fff;
}

.bd-single-chapters__order:focus-visible,
.bd-single-chapters__search input:focus-visible {
  outline: 2px solid #ffbf00;
  outline-offset: 2px;
}

.bd-single-chapters__search {
  position: relative;
  display: block;
  margin: 0;
}

.bd-single-chapters__search input {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 42px 0 14px;
  border: 1px solid #404040;
  border-radius: 7px;
  background: #131313;
  color: var(--bd-chapter-text);
  font: inherit;
  font-size: 14px;
  line-height: 44px;
  box-shadow: none;
}

.bd-single-chapters__search input::placeholder {
  color: #858585;
  opacity: 1;
}

.bd-single-chapters__search svg {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 18px;
  color: #8f8f8f;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
  pointer-events: none;
  transform: translateY(-50%);
}

.bd-single-chapters__scroll {
  max-height: 500px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #5f5f5f transparent;
  scrollbar-width: thin;
}

.bd-single-chapters__scroll::-webkit-scrollbar {
  width: 8px;
}

.bd-single-chapters__scroll::-webkit-scrollbar-thumb {
  border: 2px solid var(--bd-chapter-bg);
  border-radius: 99px;
  background: #5f5f5f;
}

.bd-single-chapters__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bd-single-chapters__row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--bd-chapter-border);
  background: transparent;
  list-style: none;
  transition: background-color 140ms ease;
}

.bd-single-chapters__row:last-of-type {
  border-bottom: 0;
}

.bd-single-chapters__row:hover,
.bd-single-chapters__row:focus-within {
  background: #222222;
}

.bd-single-chapters__link {
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--bd-chapter-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-single-chapters__link:hover,
.bd-single-chapters__link:focus {
  color: #fff;
  text-decoration: none;
}

.bd-single-chapters .bd-single-chapters__date.chapter-release-date {
  position: static;
  flex: 0 0 auto;
  float: none;
  margin: 0 0 0 auto;
  padding: 0;
  color: var(--bd-chapter-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: right;
}

.bd-single-chapters__date i,
.bd-single-chapters__date .timediff {
  color: inherit;
  font-style: normal;
}

.bd-single-chapters__bookmark {
  flex: 1 0 100%;
}

.bd-single-chapters__bookmark:empty {
  display: none;
}

.bd-single-chapters__empty,
.bd-single-chapters__state {
  margin: 0;
  padding: 24px 16px;
  color: var(--bd-chapter-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.bd-single-chapters [hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .bd-single-chapters {
    margin-bottom: 22px;
    border-radius: 8px;
  }

  .bd-single-chapters__toolbar {
    padding: 12px;
  }

  .bd-single-chapters__title {
    font-size: 16px;
  }

  .bd-single-chapters__search input {
    height: 42px;
    line-height: 42px;
  }

  .bd-single-chapters__scroll {
    max-height: 420px;
  }

  .bd-single-chapters__row {
    gap: 10px;
    padding: 0 12px;
  }

  .bd-single-chapters__link {
    font-size: 13px;
  }

  .bd-single-chapters .bd-single-chapters__date.chapter-release-date {
    max-width: 42%;
    font-size: 12px;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-single-chapters__order,
  .bd-single-chapters__row {
    transition: none;
  }
}
div.post-title h3.h5{
	margin-bottom: 0.5rem !important;
}

.summary_image{
	background: none !important;
}

.summary_image > a > img{
	border-radius: 0.5rem;
}

.summary_content{
	border-radius: 1rem;
}

.page-item-detail .item-thumb::before{
	background: var(--primary-color);
}


body.manga-page .profile-manga .tab-summary .summary_content_wrap .summary_content .post-status .manga-action .count-comment .action_icon a i, body.manga-page .profile-manga .tab-summary .summary_content_wrap .summary_content .post-status .manga-action .add-bookmark .action_icon a i, body.manga-page .profile-manga .tab-summary .summary_content_wrap .summary_content .post-status .manga-action .count-comment .action_detail a i, body.manga-page .profile-manga .tab-summary .summary_content_wrap .summary_content .post-status .manga-action .add-bookmark .action_detail a i{
	color: var(--primary-color);
}

:root {
	--primary-color: #ffbf00;
	--secondary-color: #ffbf00;
}
