/* ==========================================================================
   player.css — یکدست‌سازی مینی‌پلیر، پلیر بزرگ (index.php) ؛ بعد از style.css و fix.css لود می‌شود
   ========================================================================== */
#pl, #pex { --pbtn: 40px; --pcv: 52px; }

/* ---- دکمه‌ها: همه هم‌اندازه، بدون تداخل specificity ---- */
#pl .chip.pb, #pex .chip.pb { width: var(--pbtn); min-width: var(--pbtn); height: var(--pbtn); padding: 0; }
#pl .chip.pb.pp { width: 46px; height: 46px; }
#pex .pc.xl .chip.pb.pp { width: 60px; height: 60px; }
#pl .chip.pb.xb { display: none; }
#pl a.chip.ppro, #pex a.chip.ppro { display: inline-grid; place-items: center; }

/* ---- متن: جهت خودکار، سه‌نقطه همیشه آخر متن، تراز یکسان ---- */
.pt, .pxi { text-align: start; }
.pxi { text-align: center; }
.pxi h3 { overflow-wrap: anywhere; }
.pt b, .pt small, .tk .tn { text-align: start; }
.tk .tn { unicode-bidi: plaintext; }
.skr span { direction: rtl; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* ---- مینی‌پلیر ---- */
#pl { width: min(640px, calc(100vw - 1rem)); max-width: calc(100vw - 1rem); bottom: max(0.6rem, env(safe-area-inset-bottom)); left: 50%; right: auto; transform: translateX(-50%); }
#pl .pcv { width: var(--pcv); height: var(--pcv); border-radius: 12px; }

/* ---- پلیر بزرگ ---- */
#pex { overscroll-behavior: contain; }
.pxp { height: min(100dvh, 920px); padding-bottom: env(safe-area-inset-bottom); }
.pxh { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 0.4rem; padding: 0.5rem 0.8rem 0.2rem; }
.pxh .pxm { align-self: center; }
.pxs { overscroll-behavior: contain; scrollbar-width: thin; }
.pxc { width: min(60vw, 280px, 34vh); }
#vis { height: 30px; margin: 0 0 0.2rem; }
.pc.xl { margin: 0.5rem 0 0.2rem; }
.px2 { margin: 0.4rem 0 0.9rem; }
.tabs .chip, .pls .chip { white-space: nowrap; flex: none; }
.pls { align-items: center; }
.pls #plq { flex: 1; min-width: 0; height: 40px; padding: 0 0.9rem; font-size: 0.9rem; border-radius: 20px; }
.pgn .chip { height: 34px; padding: 0 0.8rem; }
.tk { min-height: 52px; }
.tk .tn { font-size: 0.92rem; }

/* ---- موبایل ---- */
@media (max-width: 720px) {
  #pl { width: auto; left: 0.5rem; right: 0.5rem; max-width: none; transform: none; border-radius: 20px; }
  #pl .chip.pb.xb { display: inline-grid; }
  #pl .plr > a.chip.ppro { display: none; }
  #pl .pt b { font-size: 0.95rem; }
  .pxp { width: 100%; border-radius: 22px 22px 0 0; }
}
@media (max-width: 380px) {
  #pex { --pbtn: 38px; }
  .pxs { padding-inline: 0.85rem; }
  #pl .pc { gap: 0.6rem; }
}

/* ---- دسکتاپ: پلیر بزرگ به‌شکل پنجره‌ی وسط صفحه ---- */
@media (min-width: 721px) {
  #pex { align-items: center; }
  .pxp { width: min(720px, 92vw); height: min(88vh, 860px); border: 1px solid var(--pa); border-radius: 24px; padding-bottom: 0; transform: translateY(40px) scale(0.97); opacity: 0; transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.3s; }
  #pex.on .pxp { transform: none; opacity: 1; }
  .pxh { cursor: default; }
  .pxh .grab { display: none; }
  .pxc { width: min(280px, 32vh); }
  .pxs { padding: 0 2rem 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { .pxp { transition: none !important; } }
