﻿.btn-primary {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--kurzola-btn, #0a0a0a);
    border: 1px solid var(--kurzola-btn, #0a0a0a);
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--kurzola-btn-hover, #1a1a1a);
    border-color: var(--kurzola-btn-hover, #1a1a1a);
    color: #fff;
}

.btn-primary:disabled,
.btn-primary.disabled,
.btn-primary[disabled] {
    color: #9ca3af;
    background-color: #e5e7eb;
    border-color: #e5e7eb;
    opacity: 1;
    cursor: not-allowed;
}

.error {
    color: #dc2626;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border-radius: 0.5rem;
}

/* Marketplace */
.marketplace-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.25rem 2.5rem;
}

.marketplace-page-header {
    margin-bottom: 1.5rem;
}

.marketplace-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.marketplace-lead {
    margin: 0;
    color: var(--kurzola-text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 52rem;
}

.marketplace-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.marketplace-sidebar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1rem 1.25rem;
    position: sticky;
    top: 1rem;
}

.mp-sidebar-block + .mp-sidebar-block {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f3f4f6;
}

.mp-sidebar-label,
.mp-sidebar-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--kurzola-text);
    margin: 0 0 0.65rem;
}

.mp-search-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.mp-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mp-chip {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: #374151;
    transition: border-color 0.15s, background 0.15s;
}

