html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.app-bar__brand {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: 8px;
}

.app-bar__title {
    line-height: 1.2;
}

.app-bar__user-name {
    opacity: 0.7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-bar__user-name--desktop {
    margin-right: 8px;
    max-width: min(260px, 35vw);
}

.app-bar__user-name--mobile {
    max-width: 45vw;
    font-size: 0.75rem;
    line-height: 1.1;
}

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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk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A4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* ── Feature Definition Dialog ──────────────────────────────────────────── */

.feature-definition-dialog__schema-editor textarea {
    font-family: monospace;
    font-size: 0.85rem;
}

/* ── Allowed Features Table ─────────────────────────────────────────────── */

.allowed-features-table {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}

/* ── Layout Sections Table ──────────────────────────────────────────────── */

.layout-sections-table__actions-col {
    width: 170px;
}

.layout-sections-table__actions {
    white-space: nowrap;
}
/* ── Template Content ───────────────────────────────────────────────────── */

.template-content-section {
    border-left: 3px solid var(--mud-palette-primary);
}

.template-content-section__header {
    flex-wrap: wrap;
    gap: 4px;
}

.template-content-section__table {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}

/* ── TinyMCE — z-index fix for MudBlazor dialogs ───────────────────────── */
/*
 * TinyMCE appends .tox-tinymce-aux to document.body for all its floating UI
 * (sub-dialogs, dropdowns, popovers). MudBlazor dialog overlay sits at z-index
 * 1400, so TinyMCE's aux layer must be above it.
 */
.tox-tinymce-aux {
    z-index: 9999 !important;
}

/* ── TinyMCE — sticky toolbar inside a MudBlazor dialog ─────────────────── */
/*
 * A docked TinyMCE toolbar is `position: fixed`, which only resolves against the
 * viewport while no ancestor carries a transform. MudBlazor's open animation ends on
 * `transform: scale(1)` and KEEPS it (`animation-fill-mode: both`) — enough to make
 * .mud-dialog the containing block, so the docked toolbar would be positioned against
 * the dialog and clipped by its overflow. Dropping only the forwards half restores
 * `transform: none` at rest; the entrance animation itself is unchanged.
 * (MercurySheet already replaces that animation, so this only reaches the centered
 * dialogs that have not been migrated yet.)
 */
.mud-dialog:has(.rich-text-editor) {
    animation-fill-mode: backwards;
}

/* ── Rich Text Editor (TinyMCE wrapper) ─────────────────────────────────── */

.rich-text-editor {
    margin-bottom: 4px;
}

.rich-text-editor__label-row {
    margin-bottom: 6px;
}

.rich-text-editor__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1;
    color: rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.rich-text-editor__helper {
    margin: 4px 14px 0;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.4;
}

.rich-text-editor--disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* ── Reusable Content ──────────────────────────────────────────────────── */

/* The Reusable Content workspace's own legacy rules are gone:
   /reusable-content is the redesigned canonical master-detail workspace and its
   folder and item editors are canonical sheets, all of which live in
   admin-design/reusable-content.css. SharedFeaturePickerDialog — the transient
   selection modal over that same tree — is redesigned too, and its rules live in
   admin-design/shared-feature-picker.css. */

/* ── Blog ──────────────────────────────────────────────────────────────── */

/* The Blog Posts workspace's, the post editor's and the Blog Categories
   workspace's own legacy rules are all gone: /blog, /blog/tags and
   /blog/categories are the redesigned canonical workspaces and their editors
   are canonical sheets, all of which live in admin-design/blog.css. Blog
   Settings is the one Blog surface still on its legacy dialog, and it carries
   no rules of its own here. */

