/* The public research search: the search page, a researcher and a department. */
.rdb-search {
    --rdb-blue: #01509f;
    --rdb-line: #e3e6ea;
    --rdb-soft: #f4f6f8;
    --rdb-muted: #5b6470;
    max-width: 60rem;
    margin: 0 auto;
    padding-bottom: 4rem;
}

.rdb-search h1 {
    margin: 0.5rem 0 0.75rem;
}

.rdb-search__intro {
    font-size: 1.1rem;
    color: var(--rdb-muted);
    margin-bottom: 2rem;
}

.rdb-search__heading {
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rdb-line);
}

.rdb-search__count {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.5rem;
    border-radius: 1rem;
    background: var(--rdb-soft);
    color: var(--rdb-muted);
    font-size: 0.8rem;
    font-weight: normal;
    vertical-align: middle;
}

.rdb-search__empty {
    color: var(--rdb-muted);
}

/* the name search */
.rdb-search__form {
    padding: 1.5rem;
    background: var(--rdb-soft);
    border: 1px solid var(--rdb-line);
}

.rdb-search__form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.rdb-search__form-row {
    display: flex;
    gap: 0.75rem;
}

.rdb-search__form input[type="search"] {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #b9c0c8;
    background: #fff;
}

.rdb-search__form input[type="search"]:focus {
    outline: 2px solid var(--rdb-blue);
    outline-offset: -1px;
}

.rdb-search__form button {
    margin: 0 !important;
}

/* researcher cards, in search results and a department's list */
.rdb-search__people {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 0.75rem;
}

.rdb-search__person a {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    border: 1px solid var(--rdb-line);
    color: inherit;
    text-decoration: none;
    background: #fff;
}

.rdb-search__person a:hover,
.rdb-search__person a:focus {
    border-color: var(--rdb-blue);
    box-shadow: 0 1px 4px rgba(1, 80, 159, 0.15);
}

.rdb-search__person-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.9rem;
    line-height: 1.3;
}

.rdb-search__person-text strong {
    color: var(--rdb-blue);
    font-size: 1rem;
}

.rdb-search__person-text .rdb-search__count {
    margin: 0.2rem 0 0;
    align-self: flex-start;
}

.rdb-search__photo img {
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

/* departments to browse */
.rdb-search__departments {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2 18rem;
    column-gap: 2rem;
}

.rdb-search__departments li {
    break-inside: avoid;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--rdb-line);
}

/* a researcher's page */
.rdb-search__back {
    margin: 1.5rem 0 0;
    font-size: 0.9rem;
}

.rdb-search__profile {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin: 1rem 0 1.5rem;
}

.rdb-search__profile h1 {
    margin: 0 0 0.25rem;
}

.rdb-search__profile p {
    margin: 0 0 0.2rem;
}

.rdb-search__role {
    font-weight: bold;
}

.rdb-search__contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin-top: 0.5rem !important;
}

.rdb-search__bio {
    max-width: 45rem;
}

/* a department's researchers, folded away so the outputs come first */
.rdb-search__team summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--rdb-blue);
    padding: 0.5rem 0;
}

.rdb-search__team .rdb-search__people {
    margin-top: 0.75rem;
}

/* outputs, grouped by type */
.rdb-search__types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.rdb-search__types a {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--rdb-line);
    border-radius: 2rem;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

.rdb-search__types a:hover,
.rdb-search__types a:focus {
    border-color: var(--rdb-blue);
}

.rdb-search__types .rdb-search__count {
    margin-left: 0.2rem;
    padding: 0 0.4rem;
}

.rdb-search__type {
    scroll-margin-top: 6rem;
}

.rdb-search__type h3 {
    margin: 2rem 0 0.5rem;
}

.rdb-search__outputs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rdb-search__output {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--rdb-line);
}

.rdb-search__output p {
    margin: 0;
}

.rdb-search__authors {
    font-weight: bold;
}

.rdb-search__links,
.rdb-search__by {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 1rem;
    margin-top: 0.4rem !important;
    font-size: 0.85rem;
}

.rdb-search__links a {
    overflow-wrap: anywhere;
}

.rdb-search__by {
    color: var(--rdb-muted);
}

@media (max-width: 600px) {
    .rdb-search {
        padding-left: 1.4rem;
        padding-right: 1.4rem;
    }

    .rdb-search__photo--large img {
        width: 88px;
        height: 88px;
    }

    .rdb-search__form-row,
    .rdb-search__profile {
        flex-direction: column;
        align-items: stretch;
    }

    .rdb-search__profile {
        align-items: flex-start;
    }
}
