.search-results {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--container-width-small);
}

.search-result {
    background-color: var(--search-result-background);
    padding: 10px;
    border-top: 1px solid var(--search-result-border);
}

.search-result:hover {
    background-color: var(--search-result-background-hover);
}

summary {
    margin: 0 auto;
    margin-bottom: .1rem;
    /*
    box-shadow: 0 .1rem 1rem -.5rem rgba(0, 0, 0, 0.1);
    
    border-radius: 0.2px;
    */
    padding: 0.4em;
    margin-left: 0.2rem;
}

details>summary.inactive {
    list-style: none;
    cursor: unset;
}

.facets details {
    border-radius: 5px;
    box-shadow: var(--box-shadow);
}

.facets ul {
    font-size: 1.05rem;
    list-style: none;
    padding-left: 0;
    margin-top: 0;
}

.facets ul li {
    margin-left: 5px;
}

.facets ul li ul {
    margin-left: 10px;
}

.facets-filters ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.pagination-total {
    font-weight: 600;
    color: var(--text-bright);
    background-color: var(--background-body);
    padding: 5px 0;
}

#q,
#submit {
    display: inline-block;
}

.from-year,
.to-year {
    width: 60px;
    display: inline-block;
}

.from-month,
.to-month,
.from-day,
.to-day {
    width: 50px;
    display: inline-block;
}

.search-form {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.search-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    align-self: flex-end;
    flex-wrap: wrap;
}

.search-citation {
    background-color: var(--highlight);
    display: inline-block;
}

.search-synonym {
    font-style: italic;
    color: var(--text-muted);
}

.search-option,
.search-button {
    margin-right: 10px;
}

.search-link {
    color: var(--search-link-text);
    display: flex;
}

.search-link:hover {
    text-decoration: none;
}

.search-thumbnail {
    margin-right: 10px;
    margin-top: 10px;
}


.search-thumbnail img {
    min-width: 120px;
    height: auto;
    width: 120px;
    max-height: 120px;
    object-fit: contain;
}

.search-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-summary {
    color: var(--links);
    max-width: var(--text-max-width);
}

.search-icon {
    display: inline-block;
    vertical-align: middle;
}

.search-summary:first-of-type {
    font-weight: 600;
}

/**
 * Override of the general record.css 
 */
.search-results .record-content {
    margin-bottom: unset;
    /* font-size: 0.97rem; */
}

.search-results .record-content>.label {
    width: 8rem;
    min-width: 8rem;
}

.search-results .record-content>.content>p {
    margin-bottom: unset;
}

/**
 * Search suggestions
 */
.search-suggestions {
    position: absolute;
    background-color: var(--background);
    display: none;
    padding: 5px;
    width: 295px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}


.search-suggestion-item,
.search-suggestion-info {
    flex: 2;
    padding: 5px;
    border-bottom: 1px solid var(--border)
}

.search-suggestion-focus {
    background-color: var(--background-body);
}

.search-suggestion-item:hover {
    cursor: pointer;
    background-color: var(--background-body);
}

/**
 * gallery view
 */

.search-results-gallery {
    column-count: 4;
    column-gap: 20px;
    margin-top: 20px;
}

.search-result-gallery {
    border-radius: 5px;
    break-inside: avoid;
    margin-bottom: 20px;
    background: var(--search-result-background);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.search-result-gallery:hover {
    background-color: var(--search-result-background-hover);
}

a.search-link-gallery {
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
}

.search-link-gallery {
    margin-top: 10px;
}


.search-summary-gallery {
    text-decoration: none;
}

.search-result-date-gallery {
    font-weight: 600;
    margin-top: 10px;
}

.facets-toggle-container {
    display: none;
}

@media (max-width: 1200px) {
    .search-results-gallery {
        column-count: 3;
    }
}

@media (max-width: 992px) {
    .search-results-gallery {
        column-count: 2;
    }

    .facets-toggle-container {
        display: block;
    }
}

@media (max-width: 576px) {
    .search-results-gallery {
        column-count: 1;
    }

    .search-link {
        flex-flow: column;
    }
}

.search-portrait-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.search-date-form {
    padding: 20px 20px;
}