/* Template style for Preview grid / picker */
.tc-preview-grid{display:flex;gap:16px;flex-wrap:wrap;align-items:flex-start;margin:12px 0 4px;}
.tc-preview-box{width:180px;min-width:180px;max-width:180px;min-height:270px;position:relative;border-radius:0;overflow:hidden;background:#0f141e;box-shadow:0 10px 30px rgba(0,0,0,0.35);}
.tc-preview-box--classic{min-height:240px;height:240px;}
.tc-preview-box img{width:100%;height:240px;object-fit:cover;display:block;}
.tc-preview-box .movie-hover{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;background:linear-gradient(180deg,rgba(0,0,0,0) 35%,rgba(0,0,0,0.85) 72%,rgba(0,0,0,0.95) 100%);padding:12px;}
.tc-preview-box .movie-title{font-weight:700;font-size:15px;line-height:1.25;margin:0 0 6px;text-align:center;}
.tc-preview-box .movie-actions{display:flex;justify-content:center;gap:14px;font-size:18px;color:#fff;filter:drop-shadow(0 2px 4px rgba(0,0,0,0.5));}
.tc-preview-box,
.tc-preview-box *,
.tc-preview-box a,
.tc-preview-box a *{pointer-events:none !important;}
.tc-preview-box{cursor:default;}
.tc-preview-grid .th-card__poster--placeholder,
.tc-preview-grid .tc-card__poster--placeholder,
.tc-preview-grid .tc-simple-card__poster--placeholder{display:flex;align-items:center;justify-content:center;}
.tc-preview-grid .tc-card{width:180px;min-width:180px;max-width:180px;flex:0 0 auto;}
.tc-preview-grid .tc-modern,
.tc-preview-grid .tc-simple-card{width:180px;min-width:180px;max-width:180px;}
.tc-preview-grid .tc-modern__tags{justify-content:center;}
.tc-preview-box.tc-preview-selected{outline:2px solid #7c5dff; box-shadow:0 12px 24px rgba(124,93,255,0.25);}
.tc-preview-box.tc-preview-selected::after{content:"\f00c"; font-family:"Font Awesome 5 Free"; font-weight:900; position:absolute; top:8px; right:8px; width:24px; height:24px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:rgba(124,93,255,0.2); color:#cfd8ff; border:1px solid rgba(124,93,255,0.55); box-shadow:0 4px 10px rgba(0,0,0,0.35);}
.tc-preview-label{font-weight:600;margin:0 0 6px;font-size:13px;}
.tc-preview-wrapper{border:1px solid rgba(255,255,255,0.08);border-radius:10px;padding:12px;background:#0c111a;}
.tc-preview-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:6px;}
.tc-preview-toggle{display:flex;align-items:center;gap:8px;}

/* Template style for Classic Overlay */
.tc-card{width:170px;min-width:170px;max-width:170px;border-radius:12px;overflow:hidden;position:relative;background:#0f141e;color:#fff;box-shadow:0 10px 30px rgba(0,0,0,0.35);min-height:255px;margin-right:12px;margin-bottom:16px;}
.tc-card__poster{width:100%;height:240px;display:block;background:#1c2432;}
.tc-card__poster--cover{background-size:cover;background-position:center;}
.tc-card__poster img{width:100%;height:100%;object-fit:cover;display:block;}
.tc-card__poster--placeholder{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#1f2a3a,#0f141e);color:#7ea0d6;font-size:32px;}
.tc-card__overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(4,7,12,0) 35%,rgba(4,7,12,0.85) 72%,rgba(4,7,12,0.95) 100%);display:flex;flex-direction:column;justify-content:flex-end;padding:12px;gap:6px;}
.tc-card__overlay--standard{background:linear-gradient(180deg,rgba(0,0,0,0) 35%,rgba(0,0,0,0.85) 72%,rgba(0,0,0,0.95) 100%);}
.tc-card__title{font-weight:700;font-size:15px;line-height:1.25;margin:0;}
.tc-card__title--center{text-align:center;}
.tc-card__anchor{position:relative;display:block;color:inherit;text-decoration:none;}
.tc-card__anchor:hover{text-decoration:none;}
.tc-card__anchor--simple{height:100%;display:block;}
.tc-card__poster-img{width:100%;height:240px;object-fit:cover;display:block;background:#0c1221;}
.tc-card__poster{width:100%;height:240px;overflow:hidden;background:#0c1221;}
.tc-card__poster-image{width:100%;height:240px;object-fit:cover;display:block;background:#1c2432;}
.tc-card__meta{font-size:12px;opacity:.85;display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.tc-card__meta--center{justify-content:center;}
.tc-card__actions{display:flex;justify-content:center;gap:14px;font-size:18px;color:#fff;filter:drop-shadow(0 2px 4px rgba(0,0,0,0.5));margin-top:4px;}
.tc-card__actions--inline{margin-top:8px;justify-content:center;}

/* Template style for Modern Compact (/home-main + /movies) */
.tc-card--modern-home{background:linear-gradient(145deg,#0b1020,#050711);border:1px solid rgba(71,85,149,.8);flex:1 1 auto;min-width:170px;width:100%;border-radius:12px;overflow:hidden;color:#f6f8ff;margin-right:0;display:block;}
.tc-card--modern-home .mc-card{height:100%;width:100%;display:flex;flex-direction:column;background:transparent;border:0;box-shadow:none;margin:0;padding:0;}
.tc-card--modern-home .mc-card__link{display:flex;flex-direction:column;height:100%;width:100%;padding:0;margin:0;}
.tc-card--modern-home .mc-card__poster{display:block;width:100%;aspect-ratio:2/3;min-height:240px;background:radial-gradient(circle at 20% 0,rgba(148,163,253,.26),transparent 60%), #090b18;background-size:cover;background-position:center;flex:0 0 auto;margin:0;object-fit:cover;border-radius:0;}
.tc-card--modern-home .mc-card__meta{padding:8px 9px 10px;display:flex;flex-direction:column;gap:6px;background:transparent;min-height:0;color:inherit;flex:1;}
.tc-modern-compact-runtime{font-size:11px;color:#9ca3c9;margin:0;text-align:left;}
.tc-modern-compact-actions{display:flex;gap:10px;font-size:15px;color:#c7d4e5;align-items:center;}
.tc-modern-compact-actions i{font-size:15px;}
.mc-card__title{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;text-align:left;}
.mc-card__title-link{color:inherit;text-decoration:none;display:block;}
.mc-card__title-link:hover{color:inherit;text-decoration:underline;}
.mc-card__poster-link{display:block;line-height:0;}
.mc-card__poster-link:hover{opacity:0.96;}
.mc-card__meta-row{margin-top:0;display:flex;flex-wrap:wrap;gap:4px;align-self:flex-start;}
.mc-card__meta-row .mc-pill{padding:2px 6px;border-radius:999px;font-size:10px;border:1px solid rgba(148,163,184,.6);color:#cbd5f5;white-space:nowrap;display:inline-flex;align-items:center;gap:4px;text-decoration:none;transition:background .12s ease,border-color .12s ease,box-shadow .12s ease,color .12s ease;}
.mc-card__meta-row .mc-pill:hover{background:rgba(148,163,253,0.18);border-color:rgba(148,163,253,0.65);color:#f5f7ff;box-shadow:0 0 0 2px rgba(148,163,253,0.18);}
#content-wrapper .mc-card__meta-row .mc-pill:hover{text-decoration:none;}
.mc-card__meta-row .mc-pill--more{background:rgba(255,255,255,0.08);color:#e5e7ff;border-color:rgba(148,163,184,.35);cursor:default;}
.mc-card__actions{display:flex;gap:8px;align-items:center;justify-content:flex-start;padding-bottom:4px;font-size:14px;color:#c7d4e5;margin-top:auto;}
.mc-card__link{color:inherit;text-decoration:none;}
.mc-card__link:hover{color:inherit;text-decoration:none;}
.th-card__poster--placeholder{display:flex;align-items:center;justify-content:center;}

/* Template style for Simple Overlay */
.tc-simple-card{position:relative;width:100%;min-width:170px;max-width:100%;min-height:270px;border-radius:16px;overflow:hidden;background:linear-gradient(180deg,#151c2b 0%,#0b0f1c 100%);border:1px solid rgba(255,255,255,0.08);box-shadow:0 12px 30px rgba(0,0,0,0.38);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;}
.tc-simple-card:hover{transform:translateY(-2px);box-shadow:0 16px 40px rgba(0,0,0,0.45);border-color:rgba(255,255,255,0.14);}
.tc-simple-card__link{position:relative;display:block;height:100%;color:inherit;text-decoration:none;}
.tc-simple-card__poster{position:relative;width:100%;aspect-ratio:2/3;min-height:248px;background:linear-gradient(160deg,#1f2941,#0c0f1c);display:flex;align-items:center;justify-content:center;}
.tc-simple-card__poster img{width:100%;height:100%;object-fit:cover;display:block;}
.tc-simple-card__poster--placeholder{color:#7ea0d6;}
.tc-simple-card__poster-icon{font-size:32px;opacity:.9;}
.tc-simple-card__overlay{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;gap:10px;padding:14px 12px 12px;background:linear-gradient(180deg,rgba(5,7,14,0) 44%,rgba(5,7,14,0.9) 78%,rgba(5,7,14,0.97) 100%);}
.tc-simple-card__title{margin:0;text-align:center;font-weight:700;font-size:15px;line-height:1.25;color:#f6f8ff;text-shadow:0 2px 4px rgba(0,0,0,0.45);}
.tc-simple-card__actions{display:flex;justify-content:center;align-items:center;gap:14px;font-size:18px;color:#f8fbff;filter:drop-shadow(0 2px 4px rgba(0,0,0,0.5));opacity:0;transform:translateY(6px);transition:opacity .16s ease,transform .16s ease;pointer-events:auto;}
.tc-simple-card:hover .tc-simple-card__actions,.tc-simple-card:focus-within .tc-simple-card__actions,body.pref-show-quick-actions .tc-simple-card .tc-simple-card__actions{opacity:1;transform:translateY(0);}
.tc-simple-card__actions--static{opacity:1;transform:none;pointer-events:none;}
.tc-simple-card__meta{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;font-size:12px;opacity:.95;}
.tc-simple-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:700;color:#e8edff;background:rgba(255,255,255,0.08);}
.tc-simple-pill--runtime{color:#b9edff;background:rgba(74,215,255,0.15);}
.tc-simple-pill i{font-size:12px;}
/* Simple overlay grid layout */
#movies_holder.tc-simple-grid,
#shows_holder.tc-simple-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
  gap:18px;
  align-items:stretch;
  margin-left:0;
  margin-right:0;
  padding-left:0;
}
#movies_holder.tc-simple-grid .tc-card,
#shows_holder.tc-simple-grid .tc-card{margin:0; width:100%;}
#movies_holder.tc-simple-grid > [class^='col-'],
#movies_holder.tc-simple-grid > [class*=' col-'],
#shows_holder.tc-simple-grid > [class^='col-'],
#shows_holder.tc-simple-grid > [class*=' col-']{
  padding-left:0;
  padding-right:0;
}
#movies_holder.tc-modern-grid,
#shows_holder.tc-modern-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap:14px;
  margin-left:0;
  margin-right:0;
  padding-left:0;
  align-items:stretch;
}
#movies_holder.tc-modern-grid .tc-card,
#shows_holder.tc-modern-grid .tc-card{ margin:0; width:100%; }
#movies_holder.tc-modern-grid .tc-card--modern-home,
#shows_holder.tc-modern-grid .tc-card--modern-home{
  width:100%;
  min-width:170px;
  max-width:100%;
  flex:0 0 auto;
  margin:0;
  border-radius:12px;
}
/* Legacy pill styling used by other templates */
.tc-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 7px;border-radius:8px;font-size:12px;font-weight:600;color:#dfe7f5;background:rgba(255,255,255,0.07);backdrop-filter:blur(4px);}
.tc-chip i{font-size:12px;}
.tc-chip--runtime{color:#bef2ff;background:rgba(74,215,255,0.12);}
.tc-chip--genre{color:#f3f6ff;background:rgba(255,255,255,0.08);}

/* Template style for Minimal / Simple Modern */
.tc-modern{background:#0f121a;border:1px solid rgba(255,255,255,0.05);}
.tc-modern{position:relative;width:100%;min-width:165px;max-width:100%;border-radius:14px;overflow:hidden;background:#0f121a;border:1px solid rgba(255,255,255,0.1);box-shadow:0 10px 26px rgba(0,0,0,0.35);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;}
.tc-modern::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#151c2b 0%,#0e1320 55%,#0b0f18 100%);z-index:0;}
.tc-modern:hover{transform:translateY(-2px);box-shadow:0 16px 40px rgba(0,0,0,0.45);border-color:rgba(255,255,255,0.14);}
.tc-modern a,.tc-modern__link{position:relative;z-index:1;display:flex;flex-direction:column;height:100%;width:100%;color:inherit;text-decoration:none;background:transparent;}
.tc-modern.image-box > a{display:flex !important;width:100%;align-items:stretch;}
.tc-modern__body{padding:12px 12px 14px;display:flex;flex-direction:column;gap:8px;position:relative;z-index:1;}
.tc-modern__title{font-weight:700;font-size:15px;line-height:1.3;margin:0;color:#f6f8ff;text-align:center;}
.tc-modern__title--center{text-align:center;}
.tc-modern__meta{display:flex;flex-wrap:wrap;gap:6px;font-size:12px;color:#c7d0e0;align-items:center;}
.tc-modern__tags{display:flex;flex-wrap:wrap;gap:6px;}
.tc-modern .tc-card__poster{width:100%;height:240px;display:block;background:#11182a;overflow:hidden;position:relative;z-index:1;}
.tc-modern .tc-card__poster img{width:100%;height:100%;object-fit:cover;display:block;}
.tc-modern .tc-card__poster.tc-card__poster--placeholder{display:flex;align-items:center;justify-content:center;color:#7ea0d6;font-size:28px;}
#movies_holder.tc-minimal-grid,
#shows_holder.tc-minimal-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(165px, 1fr));
  gap:16px;
  align-items:stretch;
  margin-left:0;
  margin-right:0;
  padding-left:0;
}
#movies_holder.tc-minimal-grid .tc-card,
#shows_holder.tc-minimal-grid .tc-card{margin:0; width:100%;}
#movies_holder.tc-minimal-grid > [class^='col-'],
#movies_holder.tc-minimal-grid > [class*=' col-'],
#shows_holder.tc-minimal-grid > [class^='col-'],
#shows_holder.tc-minimal-grid > [class*=' col-']{
  padding-left:0;
  padding-right:0;
}
#movies_holder.tc-classic-grid,
#shows_holder.tc-classic-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(170px, 1fr));
  gap:16px;
  margin-left:0;
  margin-right:0;
  padding-left:0;
}
#movies_holder.tc-classic-grid .tc-card,
#movies_holder.tc-classic-grid .image-box,
#shows_holder.tc-classic-grid .tc-card,
#shows_holder.tc-classic-grid .image-box{
  margin:0;
  width:100%;
  max-width:100%;
  min-width:0;
}
#movies_holder.tc-classic-grid > [class^='col-'],
#movies_holder.tc-classic-grid > [class*=' col-'],
#shows_holder.tc-classic-grid > [class^='col-'],
#shows_holder.tc-classic-grid > [class*=' col-']{
  padding-left:0;
  padding-right:0;
}

/* Shared utility */
/* hide "on" icons by default; StatusStore will toggle */
[id^="remove_watched_movie_"], [id^="remove_favourited_movie_"], [id^="remove_saved_movie_"] { display:none; }
[id^="remove_watched_show_"], [id^="remove_favourited_show_"], [id^="remove_saved_show_"] { display:none; }
/* Hide "on" icons until StatusStore toggles them */
[id^="remove_watched_movie_"], [id^="remove_favourited_movie_"], [id^="remove_saved_movie_"] { display:none; }
[id^="remove_watched_show_"], [id^="remove_favourited_show_"], [id^="remove_saved_show_"] { display:none; }
