/* Local header and interaction adapters for the shared reference title bundle. */
#main.fk-single-hero { padding-top: 120px; }
#main.fk-single-hero .fk-hero-button { white-space: nowrap; }
#main.fk-single-hero .fk-hero-button > .icon { width: 20px; height: 20px; flex: 0 0 20px; fill: currentColor; }
#main.fk-single-hero .fk-hero-community { display: grid; }
#main.fk-single-hero .fk-hero-synopsis p { margin: 0 0 10px; }
#main.fk-single-hero .tamasha-gate-message { margin-top: 16px; font-size: 13px; line-height: 1.9; }
#main.fk-single-hero .tamasha-gate-message a { color: var(--hero-gold); }
@media (max-width: 767px) {
    #main.fk-single-hero { padding-top: 94px; }
}
/* Keep long episode names and carousel tracks inside the mobile title shell. */
body.single-tm_movie, body.single-tm_series { overflow-x: clip; }
body.single-tm_series .download_box .right_side_q { min-width: 0; flex-wrap: wrap; }
body.single-tm_series .download_box .item_q_fe { overflow-wrap: anywhere; }

.fk-single-chapters .fk-dubbing-info .fk-dubbing-content {
  color: inherit;
  font-size: 14px;
  line-height: 2.1;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* Download colour codes are editorial metadata. Keep them visible on both
   movie rows and grouped series qualities, as in the FilmKio download list. */
.download_box .FilmKioEncode,
.download_box .row_quality { --dl-accent: #c8ae79; }
.download_box .dl_color--blue { --dl-accent: #78b3f4; }
.download_box .dl_color--red { --dl-accent: #ef9096; }
.download_box .dl_color--yellow { --dl-accent: #e4bf72; }
.download_box .dl_color--green { --dl-accent: #78c99c; }
.download_box .FilmKioEncode.dl_color--blue,
.download_box .FilmKioEncode.dl_color--red,
.download_box .FilmKioEncode.dl_color--yellow,
.download_box .FilmKioEncode.dl_color--green,
.download_box .row_quality.dl_color--blue,
.download_box .row_quality.dl_color--red,
.download_box .row_quality.dl_color--yellow,
.download_box .row_quality.dl_color--green { border-right: 2px solid var(--dl-accent); }
.download_box .dl_color--blue .item_dl_right:first-child .value,
.download_box .dl_color--red .item_dl_right:first-child .value,
.download_box .dl_color--yellow .item_dl_right:first-child .value,
.download_box .dl_color--green .item_dl_right:first-child .value,
.download_box .dl_color--blue .item_q_fe--version .value,
.download_box .dl_color--red .item_q_fe--version .value,
.download_box .dl_color--yellow .item_q_fe--version .value,
.download_box .dl_color--green .item_q_fe--version .value {
  border: 1px solid color-mix(in srgb, var(--dl-accent) 65%, transparent);
  border-radius: 5px;
  color: var(--dl-accent);
  display: inline-flex;
  line-height: 1.5;
  padding: 3px 10px;
}

/* Series rows mirror the reference’s quiet six-column information rail. */
body.single-tm_series .download_box .row_quality .title_quality {
  align-items: center;
  min-height: 62px;
  padding: 7px 14px;
}
body.single-tm_series .download_box .row_quality .right_side_q {
  align-items: center;
  display: grid;
  flex: 1;
  gap: 8px 22px;
  grid-template-columns: repeat(6, minmax(74px, 1fr));
}
body.single-tm_series .download_box .row_quality .item_q_fe {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  min-width: 0;
  text-align: center;
}
body.single-tm_series .download_box .row_quality .item_q_fe .label {
  color: #789096;
  font-size: 10px;
  white-space: nowrap;
}
body.single-tm_series .download_box .row_quality .item_q_fe .value {
  color: #d4dfe0;
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.single-tm_series .download_box .row_quality:not(.dl_color--blue):not(.dl_color--red):not(.dl_color--yellow):not(.dl_color--green) .item_q_fe--version .value {
  border: 1px solid rgba(200,174,121,.6);
  border-radius: 5px;
  color: #dfc789;
  padding: 3px 11px;
}
@media (max-width: 760px) {
  body.single-tm_series .download_box .row_quality .right_side_q { grid-template-columns: repeat(3, minmax(80px, 1fr)); }
}

/* The reference keeps related titles as a compact horizontal rail.  A small
   local adapter is needed because legacy single-page rules otherwise force
   each new discovery card to fill the entire row. */
.scroll_navigations .relatedPost .fk-related-static {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 18px;
    margin: 0 !important;
    min-width: 0;
    overflow-x: auto;
    padding: 8px 0 18px !important;
    scroll-snap-type: x proximity;
    width: 100%;
}

body.single-tm_series .download_box .parts_links .inner_parts_links {
    align-items: stretch;
}

body.single-tm_series .download_box .item_part,
body.single-tm_series .download_box .item_part .linkst {
    min-width: 0;
}

body.single-tm_series .download_box .item_part .linkst {
    align-items: center;
    display: flex;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scroll_navigations .relatedPost .fk-related-static > .fk-d-card {
    flex: 0 0 calc(16.6667% - 15px) !important;
    margin: 0 !important;
    padding: 0 !important;
    scroll-snap-align: start;
    width: calc(16.6667% - 15px) !important;
}

@media (max-width: 1100px) {
    .scroll_navigations .relatedPost .fk-related-static > .fk-d-card {
        flex-basis: calc(25% - 14px) !important;
        width: calc(25% - 14px) !important;
    }
}

@media (max-width: 700px) {
    .scroll_navigations .relatedPost .fk-related-static {
        gap: 14px;
    }

    .scroll_navigations .relatedPost .fk-related-static > .fk-d-card {
        flex-basis: calc(44% - 8px) !important;
        width: calc(44% - 8px) !important;
    }
}


/* Locked play/download card */
.tamasha-gate-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  align-items: start;
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 173, 17, 0.14), rgba(245, 173, 17, 0.04) 60%), #17191f;
  border: 1px solid rgba(245, 173, 17, 0.38);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  color: #f3f3f3;
}
.tamasha-gate-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(245, 173, 17, 0.16);
  color: #f5ad11;
}
.tamasha-gate-card__title { display: block; font-size: 16px; font-weight: 800; line-height: 1.6; }
.tamasha-gate-card__text { margin: 2px 0 10px; font-size: 13px; line-height: 1.9; color: #c9ccd3; font-weight: 500; }
.tamasha-gate-card__perks { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.tamasha-gate-card__perks li {
  position: relative;
  padding: 3px 12px 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: #dfe2e8;
}
.tamasha-gate-card__perks li::before { content: "✓"; margin-left: 6px; color: #f5ad11; font-weight: 800; }
.tamasha-gate-card__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 8px; }
.tamasha-gate-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 26px;
  border-radius: 12px;
  background: #f5ad11;
  color: #1a1305 !important;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.tamasha-gate-card__cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.tamasha-gate-card__link { color: #f5ad11; font-size: 13px; font-weight: 700; text-decoration: none; }
@media (max-width: 560px) {
  .tamasha-gate-card { grid-template-columns: 1fr; padding: 16px; }
  .tamasha-gate-card__cta { width: 100%; }
}

/* Persian subtitle downloads: compact strip under the matching quality */
.download_box .fk-sub-row{align-items:center;border-top:1px dashed hsla(0,0%,100%,.12);display:flex;flex:0 0 100%;flex-wrap:wrap;gap:8px;margin:2px 10px 12px 0;padding:12px 0 0;width:100%}
.download_box .fk-sub-row__label{color:#c9c9c9;font-size:13px;margin-left:4px}
.download_box .fk-sub-chip{background:transparent;border:1px solid var(--fk-color-accent,#e2bf77);border-radius:8px;color:var(--fk-color-accent,#e2bf77);display:inline-block;font-size:13px;line-height:30px;min-width:48px;padding:0 10px;text-align:center;transition:all .2s ease-in-out;white-space:nowrap}
.download_box .fk-sub-chip:hover{background:var(--fk-color-accent,#e2bf77);color:#0b0e0f}
.download_box .fk-sub-chip.is-gated{opacity:.7}
.download_box .fk-sub-link{display:block;font-size:12px;margin-top:6px;text-align:center}
