/*
 * Search result page (indexed_search): pagination as a row of boxes in the theme colour
 * (--sp-farbe from <Theme>/Css/form.css), like the buttons ".schaltflaeche" of the themes
 */
ul.tx-indexedsearch-browsebox {
    display: flex;
    flex-wrap: wrap;
    gap: .4em;
    margin: .75em 0 1.5em;
    padding: 0;
    list-style: none;
}

ul.tx-indexedsearch-browsebox li {
    margin: 0;
    padding: 0;
    list-style: none;
    background: none;
}

ul.tx-indexedsearch-browsebox li::before {
    content: none;
}

ul.tx-indexedsearch-browsebox a {
    display: inline-block;
    box-sizing: border-box;
    min-width: 2.4em;
    padding: .55em .75em;
    border: 1px solid var(--sp-farbe, #C31924);
    background: #fff;
    color: var(--sp-farbe, #C31924);
    line-height: 1;
    text-align: center;
    text-decoration: none;
}

ul.tx-indexedsearch-browsebox a:hover,
ul.tx-indexedsearch-browsebox a:focus-visible,
ul.tx-indexedsearch-browsebox a[aria-current="page"] {
    background: var(--sp-farbe, #C31924);
    color: #fff;
}

ul.tx-indexedsearch-browsebox a[aria-current="page"] {
    font-weight: bold;
    cursor: default;
}

ul.tx-indexedsearch-browsebox a:focus-visible {
    outline: 2px solid var(--sp-farbe, #C31924);
    outline-offset: 2px;
}

/*
 * Result list: long titles, file names and paths wrap instead of widening the page (horizontal scrolling on phones).
 * main.css sets the info line (size, dates, path) to display: flex without wrapping.
 */
.tx-indexedsearch-res .tx-indexedsearch-title,
.tx-indexedsearch-res .tx-indexedsearch-description {
    overflow-wrap: anywhere;
}

.tx-indexedsearch-res .tx-indexedsearch-info {
    flex-wrap: wrap;
    row-gap: .25em;
}

/* very long paths without break opportunity wrap instead of overflowing */
.tx-indexedsearch-res dd.tx-indexedsearch-text-item-path {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* phones: one row per entry (label | value) instead of a line that wraps between label and value */
@media only screen and (max-width: 600px) {
    .tx-indexedsearch-res .tx-indexedsearch-info {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: .5em;
        row-gap: 0;
    }

    .tx-indexedsearch-res .tx-indexedsearch-info dd {
        margin-right: 0;
    }
}
