/* ProfilePress course builder */
.ppress-lms-builder,
.plb-drawer {
    --plb-accent: #2563eb;
    --plb-accent-soft: #eff6ff;
    --plb-border: #e2e8f0;
    --plb-border-strong: #cbd5e1;
    --plb-text: #0f172a;
    --plb-muted: #64748b;
    --plb-bg: #f8fafc;
    --plb-card: #fff;
    --plb-success: #16a34a;
    --plb-danger: #dc2626;
    --plb-radius: 10px;
    --plb-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    color: var(--plb-text);
}

.ppress-lms-builder {
    margin: 0 0 40px;
}

.ppress-lms-builder *,
.plb-drawer * {
    box-sizing: border-box;
}

.ppress-lms-builder [hidden],
.plb-drawer [hidden] {
    display: none !important;
}

/* top bar */
.plb-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0 12px;
    position: sticky;
    top: 32px;
    z-index: 20;
    background: #f0f0f1;
}

.plb-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--plb-border-strong);
    background: #fff;
    color: var(--plb-text);
    text-decoration: none;
    flex: none;
}

.plb-back:hover {
    color: var(--plb-accent);
    border-color: var(--plb-accent);
}

.plb-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.plb-title-input.plb-title-input {
    flex: 1;
    min-width: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: none;
    color: var(--plb-text);
}

.plb-title-input.plb-title-input:hover {
    border-color: var(--plb-border-strong);
}

.plb-title-input.plb-title-input:focus {
    border-color: var(--plb-accent);
    background: #fff;
    box-shadow: 0 0 0 1px var(--plb-accent);
}

.plb-status-pill {
    flex: none;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
}

.plb-status-pill.plb-status-publish {
    background: #dcfce7;
    color: #166534;
}

.plb-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

.plb-topbar-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* the icon's own box, line height included, so a theme's or WordPress's taller button line height can't push the glyph
   below the label. */
.plb-topbar-actions .button .dashicons {
    flex: none;
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    margin: 0;
    vertical-align: middle;
}

.plb-topbar-actions .button .dashicons:before {
    line-height: inherit;
}

/* the same for icons in any other builder button. */
.ppress-lms-builder .button .dashicons,
.plb-drawer .button .dashicons {
    line-height: 1;
    vertical-align: middle;
}

.plb-save-state {
    color: var(--plb-muted);
    font-size: 13px;
    margin-right: 6px;
}

.plb-save-state[data-state="error"] {
    color: var(--plb-danger);
}

.plb-save-state[data-state="saved"]:before {
    content: "\f147";
    font-family: dashicons;
    color: var(--plb-success);
    vertical-align: middle;
    margin-right: 2px;
}

/* tabs */
.plb-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--plb-border-strong);
    margin-bottom: 20px;
    overflow-x: auto;
}

.plb-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--plb-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.plb-tab .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
}

.plb-tab:hover {
    color: var(--plb-text);
}

.plb-tab.is-active {
    color: var(--plb-accent);
    border-bottom-color: var(--plb-accent);
}

.plb-count {
    font-size: 11px;
    background: #e2e8f0;
    color: var(--plb-text);
    padding: 1px 7px;
    border-radius: 999px;
}