.mp-chip:hover,
.mp-chip.active {
    border-color: var(--kurzola-primary, #22C55E);
    background: #ecfdf5;
    color: var(--bs-link-hover-color);
}

.mp-count {
    color: var(--kurzola-text-muted);
    font-weight: 500;
}

.mp-chip.active .mp-count {
    color: var(--kurzola-menu);
}

.mp-category-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mp-category-tree > li + li {
    margin-top: 0.35rem;
}

.mp-cat-row {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.mp-cat-toggle {
    border: none;
    background: transparent;
    width: 1.25rem;
    padding: 0;
    font-size: 0.7rem;
    color: var(--kurzola-text-muted);
    cursor: pointer;
    flex-shrink: 0;
}

.mp-cat-toggle-spacer {
    width: 1.25rem;
    flex-shrink: 0;
}

.mp-cat-link {
    display: block;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    text-align: left;
    text-decoration: none;
    padding: 0.4rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    width: 100%;
    transition: border-color 0.15s, background 0.15s;
}

.mp-cat-link:hover,
.mp-cat-link.active {
    border-color: var(--kurzola-primary, #22C55E);
    background: #ecfdf5;
    color: var(--bs-link-hover-color);
    text-decoration: none;
}

/* The active filter has to read differently from whatever the pointer happens to be over, or the
   reader cannot tell which category is actually filtering the list. */
.mp-cat-link.active {
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--kurzola-primary, #22C55E);
}

.mp-category-children {
    list-style: none;
    margin: 0.15rem 0 0.35rem 1.5rem;
    padding: 0;
}

.mp-apply-btn {
    margin-top: 1.25rem;
}

.marketplace-main {
    min-width: 0;
}

.mp-sort-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.mp-sort-label {
    font-size: 0.85rem;
    color: var(--kurzola-text-muted);
    font-weight: 500;
}

.mp-sort-select {
    width: auto;
    min-width: 11rem;
}

.mp-loading,
.mp-empty {
    color: var(--kurzola-text-muted);
    padding: 2rem 0;
}

.course-badge-free {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--bs-success-bg-subtle);
    color: var(--kurzola-menu);
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    margin-right: 0.35rem;
}

.course-category-tag {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--kurzola-text-muted);
    background: #f3f4f6;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    margin-left: 0.35rem;
}

.promotion-section-lead {
    color: var(--kurzola-text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: -0.5rem 0 1.25rem;
    max-width: 42rem;
}

.results-count {
    color: var(--kurzola-text-muted);
    margin-bottom: 1rem;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Only opacity and transform are animated here. Those two are the ones the compositor can run on
   its own; clip-path, width and height all repaint or relayout the whole card every frame, which is
   what an older laptop stutters on. The card therefore takes its full size in one frame and slides
   in from the edge it grew out of instead of being drawn open.
   Closing ends fully transparent on purpose: the markup is swapped a moment later, over the wire in
   this app, and anything still visible at that point would sit frozen mid-animation. */
.mp-expand-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.mp-expand-close:hover {
    background: #fff;
    color: #111;
}

.mp-expand-loading {
    padding: 2.5rem 1.5rem;
    color: var(--kurzola-text-muted);
    text-align: center;
}

.mp-mobile-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: stretch;
}

.mp-mobile-search {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.95rem;
}

.mp-mobile-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.mp-mobile-toolbar--filters {
    display: none;
}

.mp-filters-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1040;
}

.mp-sidebar-mobile-head {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.mp-course-grid {
    --mp-card-h: 21rem;
    --mp-cover-h: 10rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

/* The open card spans both columns, so it lands on a row of its own and pushes the card that shared
   that row to the next slot. */
.course-card--expanded {
    grid-column: 1 / -1;
}

/* A real grow, run entirely on the compositor: the card is scaled horizontally and its content is
   scaled by the inverse at the same moments, so the text is never stretched. Both animations are
   linear with matching steps – easing only one of the two would stop the inverse lining up and the
   content would breathe. Nothing here touches layout or paint, which is what keeps it smooth on a
   slow machine. */
.mp-open--left,
.mp-open--left .mp-expand-scale {
    transform-origin: left center;
}

.mp-open--right,
.mp-open--right .mp-expand-scale {
    transform-origin: right center;
}

.mp-open--left,
.mp-open--right {
    animation: mpCardGrow 0.3s linear;
}

.mp-open--left .mp-expand-scale,
.mp-open--right .mp-expand-scale {
    animation: mpCardGrowInner 0.3s linear;
}

/* Closing plays the same steps backwards, so it shrinks to exactly the half it grew from. Opacity
   sits at zero on the first keyframe, which reversed means it fades out over the last moment – the
   markup that replaces it arrives over the wire a beat later, and anything still visible at that
   point would sit frozen mid-animation. */
.mp-open--left.is-closing,
.mp-open--right.is-closing {
    animation: mpCardGrow 0.24s linear reverse forwards;
}

.mp-open--left.is-closing .mp-expand-scale,
.mp-open--right.is-closing .mp-expand-scale {
    animation: mpCardGrowInner 0.24s linear reverse forwards;
}

@keyframes mpCardGrow {
    0% {
        opacity: 0;
        transform: scaleX(0.49);
    }
    20% {
        opacity: 1;
        transform: scaleX(0.739);
    }
    40% {
        transform: scaleX(0.89);
    }
    60% {
        transform: scaleX(0.967);
    }
    80% {
        transform: scaleX(0.996);
    }
    100% {
        opacity: 1;
        transform: scaleX(1);
    }
}

@keyframes mpCardGrowInner {
    0% {
        transform: scaleX(2.041);
    }
    20% {
        transform: scaleX(1.353);
    }
    40% {
        transform: scaleX(1.124);
    }
    60% {
        transform: scaleX(1.034);
    }
    80% {
        transform: scaleX(1.004);
    }
    100% {
        transform: scaleX(1);
    }
}

.mp-expand-scale {
    height: 100%;
}

.course-card {
    position: relative;
    min-width: 0;
    height: var(--mp-card-h, 21rem);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.course-wishlist-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    color: #dc2626;
    z-index: 2;
}

.course-wishlist-btn:hover {
    background: #fff;
}

.course-wishlist-error {
    position: absolute;
    top: 2.75rem;
    right: 0.5rem;
    z-index: 2;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    line-height: 1.2;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.course-card--expanded > .course-wishlist-btn {
    top: 0.875rem;
    right: 3.6rem;
}

.course-card--expanded > .course-wishlist-error {
    top: 3.5rem;
    right: 3.6rem;
}

.course-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.course-card--expanded {
    display: block;
    /* No transition while the open animation runs – a box-shadow transition on a card this large
       repaints every frame alongside it, which is the other half of the stutter. */
    transition: none;
    border-color: var(--kurzola-primary, #22C55E);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.18);
    cursor: default;
    transform: none;
}

.course-card--expanded:hover {
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.18);
    transform: none;
}

.course-cover {
    width: 100%;
    height: var(--mp-cover-h, 10rem);
    flex-shrink: 0;
    object-fit: cover;
}

.course-cover-placeholder {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* Course overview (marketplace detail step 1) */
.course-overview-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.course-overview-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.course-overview-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.course-overview-cover-placeholder {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.course-overview-body {
    padding: 1.5rem;
}

.course-overview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.course-overview-title {
    font-size: 1.65rem;
    line-height: 1.25;
    margin: 0 0 1rem;
    color: var(--kurzola-text);
}

.course-overview-lector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.course-overview-lector-photo,
.course-overview-lector-initial {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    background: #111;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.course-overview-lector-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.course-overview-lector-link {
    font-size: 0.8rem;
    color: var(--kurzola-text-muted);
    text-decoration: none;
}

.course-overview-lector-link:hover {
    color: #111;
    text-decoration: underline;
}

.course-overview-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.course-overview-meta .rating {
    color: #d97706;
}

.course-overview-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 1.25rem;
}

.course-overview-desc {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
}

.course-overview-desc h2 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--kurzola-text-muted);
    margin: 0 0 0.5rem;
}

.course-overview-desc p {
    font-size: 0.925rem;
    line-height: 1.6;
    color: #374151;
    margin: 0;
    white-space: pre-wrap;
}

.course-overview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Course web (marketplace detail step 2) */
.course-web-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
}

.course-web-toolbar {
    margin-bottom: 0.75rem;
}

.course-web-frame {
    border-radius: 1rem;
}

.public-course-thumb {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.public-course-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card > .public-course-thumb {
    width: 100%;
    height: var(--block-item-height, 100px);
    border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
}

.card-body .public-course-thumb {
    width: 56px;
    height: var(--block-item-height, 56px);
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.public-course-thumb-lg {
    min-height: var(--block-item-height, 140px);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.course-card-body {
    padding: 1rem 1.25rem 1.25rem;
}

.course-card-body h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0.35rem 0;
}

.course-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--kurzola-primary, #22C55E);
    background: var(--bs-success-bg-subtle);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.course-lector {
    font-size: 0.85rem;
    color: var(--kurzola-text-muted);
    margin: 0.25rem 0;
}

.course-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0.5rem 0;
}

.course-meta .rating {
    color: #d97706;
}

.course-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--kurzola-primary, #22C55E);
    margin: 0.5rem 0 0;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.course-reviews {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.review-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

/* Chat */
.message-bubble {
    max-width: 75%;
    padding: 0.65rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
}

.message-bubble.mine {
    background: var(--kurzola-primary, #22C55E);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.message-bubble.theirs {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 0.25rem;
}

.message-bubble p {
    margin: 0;
}

.message-time {
    display: block;
    font-size: 0.7rem;
    opacity: 0.75;
    margin-top: 0.25rem;
}

.admin-chat-search {
    position: relative;
    flex: 1 1 220px;
    max-width: 280px;
}

.admin-chat-search-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--kurzola-text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.admin-chat-search input {
    padding-left: 1.75rem;
}

.admin-chat-item {
    border-left: 3px solid transparent;
}

.admin-chat-item--needs-reply {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.admin-chat-item--needs-reply.active {
    background: var(--kurzola-btn);
    border-left-color: var(--kurzola-btn);
}

.admin-chat-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--kurzola-btn);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    overflow: hidden;
    flex-shrink: 0;
}

.admin-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-chat-avatar--lg {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--kurzola-primary, #22C55E);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-danger {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    background-color: #dc2626;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-danger:disabled {
    opacity: 0.6;
}

/* ── Password rules (Register / ResetPassword) ──────────────────────────── */
.pwd-rules {
    margin-top: 0.4rem;
    padding-left: 0.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pwd-rule {
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #9ca3af;
    transition: color 0.35s ease;
}

.pwd-rule::before {
    content: '✗';
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    display: inline-block;
}

.pwd-rule.ok {
    color: var(--kurzola-primary-hover);
}

.pwd-rule.ok::before {
    content: '✓';
    animation: pwd-rule-pop 0.35s ease;
}

@keyframes pwd-rule-pop {
    0% { transform: scale(0.5); }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .pwd-rule.ok::before {
        animation: none;
    }
}

/* ── App Footer ─────────────────────────────────────────────────── */
.app-footer {
    margin-top: 4rem;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0 1rem;
    font-size: 0.8125rem;
    color: var(--kurzola-text-muted);
}

.app-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.app-footer__col {
    flex: 1 1 180px;
}

.app-footer__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.app-footer__brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--kurzola-text);
    letter-spacing: -0.01em;
}

.app-footer__address {
    font-style: normal;
    line-height: 1.7;
}

.app-footer__address a {
    color: inherit;
    text-decoration: none;
}

.app-footer__address a:hover {
    text-decoration: underline;
}

.app-footer__heading {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4b5563;
    margin-bottom: 0.6rem;
}

.app-footer__link {
    display: block;
    color: var(--kurzola-text-muted);
    text-decoration: none;
    margin-bottom: 0.35rem;
    transition: color 0.15s;
}

.app-footer__link:hover {
    color: var(--kurzola-text);
}

.app-footer__payment-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 44px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.1;
    border: 1px solid #e5e7eb;
    text-align: center;
    white-space: nowrap;
}

.pay-badge--visa {
    background: #1a1f71;
    color: #fff;
    font-size: 0.75rem;
    font-style: italic;
    letter-spacing: 0.02em;
    border-color: #1a1f71;
}

.pay-badge--mc {
    background: #fff;
    gap: 0;
    position: relative;
    overflow: hidden;
    padding: 0 8px;
    min-width: 44px;
}

.pay-badge__mc-left,
.pay-badge__mc-right {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.pay-badge__mc-left {
    background: #eb001b;
    margin-right: -6px;
    position: relative;
    z-index: 1;
}

.pay-badge__mc-right {
    background: #f79e1b;
    opacity: 0.9;
}

.pay-badge--applepay {
    background: #000;
    color: #fff;
    gap: 3px;
    font-size: 0.72rem;
    letter-spacing: 0;
}

.pay-badge--googlepay {
    background: #fff;
    color: #3c4043;
    border-color: #dadce0;
    font-size: 0.72rem;
    font-weight: 600;
}

.pay-badge--3ds {
    background: #fff;
    color: #1a1f71;
    border-color: #1a1f71;
    font-size: 0.55rem;
    line-height: 1.2;
    min-width: 38px;
}

.app-footer__bottom {
    border-top: 1px solid #f3f4f6;
    padding-top: 0.75rem;
    font-size: 0.75rem;
    color: #4b5563;
}

/* ── Legal pages ────────────────────────────────────────────────── */
.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #374151;
}

.legal-page__header {
    margin-bottom: 2.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1.5rem;
}

.legal-page__back {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--kurzola-text-muted);
    text-decoration: none;
}

.legal-page__back:hover {
    color: var(--kurzola-text);
}

.legal-page__header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--kurzola-text);
}

