/* 📑 Playlists: janela "Salvar em playlist", faixa "Minhas playlists" e a playlist aberta */
.pl-overlay { position: fixed; inset: 0; z-index: 10005; background: rgba(18, 18, 28, .78); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pl-box { width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
    background: #282a36; border: 2px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 18px; color: #f8f8f2; }
.pl-head { display: flex; align-items: center; justify-content: space-between; }
.pl-head h3 { margin: 0; font-size: 1.15rem; }
.pl-x { background: none; border: none; color: #a4a7c4; font-size: 1.1rem; cursor: pointer; padding: 4px 8px; }
.pl-checks { display: grid; gap: 6px; }
.pl-check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #1e1f2b; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .06); }
.pl-check:hover { border-color: rgba(139, 233, 253, .4); }
.pl-check input { width: 18px; height: 18px; accent-color: #50fa7b; flex: none; }
.pl-check span { flex: 1; }
.pl-check small { color: #6272a4; font-variant-numeric: tabular-nums; }
.pl-busy { opacity: .55; pointer-events: none; }
.pl-new { display: flex; gap: 8px; }
.pl-new input { flex: 1; min-width: 0; background: #1e1f2b; color: #f8f8f2; border: 1px solid rgba(255, 255, 255, .15); border-radius: 10px; padding: 9px 12px; font: inherit; }
.pl-btn { background: #50fa7b; color: #282a36; border: none; border-radius: 10px; padding: 8px 14px; font-weight: bold; cursor: pointer; white-space: nowrap; font: inherit; font-weight: 700; }
.pl-btn.ghost { background: rgba(255, 255, 255, .06); color: #f8f8f2; border: 1px solid rgba(255, 255, 255, .15); }
.pl-btn.danger { background: rgba(255, 85, 85, .12); color: #ff5555; border: 1px solid #ff5555; }
.pl-btn:disabled { opacity: .6; cursor: default; }
.pl-error { margin: 0; color: #ff5555; font-size: .88rem; min-height: 1em; }
.pl-muted { color: #8a8fa8; font-size: .9rem; margin: 0; }
.pl-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    vertical-align: -2px; animation: pl-spin .7s linear infinite; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
#pl-toast { position: fixed; left: 0; right: 0; bottom: 90px; width: max-content; max-width: calc(100% - 32px); margin: 0 auto; z-index: 10006;
    background: #1e1f2b; color: #f8f8f2; border: 2px solid #50fa7b; border-radius: 14px; padding: 10px 16px; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
#pl-toast.error { border-color: #ff5555; }
#pl-toast[hidden] { display: none; }

.pl-bar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 2px; margin: 0 0 6px; align-items: center; }
.pl-bar[hidden] { display: none; }
.pl-bar-label { flex: none; color: #c9cbd6; font-weight: 700; font-size: .9rem; margin-right: 4px; }
.pl-chip { flex: none; display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .85rem;
    border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .04); color: #ccc; }
.pl-chip:hover { border-color: rgba(255, 255, 255, .35); color: #fff; }
.pl-chip.active { background: rgba(80, 250, 123, .14); border-color: #50fa7b; color: #50fa7b; }
.pl-chip .n { opacity: .6; font-size: .75rem; }
.pl-chip-new { border-style: dashed; }
.pl-view[hidden] { display: none; }
.pl-view-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.pl-view-title { flex: 1; min-width: 200px; }
.pl-view-title h2 { margin: 0; font-size: 1.3rem; color: #f8f8f2; }
.pl-view-tools { display: flex; gap: 8px; }
.pl-lessons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pl-lessons li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.pl-pos { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(80, 250, 123, .15); color: #50fa7b;
    font-size: .8rem; font-weight: 700; }
.pl-lesson { flex: 1; min-width: 0; }
.pl-lesson a { color: #f8f8f2; font-weight: 700; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-lesson a:hover { text-decoration: underline; }
.pl-lesson small { color: #6272a4; }
.pl-order { display: flex; gap: 4px; flex: none; }
.pl-order button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .05); color: #f8f8f2; cursor: pointer; }
.pl-order button:hover:not(:disabled) { border-color: #8be9fd; }
.pl-order button:disabled { opacity: .3; cursor: default; }
.pl-order [data-remove]:hover { border-color: #ff5555; color: #ff5555; }
.pl-empty { text-align: center; color: #6272a4; padding: 30px 0; }
.btn-save-pl { background: rgba(80, 250, 123, .1); border: 1px solid #50fa7b; color: #50fa7b; padding: 5px 8px; border-radius: 6px; font-size: .75rem; cursor: pointer; }
.lesson-page .view-actions:has(.btn-save) { grid-template-columns: repeat(6, 1fr); }
@media (prefers-reduced-motion: reduce) { .pl-spin { animation: none; } }
[data-pl-hide][hidden] { display: none !important; }   /* a paginação tem display no style */
.btn-action.btn-save { background: rgba(80, 250, 123, .14); color: #50fa7b; border: 1px solid #50fa7b; }