/* cards & layout */
.plb-card {
    background: var(--plb-card);
    border: 1px solid var(--plb-border);
    border-radius: var(--plb-radius);
    box-shadow: var(--plb-shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.plb-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.plb-two-col,
.plb-curriculum-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.plb-curriculum-aside {
    position: sticky;
    top: 110px;
}

.plb-narrow {
    max-width: 820px;
}

@media (max-width: 1100px) {
    .plb-two-col,
    .plb-curriculum-layout {
        /* minmax so a long lesson title can't widen the column past the screen. */
        grid-template-columns: minmax(0, 1fr);
    }

    .plb-curriculum-aside {
        position: static;
    }
}

.plb-field {
    margin-bottom: 18px;
}

.plb-field > label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.plb-field input[type="text"],
.plb-field input[type="url"],
.plb-field input[type="number"],
.plb-field select,
.plb-field textarea {
    width: 100%;
    max-width: none;
    border-radius: 6px;
}

.plb-field .description {
    margin-top: 6px;
}

.plb-input-prefix,
.plb-input-suffix,
.plb-input-with-button {
    display: flex;
    align-items: stretch;
}

.plb-input-prefix span,
.plb-input-suffix span {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    background: #f1f5f9;
    border: 1px solid #8c8f94;
    color: var(--plb-muted);
}

.plb-input-prefix span {
    border-right: 0;
    border-radius: 6px 0 0 6px;
}

.plb-input-prefix input {
    border-radius: 0 6px 6px 0 !important;
}

.plb-input-suffix span {
    border-left: 0;
    border-radius: 0 6px 6px 0;
}

.plb-input-suffix input {
    border-radius: 6px 0 0 6px !important;
}

.plb-input-with-button {
    gap: 8px;
}

/* curriculum */
.plb-section {
    background: var(--plb-card);
    border: 1px solid var(--plb-border);
    border-radius: var(--plb-radius);
    box-shadow: var(--plb-shadow);
    margin-bottom: 14px;
}

.plb-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--plb-border);
    background: #f8fafc;
    border-radius: var(--plb-radius) var(--plb-radius) 0 0;
}

.plb-section.is-collapsed .plb-section-header {
    border-bottom: 0;
    border-radius: var(--plb-radius);
}

.plb-section.is-collapsed .plb-lessons,
.plb-section.is-collapsed .plb-section-footer {
    display: none;
}

.plb-section-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--plb-accent-soft);
    color: var(--plb-accent);
    font-weight: 600;
    font-size: 12px;
}

.plb-section-title.plb-section-title {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    padding: 4px 8px;
    border-radius: 6px;
}

.plb-section-title.plb-section-title:hover {
    border-color: var(--plb-border-strong);
    background: #fff;
}

.plb-section-title.plb-section-title:focus {
    border-color: var(--plb-accent);
    background: #fff;
    box-shadow: 0 0 0 1px var(--plb-accent);
}

.plb-section-count {
    color: var(--plb-muted);
    font-size: 12px;
    white-space: nowrap;
}

.plb-handle {
    color: #94a3b8;
    cursor: grab;
    flex: none;
}

.plb-handle:hover {
    color: var(--plb-text);
}

.plb-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--plb-muted);
    cursor: pointer;
    text-decoration: none;
    flex: none;
}

.plb-icon-btn .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
}

.plb-icon-btn:hover,
.plb-icon-btn:focus {
    background: #f1f5f9;
    color: var(--plb-text);
}

.plb-icon-btn.plb-danger:hover {
    color: var(--plb-danger);
    background: #fef2f2;
}

.plb-lessons {
    list-style: none;
    margin: 0;
    padding: 6px;
    min-height: 44px;
}

.plb-lessons-empty {
    display: none;
    padding: 14px;
    text-align: center;
    color: var(--plb-muted);
    font-size: 13px;
    border: 1px dashed var(--plb-border-strong);
    border-radius: 8px;
    margin: 0;
}

.plb-lessons-empty:only-child {
    display: block;
}

.plb-lesson {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 6px;
    margin: 0 0 4px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
}

.plb-lesson:last-of-type {
    margin-bottom: 0;
}

.plb-lesson:hover {
    background: #f8fafc;
    border-color: var(--plb-border);
}

.plb-lesson.is-new {
    animation: plb-flash 1.6s ease;
}

@keyframes plb-flash {
    0% {
        background: #dbeafe;
    }
    100% {
        background: #fff;
    }
}

