html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ----- Admin screens ----- */

.stat-tile {
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    padding: .75rem 1rem;
    min-width: 9rem;
}

    .stat-tile .value {
        font-size: 1.5rem;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
    }

    .stat-tile .label {
        color: var(--bs-secondary-color);
        font-size: .85rem;
    }

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Visits per day on the traffic overview: one thin bar a day, rising from the baseline, with its numbers on hover. */
.traffic-bars {
    display: flex;
    align-items: stretch;
    gap: 2px;
    height: 10rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.traffic-bar {
    flex: 1 1 0;
    min-width: 0;
    max-width: 2.5rem;
    display: flex;
    align-items: flex-end;
}

    .traffic-bar:hover {
        background: var(--bs-tertiary-bg);
    }

    .traffic-bar > div {
        width: 100%;
        background: var(--bs-primary);
        border-radius: 4px 4px 0 0;
    }

/* Referrals per site: one row per site, its name, a bar across and the count; each opens that site's visits. */
.referrer-bars {
    display: grid;
    gap: 2px;
    max-width: 48rem;
}

.referrer-bar {
    display: grid;
    grid-template-columns: minmax(6rem, 14rem) 1fr 4rem;
    align-items: center;
    gap: .75rem;
    padding: .125rem .25rem;
    color: inherit;
    text-decoration: none;
    border-radius: 4px;
}

    .referrer-bar:hover {
        background: var(--bs-tertiary-bg);
    }

.referrer-bar-track {
    height: 1.125rem;
}

.referrer-bar-fill {
    display: block;
    height: 100%;
    background: var(--bs-primary);
    border-radius: 0 4px 4px 0;
}

.referrer-bar-count {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* API calls by endpoint: a group per endpoint, a bar per site in the site's colour, a gap between groups. */
.api-bars {
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: .25rem;
}

.api-group {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    min-width: 4rem;
}

.api-group-bars {
    display: flex;
    justify-content: center;
    gap: 2px;
    height: 13rem;
    border-bottom: 1px solid var(--bs-border-color);
}

/* The count sits above its bar, in the padding, so it never shortens the bar. */
.api-bar {
    width: 1.75rem;
    padding-top: 1rem;
    display: flex;
    align-items: flex-end;
}

    .api-bar:hover {
        background: var(--bs-tertiary-bg);
    }

.api-bar-count {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: .6875rem;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.api-bar-fill {
    position: relative;
    width: 100%;
    border-radius: 4px 4px 0 0;
}

.api-group-name {
    margin-top: .25rem;
    font-size: .75rem;
    text-align: center;
    max-width: 10rem;
    overflow-wrap: anywhere;
    align-self: center;
}

.api-swatch {
    display: inline-block;
    width: .75rem;
    height: .75rem;
    margin-right: .375rem;
    border-radius: 2px;
    vertical-align: -1px;
}

/* Requests per status code: one bar per code, its count on top and the code below; each opens those requests. */
.status-bars {
    display: flex;
    align-items: stretch;
    gap: .5rem;
    height: 14rem;
    overflow-x: auto;
}

.status-bar {
    flex: 0 0 3rem;
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

    .status-bar:hover {
        background: var(--bs-tertiary-bg);
    }

.status-bar-track {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    border-bottom: 1px solid var(--bs-border-color);
}

.status-bar-count {
    font-size: .75rem;
    color: var(--bs-secondary-color);
}

.status-bar-fill {
    width: 75%;
    border-radius: 4px 4px 0 0;
}

.status-bar-code {
    text-align: center;
    font-size: .875rem;
    font-variant-numeric: tabular-nums;
}

.status-swatch {
    display: inline-block;
    width: .75rem;
    height: .75rem;
    margin-right: .25rem;
    border-radius: 2px;
}

/* Requests over time: one column per slice, its classes of status code stacked from the baseline, 2xx at the bottom,
   with a thin gap between segments and the top one rounded. Each column opens its requests. */
.timeline-chart {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .5rem;
}

.timeline-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
    height: 16rem;
    font-variant-numeric: tabular-nums;
}

.timeline-plot {
    min-width: 0;
}

.timeline-bars {
    display: flex;
    align-items: stretch;
    gap: 1px;
    height: 16rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--bs-border-color-translucent) calc(25% - 1px) 25%);
}

.timeline-bar {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column-reverse;
    gap: 2px;
}

    a.timeline-bar:hover {
        background: var(--bs-tertiary-bg);
    }

    .timeline-bar > span {
        flex: none;
        min-height: 1px;
    }

        .timeline-bar > span:last-child {
            border-radius: 3px 3px 0 0;
        }

.timeline-axis {
    position: relative;
    height: 1.5rem;
    white-space: nowrap;
}

    .timeline-axis > span {
        position: absolute;
        top: .25rem;
    }

/* Requests per browser: a row per browser, its label, a bar split into people (solid), search engines (lighter) and
   other bots (striped, so colour isn't the only sign), and the count. Each row opens that browser's requests. */
.browser-chart {
    display: grid;
    gap: 4px;
}

.browser-chart-row {
    display: grid;
    grid-template-columns: minmax(8rem, 22rem) 1fr 4.5rem;
    align-items: center;
    gap: .5rem;
    color: inherit;
    text-decoration: none;
    font-size: .875rem;
}

    .browser-chart-row:hover {
        background: var(--bs-tertiary-bg);
    }

.browser-chart-track {
    display: flex;
    gap: 2px;
    height: 1rem;
}

    .browser-chart-track > span {
        min-width: 3px;
    }

        .browser-chart-track > span:last-child {
            border-radius: 0 3px 3px 0;
        }

.browser-chart-count {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.browser-people {
    background: var(--bs-primary);
}

.browser-search {
    background: rgba(var(--bs-primary-rgb), .45);
}

.browser-bots {
    background: repeating-linear-gradient(135deg, var(--bs-primary) 0 3px, transparent 3px 6px);
    box-shadow: inset 0 0 0 1px var(--bs-primary);
}

.browser-swatch {
    display: inline-block;
    width: 1.5rem;
    height: .75rem;
    margin-right: .35rem;
    vertical-align: middle;
    border-radius: 2px;
}

@media (max-width: 576px) {
    .browser-chart-row {
        grid-template-columns: 1fr 4rem;
    }

    .browser-chart-label {
        grid-column: 1 / -1;
    }
}

/* Inline bar behind a count: width is set per row as a percentage of the largest value. */
.bar-cell {
    position: relative;
    min-width: 8rem;
}

    .bar-cell .bar {
        position: absolute;
        inset: 20% auto 20% 0;
        background: #cfe2ff;
        border-radius: 2px;
    }

    .bar-cell span {
        position: relative;
    }

.table-sm td, .table-sm th {
    vertical-align: middle;
}

/* The Server screen's history (LineChart): one measure per chart, a 2px line, recessive grid. */
.line-chart svg {
    display: block;
    width: 100%;
    height: 110px;
}

.line-chart-line {
    fill: none;
    stroke: var(--bs-primary);
    stroke-width: 2px;
    stroke-linejoin: round;
}

.line-chart-band {
    fill: var(--bs-primary);
    opacity: .15;
}

.line-chart-grid {
    stroke: var(--bs-border-color-translucent);
    stroke-width: 1px;
    vector-effect: non-scaling-stroke;
}

.line-chart-axis {
    stroke: var(--bs-border-color);
    stroke-width: 1px;
    vector-effect: non-scaling-stroke;
}

.line-chart-hit {
    fill: transparent;
}

    .line-chart-hit:hover {
        fill: var(--bs-primary);
        fill-opacity: .08;
    }
