/* Portal-only adaptation for three price lines and real category controls. */
html[data-portal-media] .ml-member-prices { min-width: 0; font-size: 12px; }
html[data-portal-media] .ml-member-prices span { white-space: nowrap; }
html[data-portal-media] .ml-member-prices a { color: inherit; text-decoration: underline; }
html[data-portal-media] .portal-media-status { padding: 24px 16px; text-align: center; }
html[data-portal-media] .portal-media-status button { margin-left: 12px; }
html[data-portal-media] .ml-media-name a { color: inherit; font-weight: 700; }
html[data-portal-media] .ml-media-name a,
html[data-portal-media] .ml-media-name strong { font-size: 14px; }
html[data-portal-media] .web-filter-row > div { min-width: 0; }
html[data-portal-media] .web-filter-row select { max-width: 100%; }
html[data-portal-media] .web-resource-toolbar > .orders-select {
    box-sizing: border-box;
    min-width: calc(4em + 32px);
    padding-left: 8px;
    padding-right: 22px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23526582' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px 6px;
}
html[data-portal-media] .web-resource-toolbar > .orders-select option[hidden] { display: none; }

/* Shared label and group columns keep every first option on the same grid. */
html[data-portal-media] .web-filter-menu {
    --portal-filter-label-width: 160px;
    --portal-filter-column-gap: 18px;
}
html[data-portal-media] .web-filter-menu .web-filter-row,
html[data-portal-media] .web-filter-menu .web-filter-row-multi section:nth-child(n) {
    grid-template-columns: var(--portal-filter-label-width) minmax(0, 1fr) !important;
    column-gap: var(--portal-filter-column-gap) !important;
}
html[data-portal-media] .web-filter-menu .web-filter-row strong { white-space: normal; }
html[data-portal-media] .web-filter-menu .web-filter-row-multi {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding: 0 !important;
}
html[data-portal-media] .web-filter-menu .web-filter-row-multi section:nth-child(n) {
    display: grid;
    align-items: start;
    min-width: 0;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(175, 209, 255, .58);
}
html[data-portal-media] .web-filter-menu .web-filter-row-multi section:nth-child(2n + 1):nth-last-child(2),
html[data-portal-media] .web-filter-menu .web-filter-row-multi section:last-child { border-bottom: 0; }
html[data-portal-media] .web-filter-menu .web-filter-row-multi section:nth-child(n) > div {
    min-width: 0;
    flex-wrap: wrap;
}
@media (max-width: 1100px) {
    html[data-portal-media] .web-filter-menu .web-filter-row-multi { grid-template-columns: minmax(0, 1fr) !important; }
    html[data-portal-media] .web-filter-menu .web-filter-row-multi section:nth-child(n) {
        border-bottom: 1px solid rgba(175, 209, 255, .58);
    }
    html[data-portal-media] .web-filter-menu .web-filter-row-multi section:last-child { border-bottom: 0; }
}
@media (max-width: 768px) {
    html[data-portal-media] .web-filter-menu { --portal-filter-label-width: 120px; --portal-filter-column-gap: 8px; }
    html[data-portal-media] .web-filter-menu .web-filter-row-multi section:nth-child(n) { padding: 12px; }
}

html[data-portal-media] .ml-media-row {
    box-sizing: border-box;
    height: 96px;
    min-height: 96px;
    max-height: 96px;
    align-items: center;
}
html[data-portal-media] .ml-media-row > *,
html[data-portal-media] .ml-media-info,
html[data-portal-media] .ml-media-name { min-width: 0; min-height: 0; }
html[data-portal-media] .ml-media-name a,
html[data-portal-media] .ml-media-name strong,
html[data-portal-media] .ml-resource-note {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 20px;
    max-height: 40px;
}
html[data-portal-media] .ml-resource-note { -webkit-line-clamp: 3; max-height: 60px; margin: 0; }
html[data-portal-media] .ml-media-row > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
@media (max-width: 768px) {
    html[data-portal-media] .ml-media-row { height: 280px; min-height: 280px; max-height: 280px; }
    html[data-portal-media] .ml-resource-note { line-height: 20px !important; max-height: 60px !important; }
}
