.pagecreator_materiallist .materiallist {
    display: block;
    width: 100%;
}

.pagecreator_materiallist__headline {
    margin: 0 0 1rem;
}

.materiallist__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.materiallist__search {
    flex: 1 1 18rem;
    min-width: 0;
    display: flex;
}

.materiallist__search-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #bfcada;
    border-radius: 0.25rem;
    font: inherit;
    background: #fff;
}

.materiallist__search-input:focus {
    outline: 2px solid #0085c7;
    outline-offset: 1px;
    border-color: #0085c7;
}

.materiallist__summary {
    color: #5b6a82;
    font-size: 0.9rem;
}

.materiallist__reset {
    appearance: none;
    background: transparent;
    border: 1px solid #bfcada;
    padding: 0.45rem 0.8rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font: inherit;
    color: #162441;
}

.materiallist__reset:hover {
    background: #f1f5fb;
}

.materiallist__layout {
    display: grid;
    grid-template-columns: minmax(16rem, 20rem) 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 47.9375em) {
    .materiallist__layout {
        grid-template-columns: 1fr;
    }
}

.materiallist__filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f5f8fd;
    border: 1px solid #e0e7f3;
    border-radius: 0.5rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

@media (max-width: 47.9375em) {
    .materiallist__filters {
        position: static;
        max-height: none;
    }
}

.materiallist__filters-status,
.materiallist__filters-empty {
    color: #5b6a82;
    font-size: 0.9rem;
    margin: 0;
}

.materiallist__facet {
    border-bottom: 1px solid #e0e7f3;
    padding-bottom: 0.5rem;
}

.materiallist__facet:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.materiallist__facet-summary {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.35rem 0;
    font-weight: 600;
    color: #162441;
    list-style: none;
}

.materiallist__facet-summary::-webkit-details-marker {
    display: none;
}

.materiallist__facet-summary::before {
    content: '›';
    display: inline-block;
    transform: rotate(0deg);
    transition: transform 0.15s ease;
    color: #5b6a82;
    font-size: 1rem;
    line-height: 1;
}

.materiallist__facet[open] > .materiallist__facet-summary::before {
    transform: rotate(90deg);
}

.materiallist__facet-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0 0.4rem;
    height: 1.25rem;
    background: #0085c7;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
}

.materiallist__facet-list {
    list-style: none;
    padding: 0.25rem 0 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.materiallist__facet-item {
    padding: 0;
}

.materiallist__facet-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0.1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #162441;
    border-radius: 0.2rem;
}

.materiallist__facet-option:hover {
    background: #eaf1fa;
}

.materiallist__facet-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.materiallist__facet-count {
    color: #7b8aa3;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.materiallist__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.materiallist__chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #e5f2fb;
    color: #0d2d71;
    border: 1px solid #b6d8ec;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
    font: inherit;
    cursor: pointer;
}

.materiallist__chip:hover {
    background: #d2e7f5;
}

.materiallist__chip-x {
    font-size: 1rem;
    line-height: 1;
    color: #0085c7;
}

.materiallist__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1rem;
}

.materiallist__loading,
.materiallist__empty,
.materiallist__error {
    grid-column: 1 / -1;
    text-align: center;
    color: #5b6a82;
    padding: 2rem 1rem;
    margin: 0;
}

.materiallist__error {
    color: #b02a2a;
}

.materiallist__card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e0e7f3;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(13, 45, 113, 0.04);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.materiallist__card:hover {
    box-shadow: 0 4px 12px rgba(13, 45, 113, 0.08);
    transform: translateY(-1px);
}

.materiallist__card-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
}

.materiallist__card-title a {
    color: #0d2d71;
    text-decoration: none;
}

.materiallist__card-title a:hover,
.materiallist__card-title a:focus {
    text-decoration: underline;
}

.materiallist__card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.materiallist__card-chip {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 999px;
    background: #eef3fa;
    color: #162441;
    border: 1px solid #d8e2ef;
}

.materiallist__card-chip--type {
    background: #e5f7fe;
    border-color: #bde4f6;
    color: #0d2d71;
}

.materiallist__card-chip--level {
    background: #fef5e2;
    border-color: #f2dea5;
    color: #5b3e00;
}

.materiallist__card-chip--lang {
    background: #eaf7ee;
    border-color: #c2e5cc;
    color: #0f4f21;
    text-transform: uppercase;
    font-weight: 600;
}

.materiallist__card-chip--self {
    background: #fbe8f2;
    border-color: #f0c2d8;
    color: #7a1347;
}

.materiallist__card-desc {
    margin: 0;
    color: #3a4a64;
    font-size: 0.9rem;
    line-height: 1.45;
}

.materiallist__card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #5b6a82;
}

.materiallist__card-authors {
    font-weight: 500;
    color: #162441;
}

.materiallist__card-duration::before {
    content: '⏱ ';
}

.materiallist__card-sub {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
    color: #7b8aa3;
    margin-top: auto;
}
