/*
 * DOSYA YOLU : /module/library/assets/lb.css   (YENİ DOSYA)
 * AÇIKLAMA   : Kütüphane stilleri (önek: lb-): sekmeler, raflar, video satırları, liste sayfası (solda sabit kapak,
 *              sağda liste), oynatma listesi kartları, "Kaydet" ve liste penceresi (mobilde alttan sheet).
 *              Sadece core.css / yt.css değişkenlerine (--st-*) bağlıdır.
 */

.lb-page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 8px 12px 28px; }
.lb-muted { padding: 8px 2px; font-size: 14px; color: var(--st-text-3); }
.lb-link { font-size: 13px; font-weight: 650; color: var(--st-accent); }
.lb-link:hover { text-decoration: underline; }
.lb-note { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; background: rgba(255, 181, 71, .14); border: 1px solid rgba(255, 181, 71, .4); }
.lb-tag { padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--st-surface-3); color: var(--st-text-2); }
.lb-ph { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, .88); background: linear-gradient(135deg, hsl(var(--lb-h, 260), 62%, 42%), hsl(calc(var(--lb-h, 260) + 55), 68%, 28%)); }
.lb-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px; font-size: 11.5px; font-weight: 650; line-height: 1.5; color: #fff; background: rgba(0, 0, 0, .8); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .lb-page { padding: 12px 28px 44px; } }

/* ---------- Sekmeler ---------- */
.lb-tabs {
  position: sticky; z-index: 40; top: calc(var(--st-topbar-h) + var(--st-safe-t));
  display: flex; gap: 4px; margin: 0 -12px 16px; padding: 0 12px; overflow-x: auto; scrollbar-width: none;
  background: var(--st-glass); border-bottom: 1px solid var(--st-border);
  -webkit-backdrop-filter: saturate(1.5) blur(18px); backdrop-filter: saturate(1.5) blur(18px);
}
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tab { position: relative; flex: none; display: inline-flex; align-items: center; height: 46px; padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--st-text-2); white-space: nowrap; transition: color .15s; }
.lb-tab:hover, .lb-tab.is-active { color: var(--st-text); }
.lb-tab.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--st-text); }
@media (min-width: 768px) { .lb-tabs { margin: 0 -28px 20px; padding: 0 28px; } }

.lb-bar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.lb-bar__act, .lb-shelf__act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.lb-title { font-size: 22px; font-weight: 740; letter-spacing: -.02em; }
@media (min-width: 640px) { .lb-bar { flex-direction: row; align-items: center; justify-content: space-between; } .lb-title { font-size: 26px; } }

/* ---------- Raflar (genel bakış) ---------- */
.lb-shelf { margin-bottom: 28px; }
.lb-shelf__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lb-shelf__title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 720; letter-spacing: -.01em; }
.lb-shelf__row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.lb-shelf__row::-webkit-scrollbar { display: none; }
.lb-card { flex: none; display: flex; flex-direction: column; gap: 6px; width: 220px; scroll-snap-align: start; }
.lb-card__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--st-surface-2); }
.lb-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--st-ease); }
.lb-card__title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.lb-card__title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lb-card__by, .lb-card__meta { font-size: 12.5px; color: var(--st-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-card__meta { color: var(--st-text-3); }
@media (hover: hover) { .lb-card:hover .lb-card__thumb img { transform: scale(1.05); } .lb-card:hover .lb-card__title a { color: var(--st-accent); } }
@media (min-width: 768px) { .lb-card { width: 250px; } }

/* ---------- Liste kartları ---------- */
.lb-plgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
@media (min-width: 640px) { .lb-plgrid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 16px; } }
.lb-plc { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lb-plc__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--st-surface-2); }
.lb-plc__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--st-ease); }
.lb-plc__n { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 18px 10px 8px; font-size: 12px; font-weight: 650; color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent); }
.lb-plc__t { font-size: 14.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-plc__m { font-size: 12.5px; color: var(--st-text-3); }
@media (hover: hover) { .lb-plc:hover .lb-plc__thumb img { transform: scale(1.05); } .lb-plc:hover .lb-plc__t { color: var(--st-accent); } }

/* ---------- Video satırları ---------- */
.lb-day { margin: 18px 0 8px; font-size: 16px; font-weight: 700; }
.lb-day:first-child { margin-top: 4px; }
.lb-list { display: flex; flex-direction: column; }
.lb-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; transition: opacity .2s, transform .2s; }
.lb-row.is-out { opacity: 0; transform: translateX(-10px); }
.lb-row__n { flex: none; width: 24px; padding-top: 22px; text-align: center; font-size: 13px; font-weight: 600; color: var(--st-text-3); font-variant-numeric: tabular-nums; }
.lb-row__thumb { position: relative; flex: none; display: block; width: 150px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--st-surface-2); }
.lb-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-row__body { flex: 1; min-width: 0; padding-top: 2px; }
.lb-row__title { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.lb-row__title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lb-row__title a:hover { color: var(--st-accent); }
.lb-row__by { margin-top: 3px; font-size: 12.5px; color: var(--st-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 1px; font-size: 12px; color: var(--st-text-3); }
.lb-row__meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }
.lb-row__act { flex: none; display: flex; align-items: center; gap: 2px; }
.lb-ibtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--st-text-2); transition: background .15s, color .15s; }
.lb-ibtn:hover { background: var(--st-surface-3); color: var(--st-text); }
.lb-row__act [data-lb-rm]:hover { color: var(--st-danger); }
@media (max-width: 599px) {
  .lb-row { flex-wrap: wrap; }
  .lb-row__thumb { width: 132px; }
  .lb-row__body { flex-basis: calc(100% - 156px); }
  .lb-row__act { flex-basis: 100%; justify-content: flex-end; margin-top: -6px; }
}
@media (min-width: 768px) { .lb-row { padding: 10px 0; gap: 16px; } .lb-row__thumb { width: 200px; } .lb-row__title { font-size: 16px; } }

