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;
}

/* ── Home ATC toolbar grid ── */
.atc-toolbar-grid {
    --atc-cell-h: 36px;
    --atc-gap: 6px;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-auto-rows: var(--atc-cell-h);
    gap: var(--atc-gap);
    width: 100%;
}

.atc-toolbar-cell {
    display: flex;
    align-items: stretch;
}

.atc-toolbar-cell > * {
    width: 100%;
}

.atc-span-2 { grid-column: span 2; }
.atc-span-3 { grid-column: span 3; }

.atc-toolbar-cell .mud-button-group-root {
    height: 100%;
    min-height: var(--atc-cell-h);
    align-items: stretch;
    width: 100%;
    margin: 0;
}

.atc-toolbar-cell .mud-button-group-root .mud-button-root {
    height: 100%;
    flex: 1;
    min-width: 0;
}

.atc-toolbar-cell .mud-input-control {
    height: var(--atc-cell-h);
    min-height: var(--atc-cell-h);
    margin-top: 0;
    margin-bottom: 0;
}

.atc-toolbar-cell .mud-input-outlined-input {
    height: var(--atc-cell-h);
    padding-top: 0;
    padding-bottom: 0;
}

.atc-toolbar-cell .mud-input-label-outlined {
    top: 8px;
}
.flag-review-main-table .col-narrow {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
}

.flag-review-main-table .mud-icon-button {
    padding: 2px;
    width: 24px;
    height: 24px;
}

/* ── FlagReviewDialog table ── */
.flag-review-table th,
.flag-review-table .mud-table-head .mud-table-cell {
    font-weight: 700;
}

.flag-review-table,
.flag-review-table th,
.flag-review-table td,
.flag-review-table .mud-table-head .mud-table-cell,
.flag-review-table .mud-table-body .mud-table-cell {
    font-family: 'Arial Narrow', 'Segoe UI', Arial, sans-serif;
    font-size: 0.8rem;
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    line-height: 1.3;
}

.flag-review-table td,
.flag-review-table .mud-table-body .mud-table-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.flag-review-table .mud-button-root {
    font-size: 0.72rem;
    padding: 0 6px;
    min-height: 20px;
    line-height: 20px;
}

/* ── Risk chip style ── */
.chip-risk {
    min-width: 52px;
    font-weight: 700;
    font-size: 0.75rem;
}

/* ── ATC Coding Errors table ── */
.atc-coding-errors-table .mud-table-body .mud-table-cell .mud-typography {
    padding: 0 !important;
}

.atc-coding-errors-table .mud-chip.mud-chip-size-small {
    height: 18px;
    font-size: 0.7rem;
    padding: 0 5px;
}

/* ── Shared page layout ── */
.sc-page {
    font-family: 'Encode Sans Condensed', sans-serif;
}

/* ── sc-table: shared MudTable styling (condensed font, standard padding, truncating cells) ── */
.sc-table td.mud-table-cell,
.sc-table th.mud-table-head-cell,
.sc-table th.mud-table-head-cell span,
.sc-table th.mud-table-head-cell button {
    font-family: 'Encode Sans Condensed', sans-serif !important;
    font-size: 0.80rem !important;
    font-weight: 400 !important;
    padding: 4px 8px !important;
    line-height: 1.25 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* td only: max-width:0 is required for text-overflow on fixed-layout tables */
.sc-table td.mud-table-cell {
    max-width: 0;
}

/* Header text slightly bolder so it reads against the data */
.sc-table th.mud-table-head-cell,
.sc-table th.mud-table-head-cell span,
.sc-table th.mud-table-head-cell button {
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Tighten sort-label so it doesn't add height */
.sc-table .mud-table-sort-label {
    line-height: 1 !important;
}

/* ── sc-table-dotted: overlay preview table with dotted row borders ── */
.sc-table-dotted td.mud-table-cell,
.sc-table-dotted th.mud-table-head-cell {
    border-bottom: 1px dotted rgba(0, 0, 0, 0.2) !important;
}

/* ── Row state classes (AtcRobotPage) ── */
.row-not-in-use td.mud-table-cell {
    color: rgba(0, 0, 0, 0.38) !important;
}

.row-accepted td.mud-table-cell {
    background-color: rgba(var(--mud-palette-success-rgb), .10) !important;
}

.row-confirmed td.mud-table-cell {
    background-color: rgba(var(--mud-palette-error-rgb), .10) !important;
}

.row-flagged td.mud-table-cell {
    background-color: rgba(var(--mud-palette-warning-rgb), .15) !important;
}

/* ── Blazor reconnect modal ── */
/* Must be global (not scoped) so ::backdrop and [open] work correctly. */

.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}

#components-reconnect-modal {
    background-color: white;
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity 0.5s both;
}

#components-reconnect-modal[open] {
    animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s,
               components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

#components-reconnect-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity 0.5s ease-in-out;
    opacity: 1;
}

.components-reconnect-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button {
    border: 0;
    background-color: #6b9ed2;
    color: white;
    padding: 4px 24px;
    border-radius: 4px;
    cursor: pointer;
}

#components-reconnect-modal button:hover {
    background-color: #3b6ea2;
}

#components-reconnect-modal button:active {
    background-color: #6b9ed2;
}

.components-rejoining-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

.components-rejoining-animation div {
    position: absolute;
    border: 3px solid #0087ff;
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2) {
    animation-delay: -0.5s;
}

@keyframes components-reconnect-modal-slideUp {
    0%   { transform: translateY(30px) scale(0.95); }
    100% { transform: translateY(0); }
}

@keyframes components-reconnect-modal-fadeInOpacity {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes components-reconnect-modal-fadeOutOpacity {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes components-rejoining-animation {
    0%   { top: 40px; left: 40px; width: 0;    height: 0;    opacity: 0; }
    4.9% { top: 40px; left: 40px; width: 0;    height: 0;    opacity: 0; }
    5%   { top: 40px; left: 40px; width: 0;    height: 0;    opacity: 1; }
    100% { top: 0;    left: 0;    width: 80px; height: 80px; opacity: 0; }
}
