/* Watchlist Core completion — separate Comrade saves from the read-only Plex Watchlist mirror. */

.cinema-watchlist-page .library-import-card,
.cinema-watchlist-page .section-header:not(.cinema-watchlist-heading) { display: none !important; }
.cinema-watchlist-page [data-watchlist-import-status][hidden] { display: none !important; }
.cinema-watchlist-page [data-watchlist-import-status] { margin: 8px 0 0 !important; padding: 9px 11px; border-radius: 8px; font-size: .68rem !important; }
.cinema-watchlist-page [data-watchlist-import-status][data-tone="error"] { border: 1px solid rgba(230,101,122,.24); background: rgba(119,35,50,.12); color: #ef9eac; }
.cinema-watchlist-page [data-watchlist-import-status][data-tone="success"] { border: 1px solid rgba(93,229,140,.2); background: rgba(38,128,75,.08); color: #78dda0; }
.cinema-watchlist-page .watchlist-core-section { min-width: 0; }
.cinema-watchlist-page .cinema-watchlist-heading p:empty { display: none; }

.cinema-watchlist-page .watchlist-core-toolbar {
  min-height: 56px; margin: 0 0 12px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: #10131f;
}
.cinema-watchlist-page .watchlist-source-tabs { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 8px; background: rgba(255,255,255,.035); }
.cinema-watchlist-page .watchlist-source-tabs button {
  min-height: 32px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: #8e92a2; font: inherit; font-size: .67rem; font-weight: 800; cursor: pointer;
}
.cinema-watchlist-page .watchlist-source-tabs button span { min-width: 20px; height: 20px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgba(255,255,255,.055); color: #767b8c; font-size: .59rem; }
.cinema-watchlist-page .watchlist-source-tabs button.is-active { border-color: rgba(155,92,255,.3); background: rgba(112,58,180,.2); color: #eadcff; }
.cinema-watchlist-page .watchlist-source-tabs button.is-active span { background: rgba(155,92,255,.18); color: #c8a7f7; }
.cinema-watchlist-page .watchlist-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.cinema-watchlist-page .watchlist-toolbar-actions small { color: #6f7485; font-size: .62rem; font-weight: 700; }
.cinema-watchlist-page .watchlist-refresh-button { min-height: 34px !important; padding: 0 11px !important; border-radius: 7px !important; font-size: .66rem !important; }

/* Stronger than the generic Stage 2 Watchlist grid so these cards stay readable. */
.cinema-watchlist-page .cinema-watchlist-grid,
.cinema-watchlist-page [data-watchlist-grid] {
  min-height: 320px; margin-top: 0 !important; padding: 14px !important; display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important; align-items: start; justify-content: stretch !important;
  overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: #10131f;
}
.cinema-watchlist-page .watchlist-core-card { width: 100%; min-width: 0; overflow: hidden; display: grid; grid-template-rows: auto auto auto; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: #0d1019; }
.cinema-watchlist-page .watchlist-core-card:hover { border-color: rgba(155,92,255,.32); }
.cinema-watchlist-page .watchlist-core-card-open.poster-card {
  width: 100% !important; max-width: 100% !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
  display: block !important; overflow: hidden !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; transform: none !important;
}
.cinema-watchlist-page .watchlist-core-card-open .poster-frame { width: 100% !important; height: auto !important; min-height: 0 !important; aspect-ratio: 2 / 3 !important; overflow: hidden !important; border-radius: 0 !important; background: #080b12 !important; }
.cinema-watchlist-page .watchlist-core-card-open .poster-frame > img { width: 100% !important; height: 100% !important; display: block !important; object-fit: cover !important; object-position: center !important; }
.cinema-watchlist-page .watchlist-core-card-open .poster-source-pill { display: none !important; }
.cinema-watchlist-page .watchlist-core-card-open .poster-title,
.cinema-watchlist-page .watchlist-core-card-open h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

.cinema-watchlist-page .watchlist-card-source { min-height: 38px; padding: 7px 9px; display: flex; align-items: center; gap: 7px; overflow: hidden; border-top: 1px solid rgba(255,255,255,.06); }
.cinema-watchlist-page .watchlist-source-pill { min-height: 23px; padding: 0 8px; display: inline-flex; align-items: center; flex: 0 0 auto; border-radius: 999px; font-size: .59rem; font-weight: 850; }
.cinema-watchlist-page .watchlist-source-pill.is-comrade { border: 1px solid rgba(155,92,255,.25); background: rgba(112,58,180,.14); color: #c7a5f6; }
.cinema-watchlist-page .watchlist-source-pill.is-plex { border: 1px solid rgba(93,229,140,.22); background: rgba(38,128,75,.08); color: #74d99c; }
.cinema-watchlist-page .watchlist-source-pill.is-both { border: 1px solid rgba(126,211,163,.22); background: linear-gradient(90deg, rgba(112,58,180,.14), rgba(38,128,75,.1)); color: #cdebd9; }
.cinema-watchlist-page .watchlist-card-source small { min-width: 0; overflow: hidden; color: #717687; font-size: .59rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.cinema-watchlist-page .watchlist-card-actions { padding: 7px 8px 8px; display: grid; grid-template-columns: 1fr; gap: 6px; border-top: 1px solid rgba(255,255,255,.07); background: #090c14; }
.cinema-watchlist-page .watchlist-card-actions.has-watch { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
.cinema-watchlist-page .watchlist-card-action {
  width: 100%; min-width: 0; min-height: 31px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 7px; font: inherit; font-size: .61rem; font-weight: 820; line-height: 1; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.cinema-watchlist-page .watchlist-card-action.is-secondary,
.cinema-watchlist-page .watchlist-card-action.is-remove { border: 1px solid rgba(255,255,255,.09); background: transparent; color: #adb0bd; }
.cinema-watchlist-page .watchlist-card-action.is-primary { border: 1px solid rgba(155,92,255,.28); background: rgba(112,58,180,.24); color: #d8bfff; }
.cinema-watchlist-page .watchlist-card-action.is-remove { grid-column: 1 / -1; color: #9a9eac; }
.cinema-watchlist-page .watchlist-card-action:hover { border-color: rgba(155,92,255,.34); color: #eadfff; }
.cinema-watchlist-page .watchlist-card-action.is-remove:hover { border-color: rgba(230,101,122,.22); background: rgba(119,35,50,.08); color: #eca2ae; }

.cinema-watchlist-page .watchlist-core-state { grid-column: 1 / -1; min-height: 300px; padding: 22px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; }
.cinema-watchlist-page .watchlist-core-state img { width: min(100%, 230px); aspect-ratio: 1; object-fit: cover; border-radius: 13px; filter: drop-shadow(0 18px 32px rgba(0,0,0,.24)); }
.cinema-watchlist-page .watchlist-core-state strong { color: #efedf4; font-size: .95rem; font-weight: 850; }
.cinema-watchlist-page .watchlist-core-state span { color: #7c8191; font-size: .68rem; }
.cinema-watchlist-page .watchlist-core-state.is-loading img { animation: comrade-watchlist-pulse 1.7s ease-in-out infinite; }
@keyframes comrade-watchlist-pulse { 0%,100% { transform: translateY(0) scale(1); opacity: .94; } 50% { transform: translateY(-4px) scale(1.018); opacity: 1; } }

html[data-comrade-theme="light"] .cinema-watchlist-page .watchlist-core-toolbar,
html[data-comrade-theme="light"] .cinema-watchlist-page [data-watchlist-grid],
html[data-comrade-theme="light"] .cinema-watchlist-page .watchlist-core-card { border-color: rgba(24,28,39,.1); background: #fff; }
html[data-comrade-theme="light"] .cinema-watchlist-page .watchlist-card-actions { border-color: rgba(24,28,39,.08); background: #f7f8fb; }
html[data-comrade-theme="light"] .cinema-watchlist-page .watchlist-source-tabs { background: rgba(24,28,39,.04); }
html[data-comrade-theme="light"] .cinema-watchlist-page .watchlist-core-state strong { color: #242733; }

@media (max-width: 1480px) {
  .cinema-watchlist-page .cinema-watchlist-grid,
  .cinema-watchlist-page [data-watchlist-grid] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 1050px) {
  .cinema-watchlist-page .cinema-watchlist-grid,
  .cinema-watchlist-page [data-watchlist-grid] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .cinema-watchlist-page .watchlist-core-toolbar { align-items: stretch; flex-direction: column; }
  .cinema-watchlist-page .watchlist-toolbar-actions { justify-content: space-between; }
}
@media (max-width: 680px) {
  .cinema-watchlist-page .cinema-watchlist-grid,
  .cinema-watchlist-page [data-watchlist-grid] { grid-template-columns: 1fr !important; padding: 10px !important; }
  .cinema-watchlist-page .watchlist-source-tabs { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .cinema-watchlist-page .watchlist-source-tabs button { justify-content: center; padding: 0 6px; }
  .cinema-watchlist-page .watchlist-toolbar-actions small { display: none; }
  .cinema-watchlist-page .watchlist-refresh-button { width: 100%; }
  .cinema-watchlist-page .watchlist-card-actions.has-watch { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) { .cinema-watchlist-page .watchlist-core-state.is-loading img { animation: none; } }