/* =========================================================
 * MOTCHILL BREADCRUMBS — unified (mọi trang dùng .breadcrumbs)
 * v1.0.2 (2026-04-07) — padding/chữ thoáng hơn
 * Load: sau motchill-optimized; mobile-final override spacing/ellipsis
 * ========================================================= */

:root {
  --motchill-bc-bg: rgba(255, 255, 255, 0.045);
  --motchill-bc-border: rgba(255, 255, 255, 0.09);
  --motchill-bc-link: #a8b4f5;
  --motchill-bc-link-hover: #e8eafd;
  --motchill-bc-sep: rgba(255, 255, 255, 0.28);
  --motchill-bc-current: rgba(255, 255, 255, 0.92);
  --motchill-bc-muted: rgba(255, 255, 255, 0.45);
}

/* ----- Container: archive / search / taxonomy / pages ----- */
body:not(.single-ophim) .breadcrumbs {
  margin-top: 88px;
  margin-bottom: 20px;
}

/* ----- Single phim (info + xem tập) ----- */
body.single-ophim .breadcrumbs {
  margin-top: 72px;
  margin-bottom: 22px;
}

@media (min-width: 744px) {
  body.single-ophim .container:not(.motchill-watch-container) .breadcrumbs {
    margin-top: 102px;
  }
}

/* Trang xem tập: trong .motchill-watch-container */
body.single-ophim .motchill-watch-container .breadcrumbs {
  margin-top: 88px;
  margin-bottom: 22px;
}

ol.breadcrumbs {
  padding-inline-start: 0;
}

.breadcrumbs,
.motchill-breadcrumbs {
  list-style: none;
  margin-left: 0;
  margin-right: 0;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--motchill-bc-muted);
  background: var(--motchill-bc-bg);
  border: 1px solid var(--motchill-bc-border);
  border-radius: 10px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.breadcrumbs li,
.motchill-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: inherit;
}

.breadcrumbs li:not(:last-child)::after,
.motchill-breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: var(--motchill-bc-sep);
  margin-left: 12px;
  font-weight: 500;
  font-size: 0.95em;
  pointer-events: none;
  user-select: none;
}

.breadcrumbs a,
.motchill-breadcrumbs a {
  color: var(--motchill-bc-link);
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
  padding: 6px 8px;
  margin: -6px -8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.breadcrumbs a:hover,
.motchill-breadcrumbs a:hover {
  color: var(--motchill-bc-link-hover);
  background: rgba(102, 126, 234, 0.12);
}

.breadcrumbs li.active,
.motchill-breadcrumbs li.active {
  color: var(--motchill-bc-current);
  font-weight: 600;
}

.breadcrumbs li.active a,
.motchill-breadcrumbs li.active a {
  color: var(--motchill-bc-current);
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.breadcrumbs li.active a:hover,
.motchill-breadcrumbs li.active a:hover {
  background: transparent;
  color: var(--motchill-bc-current);
}

.breadcrumbs li.active span,
.motchill-breadcrumbs li.active span {
  color: var(--motchill-bc-current);
  font-weight: 600;
}

.breadcrumbs li i,
.breadcrumbs li .fa,
.breadcrumbs li [class*="fa-"],
.motchill-breadcrumbs li i,
.motchill-breadcrumbs li .fa {
  font-size: 0.92em;
  opacity: 0.9;
  vertical-align: middle;
}

/* Tablet: giới hạn crumb dài (tên phim) */
@media (min-width: 744px) and (max-width: 1023px) {
  .breadcrumbs li:nth-last-child(2),
  .motchill-breadcrumbs li:nth-last-child(2) {
    max-width: min(46vw, 340px);
  }

  .breadcrumbs li:nth-last-child(2) a span,
  .motchill-breadcrumbs li:nth-last-child(2) a span {
    display: inline-block !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }
}

@media (max-width: 743px) {
  body:not(.single-ophim) .breadcrumbs {
    margin-top: 72px;
    padding: 12px 16px;
    font-size: 13px;
  }
}