.legal-page__updated {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin: 0;
}

.legal-page__body section {
    margin-bottom: 2rem;
}

.legal-page__body h2 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--kurzola-text);
}

.legal-page__body ul {
    padding-left: 1.25rem;
}

.legal-page__body li {
    margin-bottom: 0.3rem;
}

.legal-page__body a {
    color: var(--kurzola-menu);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.legal-table th,
.legal-table td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.legal-table th {
    background: #f9fafb;
    font-weight: 600;
}

.legal-page__tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-x: auto;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.legal-page__tab {
    flex: 0 0 auto;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kurzola-text-muted);
    white-space: nowrap;
    cursor: pointer;
}

.legal-page__tab:hover {
    color: var(--kurzola-text);
}

.legal-page__tab.active {
    color: var(--kurzola-menu);
    border-bottom-color: var(--kurzola-primary);
}

.legal-page__inline-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--kurzola-menu);
    text-decoration: underline;
    cursor: pointer;
}

/* Quick-link grid to the legal pages (e.g. on the lector settings page) - plain black icons in
   bordered squares, matching the app's monochrome icon convention rather than colored badges. */
.legal-links-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 1.25rem 0.75rem;
}

@media (max-width: 420px) {
    .legal-links-grid {
        grid-template-columns: repeat(2, minmax(90px, 1fr));
    }
}

