/*
 * Album theme: results in a grid of images.
 * The styles of the records are in records.css.
 */
@import url("records.css");

/* Grid of cards: each card is the image with the caption below (only when
   the list has album entries; records in other formats keep the whole width) */
.results-container:has(.album-thumb, .album-placeholder) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

/* Messages and other elements of the list take the whole row */
.results-container:has(.album-thumb, .album-placeholder) > :not(.registro-item) {
    grid-column: 1 / -1;
}

/* Records of databases without the formats of this theme (integrated
   search) keep the whole width, in a row of their own */
.results-container:has(.album-thumb, .album-placeholder) > .registro-item:not(:has(.album-thumb, .album-placeholder)) {
    grid-column: 1 / -1;
}

.results-container:has(.album-thumb, .album-placeholder) .registro-item {
    margin-bottom: 0 !important;
    height: 100%;
}

.results-container:has(.album-thumb, .album-placeholder) .album-card .album-body {
    flex-direction: column;
    padding: 0;
    flex: 1;
}

.results-container:has(.album-thumb, .album-placeholder) .album-card .album-thumb {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 0;
}

.results-container:has(.album-thumb, .album-placeholder) .album-card .album-caption {
    padding: 0.6rem 0.75rem 0;
}

.results-container:has(.album-thumb, .album-placeholder) .album-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