.plb-lesson-icon {
    color: var(--plb-accent);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.plb-lesson-quiz .plb-lesson-icon {
    color: #9333ea;
}

.plb-lesson-title {
    flex: 1;
    min-width: 0;
    text-align: left;
    border: 0;
    background: none;
    padding: 2px 0;
    font-size: 14px;
    color: var(--plb-text);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plb-lesson-title:hover {
    color: var(--plb-accent);
}

.plb-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.plb-badge {
    font-size: 11px;
    line-height: 1;
    padding: 4px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--plb-muted);
    white-space: nowrap;
}

.plb-badge-draft {
    background: #fef3c7;
    color: #92400e;
}

.plb-badge-preview {
    background: #dcfce7;
    color: #166534;
}

.plb-badge-drip {
    background: #ede9fe;
    color: #5b21b6;
}

.plb-lesson-duration {
    color: var(--plb-muted);
    font-size: 12px;
    white-space: nowrap;
    min-width: 44px;
    text-align: right;
}

.plb-lesson-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity .15s;
}

.plb-lesson:hover .plb-lesson-actions,
.plb-lesson:focus-within .plb-lesson-actions {
    opacity: 1;
}

@media (hover: none) {
    .plb-lesson-actions {
        opacity: 1;
    }
}

.plb-lesson-placeholder {
    height: 42px;
    border: 2px dashed var(--plb-accent);
    border-radius: 8px;
    background: var(--plb-accent-soft);
    margin-bottom: 4px;
    list-style: none;
}

.plb-section-placeholder {
    border: 2px dashed var(--plb-accent);
    border-radius: var(--plb-radius);
    background: var(--plb-accent-soft);
    margin-bottom: 14px;
}

.ui-sortable-helper.plb-lesson {
    box-shadow: 0 10px 25px rgba(15, 23, 42, .15);
    border-color: var(--plb-border);
}

.plb-section-footer {
    padding: 6px 12px 12px;
}

.plb-quick-buttons {
    display: flex;
    gap: 8px;
}

.plb-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px dashed var(--plb-border-strong);
    background: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--plb-muted);
    font-weight: 500;
    cursor: pointer;
}

.plb-add-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.plb-add-btn:hover {
    color: var(--plb-accent);
    border-color: var(--plb-accent);
    background: var(--plb-accent-soft);
}

.plb-quick-add {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--plb-accent);
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.plb-quick-add.is-busy {
    opacity: .6;
    pointer-events: none;
}

.plb-quick-add-icon {
    color: var(--plb-accent);
    margin-left: 4px;
}

.plb-quick-add input.plb-quick-add-input,
.plb-quick-add input.plb-quick-add-input:focus {
    flex: 1;
    border: 0;
    box-shadow: none;
    outline: 0;
    background: transparent;
    font-size: 14px;
}

.plb-add-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 14px;
    border: 2px dashed var(--plb-border-strong);
    border-radius: var(--plb-radius);
    background: transparent;
    color: var(--plb-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.plb-add-section:hover {
    border-color: var(--plb-accent);
    color: var(--plb-accent);
    background: var(--plb-accent-soft);
}

.plb-empty {
    text-align: center;
    padding: 56px 24px;
    background: #fff;
    border: 1px solid var(--plb-border);
    border-radius: var(--plb-radius);
}

.plb-empty > .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--plb-accent);
}

.plb-empty h2 {
    font-size: 20px;
    margin: 12px 0 6px;
}

.plb-empty p {
    color: var(--plb-muted);
    margin: 0 auto 20px;
    max-width: 420px;
}

.plb-stats {
    margin: 0;
}

.plb-stats li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    margin: 0;
}

.plb-stats li:last-child {
    border-bottom: 0;
}

.plb-stats .dashicons {
    color: var(--plb-muted);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.plb-stats strong {
    margin-left: auto;
}

.plb-tips ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
    color: var(--plb-muted);
}

.plb-tips li {
    margin-bottom: 6px;
}

/* image picker */
.plb-image-preview {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 2px dashed var(--plb-border-strong);
    border-radius: 8px;
    background: #f8fafc;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.plb-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.plb-image-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--plb-muted);
}

.plb-image-empty .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.has-image .plb-image-preview {
    border-style: solid;
    border-color: var(--plb-border);
}

.has-image .plb-image-empty {
    display: none;
}

.plb-image-remove {
    display: none;
    margin-top: 8px;
}

.has-image .plb-image-remove {
    display: inline-block;
}

/* pricing */
.plb-choice-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 782px) {
    .plb-choice-cards {
        grid-template-columns: 1fr;
    }
}

