/* Site-wide styles. Bootstrap 5 provides the base; this file only adds what
   it doesn't, so pages share the same colours and spacing. */

:root {
    --sg-brand: #2c6d9b;
    --sg-link: #2b78bd;
    --sg-link-hover: #1f5a8f;
}

/* Links (not navbar links, buttons or pagination) */
main a:not(.btn):not(.page-link),
footer a {
    color: var(--sg-link);
    text-decoration: none;
}

main a:not(.btn):not(.page-link):hover,
footer a:hover {
    color: var(--sg-link-hover);
    text-decoration: underline;
}

/* Navbar */
.navbar-brand-bg {
    background-color: var(--sg-brand);
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
    color: #fff;
}

/* Page headings: the same size and spacing on every page */
.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--bs-secondary-color);
    margin-bottom: 1.5rem;
}

.page-title + :not(.page-subtitle) {
    margin-top: 1rem;
}

/* Home page intro, kept to a readable width */
.home-intro {
    max-width: 48rem;
}

/* Section headings within a page */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

/* Tables: white panel with a border, slightly smaller text on phones */
.table-container .table-responsive {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

.table-container .table {
    margin-bottom: 0;
}

/* Let long unbroken words (e.g. chemical gene names) wrap instead of
   stretching the table */
.table-container td {
    overflow-wrap: anywhere;
}

.table-container th a {
    color: inherit;
}

/* Arrow on the column the table is sorted by */
.table-container th.asc a::after {
    content: " ▲";
    font-size: 0.7em;
}

.table-container th.desc a::after {
    content: " ▼";
    font-size: 0.7em;
}

@media (max-width: 575.98px) {
    .table-container .table {
        font-size: 0.875rem;
    }
}

/* Search box above the AJAX study table */
.input-group-navbar {
    margin-bottom: 1rem;
}

/* Narrow "Remove" checkbox column on the Gene Search page */
.col-remove {
    width: 5rem;
}

/* Space between stacked cards */
.card + .card {
    margin-top: 1rem;
}

.dotted-divider {
    border-top-style: dotted;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
}

/* Gene page details: labels and values in two columns */
.gene-details {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    column-gap: 1rem;
    row-gap: 0.35rem;
}

.gene-details dt {
    font-weight: 600;
}

.gene-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}
