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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1zbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSI geT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA9NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* GatePass – JS-fri modal */
.gp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 2000;
}
.gp-modal-panel {
    width: min(720px, 100%);
}

/* Desktop sidebar styling */
.nav-sidebar {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
    min-height: 100vh;
}

/* Smalare sidebar mellan md (768px) och lg (992px) */
@media (min-width: 768px) and (max-width: 991px) {
    .nav-sidebar {
        width: 240px;
        min-width: 240px;
    }
}

/* Full bredd från lg (992px) och uppåt */
@media (min-width: 992px) {
    .nav-sidebar {
        width: 280px;
        min-width: 280px;
    }
}

/* Pixel canvas fullscreen overlay – wraps the entire CardSection */
.pixel-fullscreen {
    position: fixed !important;
    inset: 0;
    z-index: 1050;
    overflow-y: auto;
    background: #fff;
}

.pixel-fullscreen .card {
    border: none !important;
    border-radius: 0 !important;
}

/* In fullscreen, expand the canvas container to fill available height */
.pixel-fullscreen .pixel-canvas-container {
    height: calc(100vh - 10rem) !important;
    min-height: unset !important;
}
/* Announcement description body (rendered HTML from HtmlEditor / Quill).
   Quill output can contain inline background-color styles (e.g. white spans from
   pasted content or formatting). Inside an .alert these would create unwanted
   white boxes around the text — strip backgrounds and let the alert color show through. */
.announcement-body,
.announcement-body * {
    background-color: transparent !important;
}

.announcement-body p:last-child {
    margin-bottom: 0;
}

/* Shared rich-text typography.
   .html-content wraps the editor host (HtmlEditor.razor) and any rendered HTML so
   the editor preview matches the final modal/page output. Both selectors use the
   same rules: paragraph spacing, heading sizes, list indentation, no background. */
.html-content,
.html-content .ql-editor,
.rendered-html {
    background-color: transparent;
}

.html-content [style*="background"],
.html-content .ql-editor [style*="background"],
.rendered-html [style*="background"] {
    background-color: transparent !important;
}

/* Make the Quill editing surface visually behave like the rendered output. */
.html-content .ql-editor {
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    min-height: inherit;
    color: inherit;
}

/* Heading sizes mirror Bootstrap defaults so the editor preview matches the modal. */
.html-content .ql-editor h1,
.rendered-html h1 { font-size: 2.5rem;  margin: 0 0 0.5rem;    font-weight: 500; line-height: 1.2; }
.html-content .ql-editor h2,
.rendered-html h2 { font-size: 2rem;    margin: 1.5rem 0 0.75rem; font-weight: 500; line-height: 1.2; }
.html-content .ql-editor h3,
.rendered-html h3 { font-size: 1.75rem; margin: 1.25rem 0 0.5rem; font-weight: 500; line-height: 1.2; }
.html-content .ql-editor h4,
.rendered-html h4 { font-size: 1.5rem;  margin: 1rem 0 0.5rem;   font-weight: 500; line-height: 1.3; }

/* Paragraph spacing - Quill's .ql-editor sets margin: 0 on <p>, which makes
   the editor look denser than the rendered output (where Bootstrap's reboot
   adds 1rem bottom margin). Restore it so what you see is what you get. */
.html-content .ql-editor p,
.rendered-html p {
    margin: 0 0 1rem;
}

.html-content .ql-editor p:last-child,
.rendered-html p:last-child {
    margin-bottom: 0;
}

/* List indentation.
   Quill's own CSS adds padding-left: 1.5em on each <li> for marker positioning,
   so the editor needs less padding on the <ol>/<ul> than the rendered output to
   end up at the same visual position. */
.html-content .ql-editor ul,
.html-content .ql-editor ol {
    margin: 0 0 1rem;
    padding-left: 0.5rem;
}

.rendered-html ul,
.rendered-html ol {
    margin: 0 0 1rem;
    padding-left: 2rem;
}

/* Quill v2 emits all lists as <ol> and distinguishes bullet vs. ordered via
   data-list="bullet|ordered" on each <li>. Quill's own CSS renders the marker via
   ::before pseudo-elements, but when we display the saved HTML through MarkupString
   outside the editor the browser falls back to the native <ol> numbering — so a
   bullet list looks like a numbered list. Restore correct markers below. */
.rendered-html ol {
    list-style: decimal;
}

.rendered-html ol > li[data-list="bullet"] {
    list-style-type: disc;
}

.rendered-html ol > li[data-list="ordered"] {
    list-style-type: decimal;
}

/* When the list is mixed, switch the marker by overriding the parent ol type
   on a per-item basis using `display: list-item` (already default) plus the
   list-style-type above. Hide Quill's UI-only marker placeholder if present. */
.rendered-html ol > li > .ql-ui {
    display: none;
}

.html-content .ql-editor blockquote,
.rendered-html blockquote {
    border-left: 4px solid var(--bs-border-color, #dee2e6);
    padding: 0.25rem 0 0.25rem 0.75rem;
    margin: 0 0 1rem;
    color: var(--bs-secondary-color, #6c757d);
}

/* Announcement banner
   make room for the absolutely-positioned .btn-close. Our compact .px-3 overrides
   that, causing truncated text to slide under the close button. Restore (and slightly
   extend) the right padding so the truncated description has clear breathing room. */
.announcement-banner-container .alert.alert-dismissible {
    padding-right: 5rem !important;
}