.plb-choice-card {
    position: relative;
    cursor: pointer;
}

.plb-choice-card input {
    position: absolute;
    opacity: 0;
}

.plb-choice-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 14px;
    border: 2px solid var(--plb-border);
    border-radius: var(--plb-radius);
    transition: border-color .15s, background .15s;
}

.plb-choice-card-body .dashicons {
    color: var(--plb-muted);
    font-size: 22px;
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
}

.plb-choice-card-body > span:last-child {
    color: var(--plb-muted);
    font-size: 13px;
}

.plb-choice-card input:checked + .plb-choice-card-body {
    border-color: var(--plb-accent);
    background: var(--plb-accent-soft);
}

.plb-choice-card input:checked + .plb-choice-card-body .dashicons {
    color: var(--plb-accent);
}

.plb-choice-card input:focus-visible + .plb-choice-card-body {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
}

.plb-plan-list {
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plb-plan {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--plb-border);
    border-radius: 8px;
    cursor: pointer;
}

.plb-plan:hover {
    border-color: var(--plb-border-strong);
}

.plb-plan:has(input:checked) {
    border-color: var(--plb-accent);
    background: var(--plb-accent-soft);
}

.plb-plan.is-inactive {
    opacity: .7;
}

.plb-plan.is-new {
    animation: plb-flash 1.6s ease;
}

.plb-plan-name {
    flex: 1;
    font-weight: 500;
}

.plb-plan-price {
    font-weight: 600;
}

.plb-plan-price small {
    color: var(--plb-muted);
    font-weight: 400;
}

.plb-plan-edit {
    color: var(--plb-muted);
}

.plb-new-plan {
    border-top: 1px solid var(--plb-border);
    padding-top: 12px;
}

.plb-new-plan summary {
    cursor: pointer;
    color: var(--plb-accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.plb-new-plan summary::-webkit-details-marker {
    display: none;
}

.plb-new-plan-fields {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 14px;
}

.plb-new-plan-fields .plb-field {
    margin: 0;
}

.plb-new-plan-fields .description {
    grid-column: 1 / -1;
    margin: 0;
}

@media (max-width: 900px) {
    .plb-new-plan-fields {
        grid-template-columns: 1fr;
    }
}

/* toggles */
.plb-toggle {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 14px;
}

.plb-toggle input {
    position: absolute;
    opacity: 0;
}

.plb-toggle-ui {
    flex: none;
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background .15s;
    margin-top: 1px;
}

.plb-toggle-ui:after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    transition: transform .15s;
}

.plb-toggle input:checked + .plb-toggle-ui {
    background: var(--plb-accent);
}

.plb-toggle input:checked + .plb-toggle-ui:after {
    transform: translateX(16px);
}

.plb-toggle input:focus-visible + .plb-toggle-ui {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .3);
}

.plb-toggle .description {
    display: block;
    margin-top: 2px;
}

/* students */
.plb-students-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.plb-enroll-form {
    display: flex;
    gap: 8px;
}

.plb-enroll-form input {
    min-width: 260px;
}

@media (max-width: 600px) {
    .plb-enroll-form {
        flex: 1 1 100%;
        min-width: 0;
    }

    .plb-enroll-form input {
        flex: 1;
        min-width: 0;
        width: auto;
    }
}

/* wide tables scroll inside the card on small screens instead of widening the page. */
.plb-table-scroll {
    overflow-x: auto;
}

.plb-students-table {
    margin-top: 14px;
    border-radius: 8px;
}

.plb-students-table td {
    vertical-align: middle;
}

.plb-student {
    display: flex;
    align-items: center;
    gap: 10px;
}

.plb-student img {
    border-radius: 50%;
}

.plb-student span {
    display: block;
    color: var(--plb-muted);
    font-size: 12px;
}

.plb-progress {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    width: 140px;
    margin-bottom: 4px;
}

.plb-progress span {
    display: block;
    height: 100%;
    background: var(--plb-accent);
    border-radius: inherit;
}

.plb-empty-row {
    text-align: center;
    color: var(--plb-muted);
    padding: 30px !important;
}

