/* MSP LearnDash Lesson List Widget v3 — Frontend + Editor CSS */

/* ── Wrapper ─────────────────────────────────────────── */
.msp-ld-lesson-list-wrap {
    font-family: inherit;
    box-sizing: border-box;
}

/* ── Header label ────────────────────────────────────── */
.msp-ld-semester-label {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
    letter-spacing: 0.01em;
    display: block;
}

/* ── List ────────────────────────────────────────────── */
.msp-ld-lesson-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Grid layout ─────────────────────────────────────── */
.msp-ld-lesson-list.msp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

/* ── Lesson item ─────────────────────────────────────── */
.msp-ld-lesson-item {
    background-color: #f5f6fa;
    border-radius: 10px;
    overflow: hidden;
    transition: background-color .22s ease, box-shadow .22s ease, transform .18s ease;
    cursor: pointer;
}
.msp-ld-lesson-item:hover {
    background-color: #e8edf8;
    box-shadow: none;
    transform: translateY(-1px);
}
.msp-ld-lesson-item.msp-ld-completed {
    background-color: #e8f0fe;
}

/* ── Item inner row ──────────────────────────────────── */
.msp-ld-lesson-item-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
}

/* ── Status icon ─────────────────────────────────────── */
.msp-ld-status-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: transparent;
    transition: background-color .2s ease, border-color .2s ease;
}
.msp-ld-status-icon.msp-ld-checked {
    background-color: #2563eb;
    border-color: #2563eb;
}
.msp-ld-status-icon.msp-ld-checked svg {
    color: #fff;
    width: 13px;
    height: 13px;
}

/* ── Title ───────────────────────────────────────────── */
.msp-ld-lesson-title {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    text-decoration: none;
    line-height: 1.4;
    transition: color .2s ease;
    word-break: break-word;
}
.msp-ld-lesson-item:hover .msp-ld-lesson-title,
.msp-ld-lesson-item.msp-ld-completed .msp-ld-lesson-title {
    color: #2563eb;
}

/* ── Arrow ───────────────────────────────────────────── */
.msp-ld-arrow-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
    transition: color .2s ease, transform .2s ease;
}
.msp-ld-arrow-icon svg { width: 18px; height: 18px; display: block; }
.msp-ld-lesson-item:hover .msp-ld-arrow-icon {
    color: #2563eb;
    transform: translateX(3px);
}

/* ── Responsive grid ─────────────────────────────────── */
@media (max-width: 767px) {
    .msp-ld-lesson-list.msp-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════
   EDITOR DRAG-DROP PILL SORTER
══════════════════════════════════════════════════════ */
.msp-ld-pill-sorter-wrap {
    margin: 8px 0 4px;
    padding: 10px 12px;
    background: #f0f4ff;
    border: 1px dashed #93aaf7;
    border-radius: 8px;
}

.msp-ld-pill-sorter-label {
    font-size: 11px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

.msp-ld-pill-sorter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.msp-ld-pill-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 12px;
    color: #1e293b;
    cursor: default;
    user-select: none;
    transition: box-shadow .15s ease;
}
.msp-ld-pill-item:hover {
    box-shadow: 0 2px 8px rgba(37,99,235,.12);
    border-color: #818cf8;
}
.msp-ld-pill-item.ui-sortable-helper {
    box-shadow: 0 6px 20px rgba(37,99,235,.2);
    opacity: .92;
}
.msp-ld-pill-item.ui-sortable-placeholder {
    background: #e0e7ff;
    border: 2px dashed #818cf8;
    visibility: visible !important;
}

.msp-ld-pill-drag-handle {
    cursor: grab;
    color: #94a3b8;
    font-size: 15px;
    line-height: 1;
    padding: 0 2px;
    flex-shrink: 0;
}
.msp-ld-pill-drag-handle:active { cursor: grabbing; }

.msp-ld-pill-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
