/* Thiraimax viewer features (14 Oct 2026): Next episode, episode list, watched ticks, search results. Loaded by inc-tx3.php. */

/* ---------- Episode page: big Next button ---------- */
.tx3-next-wrap { max-width: 780px; margin: -10px auto 30px; }
.tx3-next {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: 16px;
  background: var(--tx-accent); color: #fff !important;
  box-shadow: 0 10px 26px rgba(230, 57, 80, .28);
  text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease;
}
a.tx3-next:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(230, 57, 80, .36); }
.tx3-next-icon {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .2); display: grid; place-items: center;
  font-size: 20px;
}
.tx3-next-text { display: flex; flex-direction: column; min-width: 0; }
.tx3-next-label { font-size: 20px; font-weight: 800; line-height: 1.2; }
.tx3-next-title { font-size: 15px; opacity: .9; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx3-next.is-latest { background: #fff; color: var(--tx-text) !important; border: 1px solid #f0e6ea; box-shadow: none; }
.tx3-next.is-latest .tx3-next-icon { background: #e8f7ee; color: #15803d; }
.tx3-next.is-latest .tx3-next-label { font-size: 18px; }
.tx3-next.is-latest .tx3-next-title { color: var(--tx-muted); opacity: 1; white-space: normal; }

/* ---------- Episode page: all episodes list ---------- */
.tx3-eplist {
  max-width: 780px; margin: 0 auto 34px;
  background: #fff; border: 1px solid #f0e6ea; border-radius: 18px; overflow: hidden;
}
.tx3-eplist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid #f3edf0; }
.tx3-eplist-head h3 { margin: 0; font-size: 20px; font-weight: 800; color: var(--tx-text); }
.tx3-eplist-head span { color: var(--tx-muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tx3-eplist-items { list-style: none; margin: 0; padding: 6px; max-height: 440px; overflow-y: auto; position: relative; }
.tx3-eplist-items li { margin: 0; }
.tx3-ep {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--tx-text) !important; text-decoration: none !important;
}
.tx3-ep:hover { background: #fdf2f5; }
.tx3-ep-num { flex: none; width: 34px; text-align: center; font-size: 18px; font-weight: 800; color: var(--tx-muted); }
.tx3-ep-thumb { flex: none; width: 112px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: #eee; }
.tx3-ep-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tx3-ep-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx3-ep-title { font-size: 17px; font-weight: 700; }
.tx3-ep-date { font-size: 14px; color: var(--tx-muted); margin-top: 2px; }
.tx3-ep-state { flex: none; font-size: 13px; font-weight: 700; color: var(--tx-muted); }
.tx3-ep.is-current { background: #fdecef; }
.tx3-ep.is-current .tx3-ep-num,
.tx3-ep.is-current .tx3-ep-state { color: var(--tx-accent); }
.tx3-ep.is-seen .tx3-ep-state { color: #15803d; }
.tx3-ep.is-seen .tx3-ep-thumb img { opacity: .6; }

@media (max-width: 640px) {
  .tx3-next { padding: 14px 16px; gap: 12px; }
  .tx3-next-icon { width: 44px; height: 44px; font-size: 17px; }
  .tx3-next-label { font-size: 18px; }
  .tx3-ep { gap: 10px; padding: 9px 8px; }
  .tx3-ep-num { width: 24px; font-size: 16px; }
  .tx3-ep-thumb { width: 92px; }
  .tx3-ep-state { font-size: 12px; max-width: 70px; text-align: right; }
}

/* ---------- Show pages: watched tick on cards ---------- */
.tx3-seen {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: rgba(21, 128, 61, .92); color: #fff;
  font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
}

/* ---------- Search results with pictures ---------- */
.tx-search-results { text-align: left; max-height: 60vh; overflow-y: auto; }
.tx3-sr-head { color: rgba(255, 255, 255, .55); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 0 12px 8px; }
.tx-search-result.tx3-sr {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 12px; border-bottom: 0;
  font-size: 18px; text-decoration: none;
}
.tx3-sr.is-active { background: rgba(255, 255, 255, .1); color: #fff; }
.tx3-sr-art { flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.tx3-sr-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tx3-sr-text { display: flex; flex-direction: column; min-width: 0; }
.tx3-sr-name { font-weight: 800; color: #fff; }
.tx3-sr-sub { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .6); margin-top: 2px; }
@media (max-width: 640px) {
  .tx3-sr-art { width: 78px; }
  .tx-search-result.tx3-sr { font-size: 16px; gap: 10px; }
}
