/* vibewave-playlist-editor.css — Playlist editor redesign (member page) */

/* ─── Wrapper ─────────────────────────────────────────────── */
.xt-ple { margin-top: 20px; }

/* ─── Header card ─────────────────────────────────────────── */
.xt-ple-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    margin-bottom: 14px;
}
.xt-ple-cover-wrap {
    width: 110px;
    height: 110px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg,#2a1a4a,#1a1a2e);
}
.xt-ple-cover-wrap img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.xt-ple-header-body {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 7px;
}
.xt-ple-eyebrow {
    font-size: 10px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: #8b5cf6;
}
.xt-ple-playlist-name {
    font-size: 1.25rem; font-weight: 700;
    color: #f4f4f5; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xt-ple-meta-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.xt-ple-chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; color: #a1a1aa;
    background: rgba(255,255,255,0.05);
    padding: 3px 9px; border-radius: 20px;
}
.xt-ple-chip i { font-size: 9px; color: #8b5cf6; }
.xt-ple-hdr-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 4px; }

/* ─── Shared button ───────────────────────────────────────── */
.xt-ple-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 9px;
    font-size: 12px; font-weight: 500;
    cursor: pointer; border: none;
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap; font-family: inherit;
}
.xt-ple-btn-listen { background: #7c3aed; color: #fff; }
.xt-ple-btn-listen:hover { background: #6d28d9; color: #fff; }
.xt-ple-btn-ghost {
    background: rgba(255,255,255,0.06); color: #d4d4d8;
    border: 1px solid rgba(255,255,255,0.09);
}
.xt-ple-btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ─── Metadata form ───────────────────────────────────────── */
.xt-ple-form-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 14px;
}
.xt-ple-form-label {
    font-size: 10.5px; font-weight: 700;
    letter-spacing: .9px; text-transform: uppercase;
    color: #52525b; margin-bottom: 14px;
}
.xt-ple-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px; margin-bottom: 14px;
}
.xt-ple-form-full { grid-column: 1 / -1; }
.xt-ple-field { display: flex; flex-direction: column; gap: 5px; }
.xt-ple-field > label {
    font-size: 10.5px; font-weight: 600;
    letter-spacing: .7px; text-transform: uppercase; color: #71717a;
}
.xt-ple-field input[type=text],
.xt-ple-field input[type=number],
.xt-ple-field input[type=file],
.xt-ple-field select,
.xt-ple-field textarea {
    width: 100%; box-sizing: border-box;
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 9px; padding: 9px 11px;
    font-size: 13px; color: #e4e4e7;
    font-family: inherit;
    transition: border-color .15s;
}
.xt-ple-field input:focus,
.xt-ple-field select:focus,
.xt-ple-field textarea:focus {
    outline: none; border-color: rgba(139,92,246,.45);
}
.xt-ple-field textarea { min-height: 68px; resize: vertical; }
.xt-ple-form-actions { display: flex; align-items: center; gap: 10px; }
.xt-ple-save-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; background: #7c3aed; color: #fff;
    border: none; border-radius: 9px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .15s; font-family: inherit;
}
.xt-ple-save-btn:hover { background: #6d28d9; }

/* ─── Danger zone ─────────────────────────────────────────── */
.xt-ple-danger-zone {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px;
    background: rgba(239,68,68,.05);
    border: 1px solid rgba(239,68,68,.12);
    border-radius: 13px; margin-bottom: 20px;
}
.xt-ple-danger-hint { flex: 1; font-size: 11px; color: #52525b; }
.xt-ple-del-pl-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 13px; background: transparent;
    border: 1px solid rgba(239,68,68,.35);
    border-radius: 8px; color: #f87171;
    font-size: 12px; font-weight: 500;
    cursor: pointer; transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap; font-family: inherit;
}
.xt-ple-del-pl-btn:hover { background: rgba(239,68,68,.15); color: #ef4444; border-color: #ef4444; }

/* ─── Section card ────────────────────────────────────────── */
.xt-ple-section {
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
.xt-ple-section-hd {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 14px; gap: 10px;
}
.xt-ple-section-title {
    font-size: 13.5px; font-weight: 600; color: #e4e4e7;
    display: flex; align-items: center; gap: 7px;
}
.xt-ple-section-title i { color: #8b5cf6; font-size: 13px; }
.xt-ple-count-badge {
    background: rgba(139,92,246,.18); color: #c084fc;
    font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 600;
}

/* ─── Sync state badge ────────────────────────────────────── */
.xt-ple-sync {
    font-size: 11px; font-weight: 500;
    padding: 3px 9px; border-radius: 8px;
    background: rgba(34,197,94,.1); color: #4ade80;
    transition: background .2s, color .2s;
}
.xt-ple-sync.is-pending { background: rgba(251,191,36,.12); color: #fbbf24; }
.xt-ple-sync.is-error   { background: rgba(239,68,68,.12);  color: #f87171; }

/* ─── Toolbar ─────────────────────────────────────────────── */
.xt-ple-toolbar {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 9px 11px; background: rgba(0,0,0,.2);
    border-radius: 11px; margin-bottom: 10px;
}
.xt-ple-check-all {
    display: flex; align-items: center; gap: 5px;
    font-size: 11.5px; color: #a1a1aa; cursor: pointer;
    padding-right: 9px; border-right: 1px solid rgba(255,255,255,.07);
    margin-right: 2px;
}
.xt-ple-check-all input { cursor: pointer; accent-color: #8b5cf6; }
.xt-ple-bulk-group { display: flex; align-items: center; gap: 4px; }
.xt-ple-bk {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 9px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 7px; color: #a1a1aa;
    font-size: 11px; font-weight: 500; cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
    font-family: inherit; white-space: nowrap;
}
.xt-ple-bk:hover { background: rgba(139,92,246,.14); color: #c084fc; border-color: rgba(139,92,246,.28); }
.xt-ple-sel-info { margin-left: auto; font-size: 11px; color: #52525b; white-space: nowrap; }
.xt-ple-sel-info b { color: #a78bfa; }

/* ─── Song list ───────────────────────────────────────────── */
.xt-ple-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 3px;
}
.xt-ple-item {
    display: flex !important;
    align-items: center; gap: 7px;
    padding: 9px 11px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 11px;
    transition: background .12s; position: relative;
    list-style: none;
}
.xt-ple-item:hover { background: rgba(255,255,255,.058); }

/* Drag states */
.xt-ple-item.is-dragging { opacity: .35; box-shadow: 0 0 0 2px #8b5cf6; }
.xt-ple-item.is-drop-before::before,
.xt-ple-item.is-drop-after::after {
    content: ''; position: absolute; left: 0; right: 0;
    height: 2px; background: #8b5cf6; border-radius: 2px;
}
.xt-ple-item.is-drop-before::before { top: -3px; }
.xt-ple-item.is-drop-after::after  { bottom: -3px; }
.xt-ple-item.is-drop-commit { animation: xt-ple-flash .32s ease; }
@keyframes xt-ple-flash {
    0%,100% { background: rgba(255,255,255,.03); }
    50%      { background: rgba(139,92,246,.16); }
}
.xt-ple-list.is-drag-active .xt-ple-item:not(.is-dragging) { opacity: .6; }

/* Drag grip */
.xt-ple-drag {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    cursor: grab; background: none; border: none;
    color: #3f3f46; border-radius: 5px; flex-shrink: 0;
    transition: color .12s, background .12s; font-size: 12px;
}
.xt-ple-drag:hover { color: #a1a1aa; background: rgba(255,255,255,.06); }
.xt-ple-drag:active { cursor: grabbing; }

/* Row parts */
.xt-ple-row-chk { flex-shrink: 0; display: flex; align-items: center; }
.xt-ple-row-chk input { width: 14px; height: 14px; cursor: pointer; accent-color: #8b5cf6; }
.xt-ple-row-num {
    width: 22px; text-align: right; font-size: 11px;
    color: #3f3f46; flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.xt-ple-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.xt-ple-row-name {
    font-size: 13px; font-weight: 500; color: #e4e4e7;
    text-decoration: none; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; transition: color .12s;
}
.xt-ple-row-name:hover { color: #c084fc; }
.xt-ple-row-artist { font-size: 11px; color: #52525b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xt-ple-row-moves { display: flex; gap: 2px; flex-shrink: 0; }
.xt-ple-mv {
    width: 25px; height: 25px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 1px solid rgba(255,255,255,.07);
    border-radius: 6px; color: #3f3f46;
    cursor: pointer; font-size: 11px;
    transition: color .12s, background .12s; font-family: inherit;
}
.xt-ple-mv:hover { color: #a1a1aa; background: rgba(255,255,255,.07); }
.xt-ple-del-form { display: flex; flex-shrink: 0; margin: 0; }
.xt-ple-del {
    width: 27px; height: 27px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 7px;
    color: #3f3f46; cursor: pointer; font-size: 13px;
    transition: color .12s, background .12s; font-family: inherit;
}
.xt-ple-del:hover { color: #f87171; background: rgba(239,68,68,.1); }

/* Empty state */
.xt-ple-empty {
    text-align: center; padding: 28px 16px;
    color: #52525b; font-size: 13px; line-height: 1.6;
    width: 100%; box-sizing: border-box;
}
.xt-ple-list-footer {
    text-align: center; font-size: 11px; color: #3f3f46;
    padding: 8px 0 2px;
}

/* ─── Search section ──────────────────────────────────────── */
.xt-ple-search-input-row {
    display: flex; align-items: center; gap: 9px;
    background: rgba(0,0,0,.25);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 11px; padding: 9px 13px; margin-bottom: 8px;
    transition: border-color .15s;
}
.xt-ple-search-input-row:focus-within { border-color: rgba(139,92,246,.4); }
.xt-ple-search-input-row i { color: #3f3f46; font-size: 13px; }
.xt-ple-search-input-row input {
    flex: 1; background: none; border: none;
    color: #e4e4e7; font-size: 13px; outline: none; font-family: inherit;
}
.xt-ple-search-input-row input::placeholder { color: #3f3f46; }
.xt-ple-search-hint { font-size: 11px; color: #52525b; margin-bottom: 10px; min-height: 16px; }

/* ─── Search results ──────────────────────────────────────── */
.xt-ple-results-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 3px;
}
.xt-ple-result-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 10px;
}
.xt-ple-result-info { flex: 1; min-width: 0; }
.xt-ple-result-name {
    font-size: 13px; font-weight: 500; color: #e4e4e7;
    text-decoration: none; display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color .12s;
}
.xt-ple-result-name:hover { color: #c084fc; }
.xt-ple-result-artist { font-size: 11px; color: #52525b; display: block; }
.xt-ple-add-btn {
    flex-shrink: 0; padding: 5px 11px;
    background: rgba(139,92,246,.13);
    border: 1px solid rgba(139,92,246,.28);
    border-radius: 7px; color: #c084fc;
    font-size: 12px; font-weight: 500; cursor: pointer;
    transition: background .12s, color .12s; font-family: inherit;
}
.xt-ple-add-btn:hover { background: rgba(139,92,246,.28); color: #fff; }
.xt-ple-add-form { margin: 0; }
.xt-ple-already-tag {
    flex-shrink: 0; font-size: 11px; color: #3f3f46;
    padding: 4px 9px; background: rgba(255,255,255,.04); border-radius: 7px;
}
.member-empty-note { font-size: 12px; color: #52525b; text-align: center; padding: 16px 0; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .xt-ple-header { padding: 14px; gap: 12px; }
    .xt-ple-cover-wrap { width: 76px; height: 76px; }
    .xt-ple-playlist-name { font-size: 1.05rem; }
    .xt-ple-form-grid { grid-template-columns: 1fr; }
    .xt-ple-form-full { grid-column: auto; }
    .xt-ple-row-moves { display: none; }
    .xt-ple-row-num { display: none; }
}
