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;
}

/* Narrow screens: the floating label already names the field, a second right-aligned
   placeholder would overlap it, so the placeholder is hidden below the sm breakpoint. */
@media (max-width: 575.98px) {
    .form-floating > .form-control::placeholder,
    .form-floating > .form-control:focus::placeholder,
    .form-floating > .form-control-plaintext::placeholder {
        color: transparent;
    }
}

.slot-user {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2rem;
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--bs-body-color);
}

.slot-user-name {
    min-width: 0;
    display: flex;
    gap: .3em;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
}

/* First name is never cut; the last name is shortened with an ellipsis when too long. */
.slot-first {
    flex: 0 0 auto;
    white-space: nowrap;
}

.slot-last {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.slot-user-empty {
    color: var(--bs-tertiary-color);
    font-style: italic;
}

.slot-user-mine {
    color: var(--bs-primary);
    font-weight: 600;
    cursor: pointer;
}

.slot-phone {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--bs-primary);
    cursor: pointer;
}

.slot-phone:hover,
.slot-phone:focus-visible {
    background: var(--bs-primary-bg-subtle);
}

/* Route cards: stronger shadow than Bootstrap's shadow-sm */
.route-card {
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .18), 0 .125rem .375rem rgba(0, 0, 0, .12);
}

/* Space below the last element so it never touches the screen edge (mobile browser bars, notches) */
.bottom-gap {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

/* My bookings: small muted section label above the participant rows. */
.my-booking-label {
    margin-bottom: .25rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

/* Slot booking rows (day view) */
.slot-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.slot-item {
    padding: .75rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--bs-box-shadow-sm);
}

.slot-time {
    flex: 0 0 auto;
    margin-right: .5rem; /* adds to the row gap for more space before the names */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    white-space: nowrap;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.25;
}

.slot-time-dash {
    align-self: center;
}

.slot-users {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .25rem;
}

.slot-add {
    display: flex;
    align-items: center;
}

.slot-add-button {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 0;
    color: #fff;
}

/* Inactive: grey and no solid fill */
.slot-add-button:disabled {
    background: transparent;
    border-color: var(--bs-border-color);
    color: var(--bs-secondary-color);
    opacity: .6;
}

/* Slot where the caller is already booked on another route: greyed out, names stay readable. */
.slot-conflict > .d-flex {
    opacity: .5;
    pointer-events: none;
}

.slot-blocked {
    display: flex;
    align-items: center;
    padding: .5rem .75rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}

/* Route + current day stay visible while scrolling the slot list */
.slot-sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: .75rem;
    padding: .5rem 0;
    text-align: center;
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

/* On wider screens the layout's top row is sticky (3.5rem), so sit below it */
@media (min-width: 641px) {
    .slot-sticky {
        top: 3.5rem;
    }
}

/* Route notifications inside the sticky block: compact, left-aligned, and capped in height
   (scrolls on its own) so many or long notices never push the slot list off small screens. */
.slot-sticky-notifications {
    max-height: 30vh;
    overflow-y: auto;
    text-align: left;
    overscroll-behavior: contain;
}

.slot-sticky-notifications .alert {
    margin-bottom: .5rem;
    padding: .5rem .75rem;
    font-size: .9rem;
}

.slot-sticky-notifications .alert:last-child {
    margin-bottom: 0;
}

/* Evaluation page (/admin/auswertung). */
.kpi-tile {
    height: 100%;
    padding: .75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-body-bg);
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.kpi-label {
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

/* Chart.js needs a sized, relatively positioned parent when maintainAspectRatio is off. */
.chart-box {
    position: relative;
    width: 100%;
}

/* Heatmap: seven steps of one blue ramp (dataviz reference palette), light = low occupancy.
   The value stays printed in every cell, so the color is never the only carrier. */
.heatmap td {
    min-width: 3.5rem;
    font-variant-numeric: tabular-nums;
}

.heatmap .heat-none { background: #f1f1ef; color: #8a8984; }
.heatmap .heat-0 { background: #cde2fb; color: #0b0b0b; }
.heatmap .heat-1 { background: #b7d3f6; color: #0b0b0b; }
.heatmap .heat-2 { background: #9ec5f4; color: #0b0b0b; }
.heatmap .heat-3 { background: #6da7ec; color: #0b0b0b; }
.heatmap .heat-4 { background: #3987e5; color: #ffffff; }
.heatmap .heat-5 { background: #256abf; color: #ffffff; }
.heatmap .heat-6 { background: #184f95; color: #ffffff; }

/* App name in the navbar until there is a logo: icon on the left, name on two lines.
   Font family, weight and letter spacing are inherited from .navbar-brand. */
.app-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.app-brand-icon {
    font-size: 2rem;
    line-height: 1;
}

.app-brand-name {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.1;
}