.legal-links-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    text-align: center;
}

.legal-links-label {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 2.2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--kurzola-text);
}

.legal-links-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--kurzola-text);
    transition: border-color 0.15s;
}

.legal-links-item:hover .legal-links-icon {
    border-color: var(--kurzola-btn);
}

button.legal-links-item {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
}

button.legal-links-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.legal-links-item--danger .legal-links-icon {
    color: #dc2626;
    border-color: #fecaca;
}

.legal-links-item--danger:hover .legal-links-icon {
    border-color: #dc2626;
}

.settings-collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}

.settings-collapse-toggle .bi {
    color: var(--kurzola-text-muted);
}

/* Responsive tables: below 767.98px, a .table-stack table drops its header row and
   renders each row as a stacked card, with each cell prefixed by its column's label
   (from a data-label attribute) instead of relying on horizontal scrolling. */
@media (max-width: 767.98px) {
    .table-stack thead {
        display: none;
    }

    .table-stack,
    .table-stack tbody,
    .table-stack tr,
    .table-stack td {
        display: block;
        width: 100%;
    }

    .table-stack tr {
        margin-bottom: 0.75rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        padding: 0.35rem 0.75rem;
    }

    .table-stack tr:last-child {
        margin-bottom: 0;
    }

    .table-stack td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.4rem 0 !important;
        border: none !important;
        text-align: right;
    }

    .table-stack td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-weight: 600;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--kurzola-text-muted);
        text-align: left;
    }

    .table-stack td[data-label=""]::before,
    .table-stack td:not([data-label])::before {
        content: none;
    }

    .table-stack td[data-label=""],
    .table-stack td:not([data-label]) {
        justify-content: flex-end;
    }
}

