.portal-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.portal-file-gallery {
    width: 100%;
}

.portal-file-gallery__filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 30px 0 40px;
}

.portal-file-gallery__filter input,
.portal-file-gallery__filter select,
.portal-file-gallery__filter button {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    border-radius: 0;
}

.portal-file-gallery__filter input,
.portal-file-gallery__filter select {
    padding: 8px 12px;
    border: 1px solid #d7d7d7;
    background: #fff;
    color: inherit;
}

.portal-file-gallery__search,
.portal-file-gallery__load-more {
    padding: 10px 22px;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.portal-file-gallery__search:hover,
.portal-file-gallery__search:focus-visible,
.portal-file-gallery__load-more:hover,
.portal-file-gallery__load-more:focus-visible {
    text-decoration: underline;
}

.portal-file-gallery__list {
    transition: opacity 180ms ease;
}

.portal-file-gallery--loading .portal-file-gallery__list {
    opacity: .45;
    pointer-events: none;
}

.portal-file-gallery__item {
    width: 100%;
    margin-top: 10px;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    background: #fff;
    transition: border-color 180ms ease;
}

.portal-file-gallery__item:first-child {
    margin-top: 0;
}

.portal-file-gallery__item:hover,
.portal-file-gallery__item:focus-within {
    border-bottom-color: currentColor;
}

.portal-file-gallery__item-link {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    color: inherit;
    text-decoration: none;
}

.portal-file-gallery__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-file-gallery__icon svg {
    width: 24px;
    height: 24px;
}

.portal-file-gallery__title {
    min-width: 0;
}

.portal-file-gallery__date {
    white-space: nowrap;
    text-align: right;
}

.portal-file-gallery__no-results {
    margin-top: 30px;
}

.portal-file-gallery__actions {
    margin-top: 30px;
}

.portal-file-gallery__load-more[hidden],
.portal-file-gallery__no-results[hidden] {
    display: none !important;
}

@media (min-width: 768px) {
    .portal-file-gallery__filters {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .portal-file-gallery__filter--keyword {
        grid-column: 1 / -1;
    }
}

@media (min-width: 981px) {
    .portal-file-gallery__filters {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 14px 20px;
        margin-top: 50px;
    }
}

@media (max-width: 600px) {
    .portal-file-gallery__item-link {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .portal-file-gallery__date {
        grid-column: 2;
        text-align: left;
    }
}