.lb-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 22px 0 4px; }
.lb-pager__n { font-size: 13px; color: var(--st-text-2); }

/* ---------- Liste sayfası ---------- */
.lb-pl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.lb-pl__side { padding: 16px; border-radius: 18px; background: var(--st-surface-2); }
.lb-pl__cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--st-surface-3); }
.lb-pl__cover img { width: 100%; height: 100%; object-fit: cover; }
.lb-pl__title { margin-top: 14px; font-size: 22px; font-weight: 740; line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
.lb-pl__meta { margin-top: 6px; font-size: 13px; color: var(--st-text-2); }
.lb-pl__meta b { color: var(--st-text); }
.lb-pl__desc { margin-top: 10px; font-size: 13.5px; line-height: 1.5; color: var(--st-text-2); overflow-wrap: anywhere; }
.lb-pl__act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lb-pl__list { min-width: 0; }
@media (min-width: 900px) {
  .lb-pl { grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; }
  .lb-pl__side { position: sticky; top: calc(var(--st-topbar-h) + var(--st-safe-t) + 70px); }
}

/* ---------- Kaydet düğmesi ---------- */
.lb-savebtn.is-on { color: var(--st-accent); background: var(--st-accent-soft); }
.lb-savebtn.is-on .st-icon { fill: currentColor; fill-opacity: .25; }

/* ---------- Pencere (mobilde alttan, masaüstünde ortada) ---------- */
.lb-dialog { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; font-family: var(--st-font, system-ui, sans-serif); }
.lb-dialog__bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s; }
.lb-dialog.is-open .lb-dialog__bg { opacity: 1; }
.lb-dialog__box {
  position: relative; display: flex; flex-direction: column; width: 100%; max-height: 88vh; max-height: 88dvh;
  border-radius: 20px 20px 0 0; background: var(--st-surface-2); color: var(--st-text); box-shadow: var(--st-shadow-lg);
  transform: translateY(100%); transition: transform .35s var(--st-ease); padding-bottom: var(--st-safe-b, 0px);
}
.lb-dialog.is-open .lb-dialog__box { transform: none; }
.lb-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 8px 20px; }
.lb-dialog h2 { font-size: 18px; font-weight: 700; }
.lb-dialog__close { width: 38px; height: 38px; border-radius: 50%; font-size: 26px; line-height: 1; color: inherit; }
.lb-dialog__close:hover { background: var(--st-surface-3); }
.lb-dialog__body { padding: 4px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 640px) {
  .lb-dialog { align-items: center; padding: 20px; }
  .lb-dialog__box { max-width: 420px; border-radius: 18px; opacity: 0; transform: translateY(14px) scale(.97); transition: transform .3s var(--st-spring), opacity .2s; padding-bottom: 0; }
  .lb-dialog.is-open .lb-dialog__box { opacity: 1; transform: none; }
}

.lb-pick { display: flex; flex-direction: column; max-height: 42vh; overflow-y: auto; margin: 0 -8px; }
.lb-prow { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 8px; border-radius: 10px; cursor: pointer; }
.lb-prow:hover { background: var(--st-surface-3); }
.lb-prow input { position: absolute; opacity: 0; width: 0; height: 0; }
.lb-prow__box { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--st-text-3); transition: background .15s, border-color .15s; }
.lb-prow input:checked + .lb-prow__box { background: var(--st-accent); border-color: var(--st-accent); }
.lb-prow input:checked + .lb-prow__box::after { content: ""; width: 5px; height: 10px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lb-prow input:focus-visible + .lb-prow__box { box-shadow: var(--st-ring); }
.lb-prow input:disabled + .lb-prow__box { opacity: .5; }
.lb-prow__t { flex: 1; min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-prow__v { flex: none; font-size: 12px; color: var(--st-text-3); }
.lb-newwrap { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--st-border); }
.lb-newbtn { display: flex; align-items: center; width: 100%; height: 46px; padding: 0 8px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--st-accent); }
.lb-newbtn:hover { background: var(--st-accent-soft); }

.lb-form { display: flex; flex-direction: column; gap: 8px; }
.lb-lbl { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--st-text-2); }
.lb-inp {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--st-border-strong); background: var(--st-bg);
  color: var(--st-text); font: 16px/1.4 inherit; outline: 0; -webkit-appearance: none; appearance: none; resize: vertical;
}
.lb-inp:focus { border-color: var(--st-accent); box-shadow: var(--st-ring); }
select.lb-inp { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8ba3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.lb-err { min-height: 0; font-size: 12.5px; font-weight: 500; color: var(--st-danger); }
.lb-err:empty { display: none; }
.lb-form__act { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.lb-btn { height: 40px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 650; }
.lb-btn--ghost { color: var(--st-text-2); }
.lb-btn--ghost:hover { background: var(--st-surface-3); color: var(--st-text); }
.lb-btn--primary { color: #fff; background: var(--st-grad); }
.lb-btn:disabled { opacity: .55; pointer-events: none; }