/* Collaborative watchlists — listar + listi pages, plus modal/sheet. */

.sl-page { background: #f5f6f8; padding: 2rem 0 3rem; min-height: 60vh; }
.sl-container { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }

/* ---------- Hero (listar page) ---------- */
.sl-hero {
    background: linear-gradient(135deg, #383d40 0%, #2c3e50 100%);
    color: #fff; border-radius: 16px; padding: 2.2rem 2rem; margin-bottom: 1.8rem;
}
.sl-hero__title { font-size: 1.9rem; font-weight: 800; margin: 0 0 0.35rem; color: #fff; }
.sl-hero__subtitle { margin: 0 0 1.2rem; color: rgba(255,255,255,0.78); max-width: 56ch; line-height: 1.5; }

/* ---------- Buttons ---------- */
.sl-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1.1rem;
    border-radius: 8px; font-weight: 600; font-size: 0.95rem; border: 0; cursor: pointer;
    text-decoration: none; transition: background 0.15s ease, transform 0.1s ease; }
.sl-btn--primary { background: #0d9488; color: #fff; }
.sl-btn--primary:hover { background: #0b7d72; color: #fff; }
.sl-btn--ghost   { background: rgba(255,255,255,0.95); color: #2c3e50; border: 1px solid #e3e6ea; }
.sl-btn--ghost:hover { background: #fff; }
.sl-btn--danger  { color: #b91c1c; border-color: #fecaca; }
.sl-btn--danger:hover { background: #fee2e2; }
.sl-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Grid of list cards (listar page) ---------- */
.sl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.sl-card { display: block; background: #fff; border-radius: 12px; padding: 1.1rem 1.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-decoration: none; color: inherit;
    transition: box-shadow 0.2s ease, transform 0.15s ease; }
.sl-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.1); transform: translateY(-2px); color: inherit; }
.sl-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.sl-card__title { font-size: 1.1rem; font-weight: 700; color: #222; margin: 0; line-height: 1.3; }
.sl-card__badge { font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 4px; white-space: nowrap; }
.sl-card__badge--owner { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.sl-card__desc { color: #666; font-size: 0.88rem; line-height: 1.45; margin: 0.5rem 0 0.6rem; }
.sl-card__meta { display: flex; gap: 0.4rem; align-items: center; color: #888; font-size: 0.82rem; flex-wrap: wrap; }
.sl-card__meta strong { color: #2c3e50; font-weight: 600; }

/* ---------- Empty state ---------- */
.sl-empty { background: #fff; border-radius: 12px; padding: 2rem; text-align: center; color: #555;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.sl-empty h1 { margin: 0 0 0.6rem; }
.sl-empty__note { color: #888; font-size: 0.88rem; }

/* ---------- Single list head (listi page) ---------- */
.sl-list-head { background: linear-gradient(135deg, #383d40 0%, #2c3e50 100%); color: #fff;
    border-radius: 16px; padding: 1.8rem 2rem; margin-bottom: 1.6rem;
    display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
.sl-list-head__main { flex: 1; min-width: 260px; }
.sl-list-head__eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: rgba(255,255,255,0.65); margin: 0 0 0.25rem; }
.sl-list-head__title { font-size: 1.9rem; font-weight: 800; margin: 0 0 0.4rem; color: #fff; }
.sl-list-head__desc { margin: 0 0 0.9rem; color: rgba(255,255,255,0.82); line-height: 1.5; max-width: 60ch; }
.sl-list-head__members { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.6rem; }
.sl-avatar { width: 32px; height: 32px; border-radius: 50%; background: #ea580c; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
    border: 2px solid #2c3e50; margin-left: -8px; }
.sl-avatar:first-child { margin-left: 0; }
.sl-list-head__member-count { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-left: 0.6rem; }
.sl-list-head__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-start; }

/* ---------- Banner ---------- */
.sl-banner { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px;
    padding: 0.8rem 1.1rem; margin-bottom: 1.2rem; color: #7c2d12; font-size: 0.92rem; }
.sl-banner a { color: #ea580c; font-weight: 600; }

/* ---------- Items list (listi page) ---------- */
.sl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.sl-item { display: flex; gap: 1rem; background: #fff; border-radius: 12px; padding: 0.9rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: opacity 0.2s ease; }
.sl-item--watched { opacity: 0.55; }
.sl-item--watched .sl-item__title a { text-decoration: line-through; }
.sl-item__poster { flex: 0 0 70px; display: block; }
.sl-item__poster img, .sl-item__ph { width: 70px; height: 105px; object-fit: cover;
    border-radius: 6px; background: #e8e8e8; display: block; }
.sl-item__ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 1.6rem; }
.sl-item__body { flex: 1; display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.sl-item__title { font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.3; }
.sl-item__title a { color: #222; text-decoration: none; }
.sl-item__title a:hover { color: #0d9488; }
.sl-item__meta { color: #888; font-size: 0.82rem; margin: 0; }
.sl-consensus { font-size: 0.82rem; margin: 0; font-weight: 600; }
.sl-consensus--all  { color: #0d9488; }
.sl-consensus--some { color: #ea580c; }
.sl-consensus--none { color: #9ca3af; font-weight: 500; }

/* Pill next to the movie title (e.g. "🎬 Í bíó") */
.sl-pill { display: inline-block; vertical-align: middle; margin-left: 0.5rem;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
    padding: 0.15rem 0.55rem; border-radius: 999px; }
.sl-pill--cinema { background: #ccfbf1; color: #0f766e; }

/* Inline "+ Langar að sjá" button for members who haven't marked the movie yet */
.sl-want-btn { background: transparent; border: 1px solid #ea580c; color: #ea580c;
    border-radius: 999px; padding: 0.25rem 0.7rem; font-size: 0.8rem; font-weight: 600;
    cursor: pointer; margin-top: 0.2rem; align-self: flex-start; transition: all 0.15s ease; }
.sl-want-btn:hover:not([disabled]) { background: #ea580c; color: #fff; }
.sl-want-btn[disabled] { opacity: 0.55; cursor: wait; }

/* ---------- Filter chips above items grid ---------- */
.sl-filters { display: flex; gap: 0.5rem; margin: 0 0 1rem; flex-wrap: wrap; }
.sl-chip { background: #f3f4f6; border: 1px solid transparent; border-radius: 999px;
    padding: 0.4rem 0.9rem; font-size: 0.88rem; font-weight: 600; color: #4b5563;
    cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; transition: all 0.15s ease; }
.sl-chip:hover:not([disabled]) { background: #e5e7eb; }
.sl-chip--active { background: #0d9488; color: #fff; }
.sl-chip--active:hover:not([disabled]) { background: #0f766e; }
.sl-chip[disabled] { opacity: 0.45; cursor: not-allowed; }
.sl-chip__count { background: rgba(0,0,0,0.08); border-radius: 999px; padding: 0.05rem 0.5rem;
    font-size: 0.78rem; font-weight: 700; }
.sl-chip--active .sl-chip__count { background: rgba(255,255,255,0.25); }

/* When the "consensus" filter is on, hide items that don't qualify. */
.sl-items[data-filter="consensus"] .sl-item[data-consensus="0"] { display: none; }
.sl-item__actions { display: flex; gap: 1rem; align-items: center; margin-top: auto; padding-top: 0.4rem; }
.sl-check { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; color: #555; cursor: pointer; }
.sl-item__remove { background: transparent; border: 0; color: #aaa; cursor: pointer;
    font-size: 1rem; padding: 0.2rem 0.5rem; border-radius: 4px; margin-left: auto; }
.sl-item__remove:hover { background: #fee2e2; color: #b91c1c; }

/* ---------- Modal (create-list, save-to-lists sheet) ---------- */
.sl-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.sl-modal[hidden] { display: none !important; }
.sl-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.sl-modal__panel { position: relative; background: #fff; border-radius: 12px; padding: 1.8rem;
    width: min(440px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.sl-modal__panel h2 { margin: 0 0 1rem; font-size: 1.3rem; }
.sl-modal__close { position: absolute; top: 0.5rem; right: 0.8rem; background: transparent; border: 0;
    font-size: 1.6rem; line-height: 1; cursor: pointer; color: #888; padding: 0.3rem; }
.sl-modal__close:hover { color: #222; }
.sl-modal__error { background: #fee2e2; color: #991b1b; padding: 0.6rem 0.9rem; border-radius: 6px;
    margin: 0.8rem 0 0; font-size: 0.9rem; }
.sl-modal__actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.2rem; }

.sl-field { display: block; margin-bottom: 0.9rem; }
.sl-field__label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.35rem; color: #333; }
.sl-field__optional { color: #888; font-weight: 400; }
.sl-field input[type=text], .sl-field textarea { width: 100%; padding: 0.55rem 0.7rem;
    border: 1px solid #d6d9de; border-radius: 6px; font-size: 0.95rem; box-sizing: border-box; font-family: inherit; }
.sl-field input[type=text]:focus, .sl-field textarea:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,0.15); }
.sl-field--radio { border: 0; margin: 0 0 0.9rem; padding: 0; }
.sl-field--radio label { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0;
    font-size: 0.92rem; color: #444; cursor: pointer; }

/* ---------- Movie-page save sheet ---------- */
.sl-sheet-lists { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.4rem 0 0.6rem;
    max-height: 320px; overflow-y: auto; }
.sl-sheet-list { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.7rem;
    border: 1px solid #e3e6ea; border-radius: 8px; cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease; }
.sl-sheet-list:hover { background: #f8f9fb; border-color: #d0d4da; }
.sl-sheet-list input[type=checkbox] { margin: 0; width: 16px; height: 16px; accent-color: #0d9488; flex: 0 0 auto; }
.sl-sheet-list__name { flex: 1; font-size: 0.95rem; color: #222; }
.sl-sheet-list__count { color: #888; font-size: 0.78rem; }

/* Compact "+" icon button on movie hero (next to wannasee) */
.mp-hero__btn--icon { padding-left: 0.65rem; padding-right: 0.65rem; min-width: 0; }
.mp-hero__btn--icon svg { width: 18px; height: 18px; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .sl-hero, .sl-list-head { padding: 1.4rem 1.2rem; border-radius: 12px; }
    .sl-hero__title, .sl-list-head__title { font-size: 1.5rem; }
    .sl-grid { grid-template-columns: 1fr; }
    .sl-item__poster, .sl-item__poster img, .sl-item__ph { flex-basis: 56px; width: 56px; height: 84px; }
    .sl-list-head__actions { width: 100%; }
}