/* drawer */
.plb-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 99990;
}

body.plb-drawer-open {
    overflow: hidden;
}

.plb-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(1040px, 100vw);
    background: #fff;
    z-index: 99991;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: -20px 0 40px rgba(15, 23, 42, .15);
    visibility: hidden;
}

.plb-drawer.is-open {
    transform: none;
    visibility: visible;
}

.plb-drawer.is-loading .plb-drawer-body {
    opacity: .4;
    pointer-events: none;
}

.plb-drawer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--plb-border);
}

.admin-bar .plb-drawer-header {
    margin-top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .plb-drawer-header {
        margin-top: 46px;
    }
}

.plb-drawer-title.plb-drawer-title {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
    border: 1px solid transparent;
    box-shadow: none;
    padding: 6px 8px;
    border-radius: 8px;
}

.plb-drawer-title.plb-drawer-title:hover {
    border-color: var(--plb-border-strong);
}

.plb-drawer-title.plb-drawer-title:focus {
    border-color: var(--plb-accent);
    box-shadow: 0 0 0 1px var(--plb-accent);
}

.plb-drawer-body {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
}

@media (max-width: 900px) {
    .plb-drawer-body {
        grid-template-columns: 1fr;
    }
}

.plb-drawer-main {
    padding: 20px;
    min-width: 0;
}

.plb-drawer-side {
    padding: 20px;
    border-left: 1px solid var(--plb-border);
    background: #f8fafc;
}

.plb-drawer-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid var(--plb-border);
    background: #fff;
}

.plb-spacer {
    flex: 1;
}

.plb-open-editor {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--plb-muted) !important;
}

.plb-open-editor .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.plb-segmented {
    display: inline-flex;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    margin-bottom: 20px;
}

.plb-segmented button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    padding: 7px 14px;
    border-radius: 7px;
    color: var(--plb-muted);
    font-weight: 500;
    cursor: pointer;
}

.plb-segmented button .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
}

.plb-segmented button.is-active {
    background: #fff;
    color: var(--plb-text);
    box-shadow: var(--plb-shadow);
}

.plb-content-field .wp-editor-wrap {
    border-radius: 8px;
}

.plb-attachments {
    margin: 0 0 8px;
}

.plb-attachments li {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--plb-border);
    border-radius: 6px;
    padding: 4px 4px 4px 8px;
    margin-bottom: 6px;
}

.plb-attachments li .dashicons-media-default {
    color: var(--plb-muted);
}

.plb-attachments input {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    box-shadow: none !important;
    padding: 2px !important;
    min-height: 0 !important;
}

/* quiz builder */
.plb-quiz-settings {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--plb-border);
    border-radius: 8px;
    margin-bottom: 16px;
}

.plb-quiz-settings .plb-field,
.plb-quiz-settings .plb-toggle {
    margin: 0;
}

.plb-quiz-settings .plb-field input {
    width: 80px;
}

.plb-question {
    border: 1px solid var(--plb-border);
    border-radius: var(--plb-radius);
    padding: 14px;
    margin-bottom: 12px;
    background: #fff;
}

.plb-question-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.plb-question-head strong {
    flex: 1;
}

.plb-question-head select {
    min-width: 160px;
}

.plb-question-text,
.plb-question-explanation {
    width: 100%;
    border-radius: 6px;
}

.plb-question-text {
    font-size: 15px;
}

.plb-question-explanation {
    margin-top: 10px;
    font-size: 13px;
    background: #f8fafc;
}

.plb-options {
    margin-top: 10px;
}

.plb-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border: 1px solid var(--plb-border);
    border-radius: 8px;
    margin-bottom: 6px;
}

.plb-option.is-correct {
    border-color: #86efac;
    background: #f0fdf4;
}

.plb-option-correct {
    display: inline-flex;
    padding: 4px;
}

