/*
 * DOSYA YOLU : /module/player/assets/pl.css   (YENİ DOSYA)
 * AÇIKLAMA   : SezTube oynatıcı stilleri (önek: pl-): kontroller, ilerleme çubuğu, menü, çift dokunuş efekti,
 *              hata ekranı, sinema modu, gömme sayfası ve paylaş penceresi. core.css yüklü olmasa da çalışır
 *              (embed.php), --st-* değişkenleri varsa onları kullanır. Mobilde dokunmatik kontroller büyür.
 */

.pl {
  --pl-accent: var(--st-accent, #9b86ff);
  position: absolute; inset: 0; overflow: hidden; background: #000; color: #fff; outline: 0;
  font-family: var(--st-font, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif); font-size: 13px;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.pl *, .pl *::before, .pl *::after { box-sizing: border-box; }
.pl button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: inherit; }
.pl svg { display: inline-block; flex: none; vertical-align: middle; }
.pl [hidden] { display: none !important; }
.pl__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.pl:focus-visible { box-shadow: inset 0 0 0 2px var(--pl-accent); }

/* ---------- Simge geçişleri ---------- */
.pl .ic-pause, .pl .ic-replay, .pl .ic-vl, .pl .ic-vm, .pl .ic-fx { display: none; }
.pl.is-playing .ic-play { display: none; }
.pl.is-playing .ic-pause { display: inline-block; }
.pl.is-ended .ic-play, .pl.is-ended .ic-pause { display: none; }
.pl.is-ended .ic-replay { display: inline-block; }
.pl[data-vol="low"] .ic-vh { display: none; }
.pl[data-vol="low"] .ic-vl { display: inline-block; }
.pl[data-vol="mute"] .ic-vh { display: none; }
.pl[data-vol="mute"] .ic-vm { display: inline-block; }
.pl.is-full .ic-fs { display: none; }
.pl.is-full .ic-fx { display: inline-block; }

/* ---------- Orta düğme, yükleniyor, bildirim ---------- */
.pl__big {
  position: absolute; z-index: 4; left: 50%; top: 50%; display: none; place-items: center; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  border-radius: 50%; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .15s, background .15s;
}
.pl__big:hover { background: var(--pl-accent); transform: scale(1.06); }
.pl:not(.is-started) .pl__big, .pl.is-ended .pl__big { display: grid; }
.pl__big .ic-play { margin-left: 3px; }
.pl.is-buffering .pl__big { display: none; }

.pl__spin {
  position: absolute; z-index: 4; left: 50%; top: 50%; display: none; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; border: 3.5px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: pl-spin .8s linear infinite; pointer-events: none;
}
.pl.is-buffering .pl__spin { display: block; }
.pl.is-error .pl__spin, .pl.is-error .pl__big { display: none; }

.pl__toast {
  position: absolute; z-index: 5; left: 50%; top: 16%; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 650; background: rgba(0, 0, 0, .72); pointer-events: none; white-space: nowrap;
}
.pl__toast.is-in { animation: pl-toast .9s ease-out both; }

.pl__flash { position: absolute; z-index: 3; top: 0; bottom: 0; width: 34%; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; }
.pl__flash--l { left: 0; }
.pl__flash--r { right: 0; }
.pl__flash span { padding: 12px 18px; border-radius: 999px; font-weight: 700; background: rgba(0, 0, 0, .55); }
.pl__flash.is-in { animation: pl-flash .6s ease-out; }

.pl__adtag { position: absolute; z-index: 5; left: 12px; top: 12px; display: none; padding: 3px 10px; border-radius: 6px; font-weight: 700; background: #f5b400; color: #000; }
.pl.is-ad .pl__adtag { display: block; }
.pl.is-ad .pl__seek { pointer-events: none; opacity: .45; }

/* ---------- Hata ---------- */
.pl__err { position: absolute; inset: 0; z-index: 9; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; background: #111; color: #cfcfcf; }
.pl.is-error .pl__err { display: flex; }
.pl__err svg { color: #ffb547; }
.pl__err p { margin: 0; max-width: 320px; font-size: 14px; line-height: 1.45; }
.pl__btn2 { padding: 0 20px; height: 38px; border-radius: 999px; font-weight: 650; background: #fff; color: #000 !important; text-align: center !important; }

/* ---------- Üst şerit (gömme) ---------- */
.pl__top {
  position: absolute; z-index: 6; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 28px; background: linear-gradient(to bottom, rgba(0, 0, 0, .72), transparent); transition: opacity .25s;
}
.pl__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 650; color: #fff; text-decoration: none; }
.pl__brand { flex: none; font-size: 12.5px; font-weight: 700; color: #fff; text-decoration: none; opacity: .9; }
.pl__brand:hover, .pl__title:hover { text-decoration: underline; }

/* ---------- Alt çubuk ---------- */
.pl__bar {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0;
  padding: 38px calc(10px + env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) calc(10px + env(safe-area-inset-left, 0px));
  background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .34) 55%, transparent); transition: opacity .25s, transform .25s;
}
.pl.is-idle .pl__bar, .pl.is-idle .pl__top { opacity: 0; pointer-events: none; }
.pl.is-idle .pl__bar { transform: translateY(6px); }
.pl.is-idle { cursor: none; }
.pl:not(.is-started) .pl__bar { opacity: 0; pointer-events: none; }
.pl:not(.is-started) .pl__bar:hover, .pl.is-paused.is-started .pl__bar { opacity: 1; pointer-events: auto; }

.pl__seek { position: relative; display: flex; align-items: center; height: 22px; margin: 0 2px; cursor: pointer; touch-action: none; }
.pl__track { position: relative; width: 100%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .28); transition: height .12s; }
.pl__seek:hover .pl__track, .pl.is-scrub .pl__track { height: 5px; }
.pl__buf, .pl__played { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(0); }
.pl__buf { background: rgba(255, 255, 255, .38); }
.pl__played { background: var(--pl-accent); }
.pl__knob { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--pl-accent); transform: scale(0); transition: transform .12s; }
.pl__seek:hover .pl__knob, .pl.is-scrub .pl__knob { transform: scale(1); }
@media (hover: none) { .pl__knob { transform: scale(1); } }
.pl__tip {
  position: absolute; bottom: 24px; left: 0; transform: translateX(-50%); padding: 3px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, .88); pointer-events: none;
}

.pl__row { display: flex; align-items: center; gap: 2px; }
.pl__sp { flex: 1; }
.pl__ic { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; transition: background .15s, transform .12s; }
.pl__ic:hover { background: rgba(255, 255, 255, .16); }
.pl__ic:active { transform: scale(.9); }
.pl__time { margin-left: 6px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .95; }

.pl__vol { display: flex; align-items: center; }
.pl__vol input {
  -webkit-appearance: none; appearance: none; width: 0; height: 4px; margin: 0; border-radius: 4px; outline: 0; opacity: 0; cursor: pointer;
  background: linear-gradient(to right, #fff var(--v, 100%), rgba(255, 255, 255, .3) var(--v, 100%)); transition: width .2s, opacity .2s, margin .2s;
}
.pl__vol:hover input, .pl__vol:focus-within input { width: 72px; margin: 0 8px 0 4px; opacity: 1; }
.pl__vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.pl__vol input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }

/* ---------- Ayar menüsü ---------- */
.pl__menuwrap { position: relative; }
.pl__menu {
  position: absolute; right: 0; bottom: 50px; z-index: 8; width: 250px; max-height: 60vh; overflow-y: auto; padding: 6px; border-radius: 12px;
  background: rgba(28, 28, 28, .97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}
.pl__item { display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 10px; border-radius: 8px; font-size: 14px; }
.pl__item:hover { background: rgba(255, 255, 255, .1); }
.pl__item-t { flex: 1; min-width: 0; }
.pl__item-v { color: #bdbdbd; }
.pl__item--head { border-bottom: 1px solid rgba(255, 255, 255, .12); border-radius: 8px 8px 0 0; margin-bottom: 4px; font-weight: 650; }
.pl__chk { display: inline-grid; place-items: center; width: 20px; opacity: 0; }
.pl__item.is-on .pl__chk { opacity: 1; }
.pl__sw { position: relative; width: 34px; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, .3); transition: background .2s; }
.pl__sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
[data-pl-act="loop"].is-on .pl__sw { background: var(--pl-accent); }
[data-pl-act="loop"].is-on .pl__sw::after { transform: translateX(16px); }

/* ---------- Mobil / dokunmatik ---------- */
@media (hover: none) { .pl__vol input { display: none; } }
@media (max-width: 599px) {
  .pl__ic { width: 44px; height: 44px; }
  .pl__ic--theater { display: none; }
  .pl__time { margin-left: 2px; font-size: 12.5px; }
  .pl__menu { right: -4px; width: min(250px, calc(100vw - 24px)); }
  .pl__big { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
}
@media (max-width: 999px) { .pl__ic--theater { display: none; } }

/* ---------- Sinema modu (izleme sayfası) ---------- */
@media (min-width: 1000px) {
  .vw-page.is-theater { display: block; padding: 0 0 36px; }
  .vw-page.is-theater .vw-player { border-radius: 0; box-shadow: none; max-height: calc(100vh - var(--st-topbar-h, 56px) - var(--st-safe-t, 0px) - 96px); background: #000; }
  .vw-page.is-theater .vw-info, .vw-page.is-theater .vw-comments, .vw-page.is-theater .vw-side { max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 28px; padding-right: 28px; }
  .vw-page.is-theater .vw-side { padding-top: 24px; }
}

/* ---------- Gömme sayfası ---------- */
.pl-embedpage { margin: 0; background: #000; overflow: hidden; }
.pl-embedwrap { position: fixed; inset: 0; }

/* ---------- Paylaş / gömme penceresi ---------- */
.pl-dialog { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; font-family: var(--st-font, system-ui, sans-serif); }
.pl-dialog__bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); }
.pl-dialog__box { position: relative; width: 100%; max-width: 560px; border-radius: 16px; background: var(--st-surface-2, #272727); color: var(--st-text, #f1f1f1); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); animation: pl-pop .22s ease-out both; }
.pl-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 20px; }
.pl-dialog h2 { margin: 0; font-size: 18px; font-weight: 700; }
.pl-dialog__close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.pl-dialog__close:hover { background: var(--st-surface-3, #3a3a3a); }
.pl-dialog__body { display: flex; flex-direction: column; gap: 8px; padding: 4px 20px 20px; }
.pl-dialog__lbl { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--st-text-2, #b3b3b3); }
.pl-dialog__row { display: flex; gap: 8px; }
.pl-dialog input[readonly], .pl-dialog textarea, .pl-dialog select {
  width: 100%; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--st-border-strong, rgba(255, 255, 255, .2));
  background: var(--st-bg, #0f0f0f); color: inherit; font: 14px/1.4 inherit; outline: 0;
}
.pl-dialog textarea { resize: none; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.pl-dialog select { width: auto; }
.pl-dialog button[data-copy] { flex: none; padding: 0 16px; height: 40px; border: 0; border-radius: 999px; font-weight: 650; cursor: pointer; background: var(--st-text, #f1f1f1); color: var(--st-bg, #0f0f0f); }
.pl-dialog__opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.pl-dialog__opts .pl-dialog__primary { margin-left: auto; }
.pl-dialog__chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }

@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-toast { 0% { opacity: 0; transform: translate(-50%, 6px); } 12% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pl-flash { 0% { opacity: 0; transform: scale(.9); } 20% { opacity: 1; } 100% { opacity: 0; transform: scale(1.06); } }
@keyframes pl-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- MODÜL 11: altyazı ve kalite ---------- */
.pl.is-cc [data-pl-act="cc"] { border-radius: 0; box-shadow: inset 0 -3px 0 var(--pl-accent); }
.pl__video::cue { background: rgba(8, 8, 8, .78); color: #fff; font: 500 19px/1.4 var(--st-font, system-ui, sans-serif); }
@media (max-width: 599px) { .pl__video::cue { font-size: 15px; } }