.movie-collections-search { display:flex; align-items:center; gap:12px; margin:0 0 22px; max-width:560px; }
.movie-collections-search label { display:flex; align-items:center; gap:10px; flex:1; min-width:0; border:1px solid var(--line); border-radius:10px; padding:10px 14px; background:var(--surface); color:var(--muted); }
.movie-collections-search label:focus-within { border-color:var(--accent); }
.movie-collections-search label svg { width:18px; height:18px; flex:none; }
.movie-collections-search input { min-width:0; width:100%; border:0; outline:0; color:var(--text); background:transparent; font:inherit; }
.movie-collections-search input::placeholder { color:var(--muted); }
.search-collections-grid { margin-bottom:28px; }

/* Shelf navigation follows the selected Media theme. */
html[data-app-theme] .shelf-scroll-button {
  color:var(--accent);
  border-color:color-mix(in srgb,var(--accent) 48%,var(--line));
  background:color-mix(in srgb,var(--app-popover) 92%,transparent);
  box-shadow:0 5px 18px var(--app-shadow);
}
html[data-app-theme] .shelf-scroll-button:where(:hover,:focus-visible) {
  color:var(--app-header);
  border-color:var(--accent);
  background:var(--accent);
}
html[data-app-theme] .shelf-scroll-button:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:3px;
}
html[data-app-theme] .shelf-nav .icon-button {
  color:var(--accent);
  border-color:color-mix(in srgb,var(--accent) 48%,var(--line));
  background:var(--app-popover);
}
html[data-app-theme] .shelf-nav .icon-button:where(:hover,:focus-visible) {
  color:var(--app-header);
  background:var(--accent);
  border-color:var(--accent);
}

.movie-collection-member.is-missing { border-color:var(--line); }

/* Collection editing and the trailer frame use the active Media palette. */
html[data-app-theme] .movie-collection-editor-dialog .dialog-footer,
html[data-app-theme] .trailer-dialog .player-topbar,
html[data-app-theme] .trailer-dialog .youtube-source,
html[data-app-theme] .trailer-dialog .trailer-status {
  color:var(--text); border-color:var(--line); background:var(--surface);
}
html[data-app-theme] .movie-collection-editor-dialog .dialog-footer { padding:0; border:0; }
html[data-app-theme] .trailer-dialog { color:var(--text); border-color:var(--line); background:var(--surface); }
html[data-app-theme] .trailer-dialog .player-topbar small { color:var(--muted-strong); }
html[data-app-theme] .trailer-dialog .youtube-source { color:var(--accent); }
html[data-app-theme] .trailer-dialog .icon-button { border-color:var(--line); color:var(--text); background:var(--bg-soft); }
html[data-app-theme] .trailer-dialog .icon-button:hover { color:var(--accent); border-color:var(--accent); }
.collection-theme-intro h3 { margin:0 0 6px; font-size:19px; }
.collection-theme-intro p,.collection-theme-note { margin:0 0 15px; color:var(--muted-strong); font-size:12px; line-height:1.6; }
.collection-theme-enabled { display:flex; align-items:center; gap:10px; margin:20px 0; font-size:13px; }
.collection-theme-enabled input,.collection-theme-modes input,.collection-theme-member input { flex:none; width:18px; height:18px; accent-color:var(--accent); }
.collection-theme-modes { display:grid; gap:8px; margin:0 0 24px; padding:0; border:0; }
.collection-theme-modes legend { padding:0 0 10px; font-size:12px; font-weight:700; }
.collection-theme-modes label { display:flex; align-items:flex-start; gap:12px; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--bg-soft); }
.collection-theme-modes label:has(input:checked) { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 8%,var(--bg-soft)); }
.collection-theme-modes label:has(input:disabled) { opacity:.55; }
.collection-theme-modes input { margin:0; }
.movie-collection-editor-dialog .collection-theme-modes input[type=radio] { box-sizing:border-box; flex:0 0 18px; width:18px; min-width:18px; height:18px; min-height:18px; padding:0; margin:0; }
.movie-collection-editor-dialog .collection-theme-modes label > span { flex:1; min-width:0; }
.collection-theme-modes label > span { margin:0 !important; font-size:13px !important; }
.collection-theme-modes strong,.collection-theme-modes small,.collection-theme-member strong,.collection-theme-member small { display:block; }
.collection-theme-modes strong,.collection-theme-member strong { color:var(--text); font-size:13px; }
.collection-theme-modes small,.collection-theme-member small { margin-top:5px; color:var(--muted-strong); font-size:12px; line-height:1.5; }
.collection-theme-section-heading { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.collection-theme-section-heading h4,.collection-theme-order h4 { margin:0 0 12px; font-size:13px; }
.collection-theme-section-heading h4 > span { display:block; margin-top:5px; color:var(--muted-strong); font-size:11px; font-weight:400; }
.collection-theme-section-heading > div { display:flex; gap:10px; }
.collection-theme-member { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-top:1px solid var(--line); }
.collection-theme-member > label { display:flex; align-items:center; gap:12px; min-width:0; }
.collection-theme-member label > span { margin:0 !important; }
.collection-theme-member > button { flex:none; font-size:12px; }
.collection-theme-order { margin-top:22px; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--bg-soft); }
.collection-theme-order ol { margin:0; padding:0 0 0 22px; }
.collection-theme-order li { padding:7px 0; font-size:12px; }
.collection-theme-order li > div { display:inline-flex; gap:5px; margin-left:12px; vertical-align:middle; }
.collection-theme-order .icon-button { width:32px; height:32px; }
.collection-theme-order p { margin:12px 0 0; }
.collection-theme-upload { margin-top:22px; border-top:1px solid var(--line); }
.collection-theme-upload summary { padding:18px 0; font-size:13px; font-weight:650; cursor:pointer; }
.collection-theme-upload button { margin:12px 10px 0 0; font-size:12px; }
.collection-theme-save { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:15px; margin-top:24px; padding-top:18px; border-top:1px solid var(--line); }
.collection-theme-save p { flex:1; min-width:180px; margin:0; color:var(--muted-strong); font-size:12px; line-height:1.6; }
@media(max-width:500px) { .collection-theme-section-heading { align-items:flex-start; flex-direction:column; gap:0; } .collection-theme-order li > div { display:flex; margin:8px 0 0; } .collection-theme-save > button { width:100%; } }