.plb-option-text.plb-option-text {
    flex: 1;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.plb-tf {
    display: flex;
    gap: 10px;
}

.plb-tf .plb-option {
    flex: 1;
    padding: 10px 12px;
    cursor: pointer;
}

.plb-add-option {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    text-decoration: none;
}

.plb-add-option .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.plb-add-question {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px !important;
}

.plb-questions-empty {
    padding: 20px;
    text-align: center;
    color: var(--plb-muted);
    border: 1px dashed var(--plb-border-strong);
    border-radius: 8px;
}

.plb-question-placeholder {
    border: 2px dashed var(--plb-accent);
    border-radius: var(--plb-radius);
    margin-bottom: 12px;
}

/* quiz builder: new question types */
.plb-quiz-settings .plb-field input[type="number"] {
    width: 90px;
}

.plb-quiz-settings-note {
    flex-basis: 100%;
    margin: 0 !important;
}

.plb-points {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--plb-muted);
    font-size: 12px;
}

.plb-points input {
    width: 56px;
}

.plb-type-help {
    margin: 0 0 8px !important;
}

.plb-list-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--plb-accent-soft);
    color: var(--plb-accent);
    font-weight: 600;
    font-size: 12px;
}

.plb-list-icon {
    color: var(--plb-success);
}

.plb-pair-row .plb-option-text {
    flex: 1;
}

.plb-pair-arrow {
    color: var(--plb-muted);
}

/* toast */
.plb-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    background: #0f172a;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .25);
}

.plb-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.plb-toast.is-error {
    background: var(--plb-danger);
}

/* course list table */
.ppress-lms-list-course {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ppress-lms-list-course img,
.ppress-lms-list-thumb {
    width: 64px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex: none;
}

.ppress-lms-list-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
}

.ppress-lms-list-course .description {
    margin: 2px 0 0;
}

.ppress-lms-status {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
}

.ppress-lms-status-publish {
    background: #dcfce7;
    color: #166534;
}

.ppress-lms-warning {
    color: #b45309;
}

@media (max-width: 782px) {

    .plb-topbar {
        flex-wrap: wrap;
        top: 46px;
    }

    .plb-title-wrap {
        order: 3;
        flex-basis: 100%;
    }

    .plb-topbar-actions {
        flex: 1 1 0;
        flex-wrap: wrap;
        justify-content: flex-end;
        min-width: 0;
        margin-left: auto;
    }

    .plb-save-state {
        display: none;
    }

    .plb-lesson-duration,
    .plb-badges {
        display: none;
    }
}

/* access rules */
.plb-icon-btn.is-active {
    color: var(--plb-accent);
}

.plb-checklist {
    max-height: 200px;
    overflow: auto;
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
}

.plb-checklist label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

/* course tools */
.plb-add-row {
    display: flex;
    gap: 12px;
}

.plb-add-row .plb-add-section:last-child {
    flex: 0 0 auto;
    width: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.plb-bulk-add {
    margin-top: 16px;
}

.plb-bulk-add textarea {
    width: 100%;
    font-family: Menlo, Consolas, monospace;
}

.plb-more-menu {
    position: relative;
}

.plb-more-menu summary {
    list-style: none;
}

.plb-more-menu summary::-webkit-details-marker {
    display: none;
}

.plb-more-menu-items {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    min-width: 200px;
    padding: 6px;
    border: 1px solid var(--plb-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
}

.plb-more-menu-items a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--plb-text);
    text-decoration: none;
}

.plb-more-menu-items a:hover {
    background: #f1f5f9;
}

.plb-notice {
    margin: 0 0 16px !important;
}

.ppress-lms-import-form {
    margin: 12px 0;
    padding: 12px 16px;
    border: 1px solid #c3c4c7;
    background: #fff;
}

/* instructors */
.plb-instructor-list {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.plb-instructor-list li,
.plb-checklist label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plb-instructor-list li {
    padding: 4px 0;
}

.plb-instructor-list img,
.plb-checklist img {
    border-radius: 50%;
}

/* review */
.plb-status-pill.plb-status-pending,
.ppress-lms-status-pending {
    background: #fef3c7;
    color: #92400e;
}


/* certificate held or withdrawn for lack of payment (Students tab) */
.plb-certificate-link.plb-muted {
    color: var(--plb-muted);
    font-size: 12px;
}