/* Nav-tabs/nav-pills bars: below 767.98px, scroll horizontally in one row instead of
   Bootstrap's default multi-row wrap, so a bar with several tabs (e.g. an admin detail
   page's 9-10 section tabs) stays a clean swipeable strip instead of stacking into a block.
   Excludes .customizer-top-nav, which already has its own deliberate wrap-based layout. */
@media (max-width: 767.98px) {
    .nav-tabs:not(.customizer-top-nav),
    .nav-pills:not(.customizer-top-nav) {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tabs:not(.customizer-top-nav) > *,
    .nav-pills:not(.customizer-top-nav) > * {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

/* Bumps icon-only/text-only .btn-link.p-0 controls (edit/delete/move icons etc.) up to the
   44px touch-target minimum on touch-primary devices – their zero padding otherwise leaves
   an effective hit area of only the icon's own 16-20px, well below the recommended minimum
   for a finger tap. */
@media (pointer: coarse) {
    .btn-link.p-0 {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .course-wishlist-btn {
        width: 2.75rem;
        height: 2.75rem;
    }

    .course-card--expanded > .course-wishlist-btn {
        top: 0.5rem;
    }

    .mp-cat-toggle,
    .mp-cat-toggle-spacer {
        width: 2.75rem;
        min-height: 2.75rem;
    }

    .mp-search-input,
    .mp-mobile-search {
        font-size: 1rem;
    }

    .input-group > .form-control.course-donation-input {
        font-size: 1rem;
    }
}


.account-required-backdrop {
    background: rgba(15, 23, 42, 0.45);
    overscroll-behavior: contain;
}

html:has(.account-required-backdrop),
html:has(.account-required-backdrop) body {
    overflow: hidden;
}

.account-required-backdrop .modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.account-required-icon {
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto 0.9rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--kurzola-primary, #22C55E);
    background: rgba(34, 197, 94, 0.12);
}

.course-card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .mp-open--left,
    .mp-open--right,
    .mp-open--left.is-closing,
    .mp-open--right.is-closing {
        animation: none;
    }
}

/* The opened card is the lector's own, so it fills the panel edge to edge and drops the border the
   panel already draws around it. */
.mp-expand-inner > .mp-card {
    border: none;
    border-radius: 0;
    height: 100%;
}

.mp-card-cta-secondary {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--kurzola-text-muted, #6b7280);
    text-decoration: underline;
    white-space: nowrap;
}

button.mp-card-cta {
    border: none;
    cursor: pointer;
}

button.mp-card-cta.is-outline {
    border: 1px solid var(--course-accent, #22C55E);
}

/* ---- the course card itself, laid out from the lector's rows ---- */

.mp-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

.mp-card-row {
    display: grid;
    grid-template-columns: repeat(var(--mp-cols, 1), minmax(0, 1fr));
    flex: 1 1 auto;
    min-height: 0;
}

.mp-card-cell {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.mp-card-cell-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.75rem 0.9rem;
    min-width: 0;
    overflow: hidden;
}

.mp-card-cover {
    height: 100%;
    margin: -0.75rem -0.9rem;
}

.mp-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-card-cover-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.mp-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.mp-card-header.is-centered {
    text-align: center;
}

.mp-card-header.is-centered .mp-card-byline {
    justify-content: center;
}

.mp-card-header.is-compact .mp-card-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 2;
}

.mp-card-byline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #4b5563;
    margin-top: 0.3rem;
    flex-wrap: wrap;
}

.mp-card-lector-photo {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    object-fit: cover;
}

.mp-card-rating {
    color: #f59e0b;
    font-weight: 600;
}

.mp-card-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4b5563;
    overflow: hidden;
}

.mp-card-desc p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mp-card-desc.is-card {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 0.6rem 0.7rem;
}

.mp-card-desc.is-minimal {
    font-size: 0.8rem;
}

.mp-card-reviews {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.mp-card-reviews.is-card {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 0.5rem 0.6rem;
}

.mp-card-stars {
    color: #f59e0b;
    letter-spacing: 0.05em;
}

.mp-card-muted {
    color: #9ca3af;
}

.mp-card-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.mp-card-actions.is-stacked {
    flex-direction: column;
    align-items: stretch;
}

.mp-card-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #111;
}

.mp-card-cta {
    background: var(--course-accent, #22C55E);
    color: #fff;
    border-radius: 0.5rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.mp-card-cta.is-outline {
    background: transparent;
    color: var(--course-accent, #22C55E);
    border: 1px solid var(--course-accent, #22C55E);
}

/* The opened card is drawn by CourseCardView, so this wrapper only has to give it the panel. */
.mp-expand-inner {
    height: 100%;
    min-height: 0;
}

.follow-lector-overlay {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 5;
}

.follow-lector-overlay--profile {
    top: 1rem;
    right: 1rem;
}

.price-info-toggle {
    display: inline-block;
    border: 0;
    background: none;
    padding: 0.5rem 0.35rem;
    margin: -0.5rem -0.2rem;
    font: inherit;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    vertical-align: baseline;
}

.price-info-toggle:focus-visible {
    outline: 2px solid var(--kurzola-primary, #22C55E);
    outline-offset: -0.3rem;
    border-radius: 0.35rem;
}

.mp-cover {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 0.75rem;
}

.mp-cover-std {
    width: 100%;
    height: 200px;
    margin-bottom: 1.25rem;
}

.mp-cover-hero {
    width: 100%;
    height: 240px;
    margin-bottom: 1.25rem;
}

.mp-course-inner > .mp-section-cover:first-child > .mp-cover-hero {
    width: calc(100% + 3rem);
    margin: -1.5rem -1.5rem 1.25rem;
    border-radius: 0;
}

.mp-hero .mp-cover-hero,
.mp-course-inner.mp-hero > .mp-section-cover:first-child > .mp-cover-hero {
    margin-bottom: 0;
}

.mp-cover-wide {
    width: 100%;
    height: 100%;
    min-height: 220px;
    border-radius: 0.75rem;
}

.mp-cover-sml {
    width: 100%;
    height: 112px;
    flex-shrink: 0;
}

.mp-compact-top > .mp-section-cover,
.mp-compact-top > .mp-course-block:has(.mp-section-cover) {
    flex: 0 0 clamp(8rem, 38%, 16rem);
}

.mp-type-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--course-accent);
    background: color-mix(in srgb, var(--course-accent) 12%, #fff);
    padding: 0.2rem 0.55rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.mp-title {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: #111827;
}

.mp-title-sm {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.mp-lector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mp-lector-photo,
.mp-lector-initial {
    width: var(--mp-photo-size, 2rem);
    height: var(--mp-photo-size, 2rem);
    max-width: var(--mp-photo-size, 2rem);
    max-height: var(--mp-photo-size, 2rem);
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--mp-photo-size, 2rem) * 0.42);
    font-weight: 700;
    flex-shrink: 0;
}

.mp-cover-video-wrap {
    overflow: hidden;
    position: relative;
    padding: 0;
}

.mp-cover-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #0a0a0a;
}

.mp-lector-name {
    font-size: 0.875rem;
    color: var(--kurzola-text-muted);
}

.mp-rating {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.mp-price {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.mp-price-box {
    border: 1px solid var(--kurzola-border, #0a0a0a);
    border-radius: 0.65rem;
    background: var(--kurzola-bg, #fff);
    overflow: hidden;
    margin-bottom: 1rem;
}

.mp-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.85rem;
}

.mp-price-row:last-child {
    border-bottom: none;
}

.mp-price-row-label {
    color: var(--kurzola-text-muted, #6b7280);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.mp-price-row-value {
    font-weight: 700;
    color: var(--kurzola-text, #0a0a0a);
}

.mp-price-was-value {
    text-decoration: line-through;
    color: var(--kurzola-text-muted, #6b7280);
    font-weight: 500;
}

.mp-price-row-now {
    background: color-mix(in srgb, var(--course-accent) 10%, #fff);
}

.mp-price-row-now .mp-price-row-value {
    color: var(--course-accent);
    font-size: 1.05rem;
}

.mp-price-info {
    cursor: help;
    font-size: 0.7rem;
}

.mp-desc {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.mp-desc--default {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
}

.mp-desc--card {
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.mp-desc-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mp-section-accent, var(--kurzola-text-muted));
    margin: 0 0 0.5rem;
}

.mp-desc-text {
    font-size: 0.925rem;
    line-height: 1.6;
    color: #374151;
    margin: 0;
    white-space: pre-wrap;
}

.mp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.mp-action-btn {
    padding: 0.45em 1.1em;
    line-height: 1.3;
}

.mp-reviews-preview {
    font-size: 0.85rem;
    padding: 0.65rem 0.85rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.mp-reviews-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.mp-reviews-stars {
    letter-spacing: 0.05em;
    line-height: 1;
}

.mp-reviews-samples {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.mp-review-sample {
    padding-top: 0.55rem;
    border-top: 1px solid #f3f4f6;
}

.mp-review-sample-stars {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.mp-review-sample-text {
    margin: 0;
    color: #4b5563;
    line-height: 1.45;
}

.mp-reviews-preview--row .mp-reviews-samples {
    display: none;
}

.mp-course-page--editor .mp-reviews-preview--row .mp-reviews-samples {
    display: flex;
}

.mp-reviews-preview--row .mp-reviews-samples .mp-review-sample:nth-child(n+2) {
    display: none;
}

.mp-course-block {
    margin: 0.15rem 0;
}

.mp-course-block--hidden {
    opacity: 0.72;
}

.mp-course-block-body {
    padding: 0.65rem 0.75rem 0.85rem;
}

.mp-section {
    width: 100%;
}

.mp-section-align-center {
    text-align: center;
}

.mp-section-align-center .mp-lector,
.mp-section-align-center .mp-actions {
    justify-content: center;
}

.mp-section-align-right {
    text-align: right;
}

.mp-section-align-right .mp-lector,
.mp-section-align-right .mp-actions {
    justify-content: flex-end;
}

.mp-section-header--centered .mp-lector {
    justify-content: center;
}

.mp-desc-minimal {
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

.mp-actions--stacked {
    flex-direction: column;
    align-items: stretch;
}

.mp-actions--stacked .btn {
    width: 100%;
}

.mp-reviews-preview--card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.mp-editor-section-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0.75rem;
    color: #6b7280;
    font-size: 0.78rem;
    text-align: center;
}

.mp-editor-theme-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.85rem;
    border: 1px dashed rgba(10, 10, 10, 0.14);
    border-radius: 0.5rem;
    background: rgba(10, 10, 10, 0.02);
    color: #6b7280;
    font-size: 0.78rem;
}

@media (max-width: 768px) {
    .mp-cover-wide {
        min-height: 160px;
    }

    .mp-compact-top > .mp-section-cover,
    .mp-compact-top > .mp-course-block:has(.mp-section-cover) {
        flex: none;
    }
}

@media (min-width: 768px) {
    .course-card--expanded .mp-card-row:first-child > .mp-card-cell:last-child > .mp-card-cell-inner:not(:has(> .mp-card-cover)) {
        padding-right: 7rem !important;
    }
}

@media (max-width: 900px) {
    .marketplace-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .marketplace-main {
        order: 1;
        width: 100%;
    }

    .mp-mobile-toolbar--filters {
        display: flex;
        margin-bottom: 0.65rem;
    }

    .mp-filters-backdrop {
        display: block;
        z-index: 2100;
        overscroll-behavior: contain;
    }

    .marketplace-sidebar {
        order: 2;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 2110;
        width: min(92vw, 320px);
        max-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        margin: 0;
        padding-top: calc(1rem + env(safe-area-inset-top));
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
        padding-left: calc(1rem + env(safe-area-inset-left));
        visibility: hidden;
        transform: translateX(-105%);
        transition: transform 0.28s ease, visibility 0s linear 0.28s;
        border-radius: 0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    }

    .marketplace-sidebar--open {
        visibility: visible;
        transform: translateX(0);
        transition: transform 0.28s ease, visibility 0s linear 0s;
    }

    html:has(.marketplace-sidebar--open),
    html:has(.marketplace-sidebar--open) body {
        overflow: hidden;
    }

    .mp-sidebar-mobile-head {
        display: flex;
    }

    .mp-sidebar-search {
        display: none;
    }

    .mp-sidebar-search + .mp-sidebar-block {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    .mp-sort-row {
        margin-top: 0;
    }

    .mp-course-grid {
        --mp-card-h: auto;
        --mp-cover-h: clamp(10rem, 45vw, 14rem);
        grid-template-columns: minmax(0, 1fr);
    }

    .mp-course-grid .course-meta {
        flex-wrap: wrap;
        gap: 0.25rem 1rem;
    }

    .mp-open--left,
    .mp-open--right,
    .mp-open--left.is-closing,
    .mp-open--right.is-closing,
    .mp-open--left .mp-expand-scale,
    .mp-open--right .mp-expand-scale,
    .mp-open--left.is-closing .mp-expand-scale,
    .mp-open--right.is-closing .mp-expand-scale {
        animation: none;
        transform: none;
    }

    .course-card--expanded {
        scroll-margin-top: 4.5rem;
    }

    .course-card--expanded .mp-card-cover {
        height: var(--mp-cover-h);
    }
}

@media (max-width: 767.98px) {
    .marketplace-page {
        padding: 0.75rem 0.65rem 2rem;
    }

    .marketplace-page-header {
        margin-bottom: 0.75rem;
    }

    .marketplace-title {
        font-size: 1.35rem;
    }

    .marketplace-lead--desktop {
        display: none;
    }

    .marketplace-lead--clamp {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.875rem;
    }

    .mp-sort-select {
        flex: 1 1 auto;
        min-width: 0;
    }

    .course-card,
    .course-card--expanded {
        height: auto;
    }

    .course-card--expanded .mp-card:not(.mp-card--editor) .mp-card-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .course-card--expanded .mp-card-row:first-child > .mp-card-cell:first-child > .mp-card-cell-inner:not(:has(> .mp-card-cover)) {
        padding-right: 7rem !important;
    }

    .marketplace-page .pagination {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
        margin-top: 1.5rem;
    }

    .marketplace-page .pagination .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }

    .course-overview-lector {
        margin-bottom: 0.5rem;
    }

    .course-overview-lector-photo,
    .course-overview-lector-initial {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }

    .course-overview-lector-name {
        font-size: 0.8rem;
    }

    .course-overview-meta {
        font-size: 0.75rem;
        margin-bottom: 0.35rem;
    }
}
