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


/* ===== Admin dark mode helpers ===== */
html.sm-dark body,
html.sm-dark .admin-shell {
  color-scheme: dark;
}
html.sm-dark .admin-shell .mud-paper {
  background-color: var(--mud-palette-surface);
}
html.sm-dark .admin-nav-search .mud-input-outlined .mud-input-outlined-border {
  border-color: #334155;
}
html.sm-dark .app-color-tabs .mud-tabs-panels {
  background: #151b2b;
  border-color: #1f2937;
}
html.sm-dark .od-preview,
html.sm-dark .ai-page .ai-chat {
  background: #151b2b;
}
html.sm-dark .ai-row.bot .ai-bubble {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
/* Keep print areas light */
@media print {
  html.sm-dark, html.sm-dark body {
    background: #fff !important;
    color: #000 !important;
  }
}


/* ===== Admin content spacing & readable page headers ===== */
.admin-shell .mud-main-content.print-content,
.admin-shell main.mud-main-content {
  padding: 1.5rem 1.5rem 2.5rem !important;
  padding-top: 5.25rem !important;
  box-sizing: border-box;
  min-height: calc(100vh - 64px);
}
.admin-shell .mud-main-content > .mud-grid:first-child,
.admin-shell .mud-main-content > h1:first-child,
.admin-shell .mud-main-content > h2:first-child,
.admin-shell .mud-main-content > h3:first-child,
.admin-shell .mud-main-content > .mud-paper:first-child,
.admin-shell .mud-main-content > .d-flex:first-child {
  margin-top: 0.25rem !important;
}
/* Page titles always readable (light + dark) */
.admin-shell .mud-main-content .mud-typography-h3,
.admin-shell .mud-main-content .mud-typography-h4,
.admin-shell .mud-main-content .mud-typography-h5,
.admin-shell .mud-main-content .mud-typography-h6,
.admin-shell .mud-main-content h1,
.admin-shell .mud-main-content h2,
.admin-shell .mud-main-content h3,
.admin-shell .mud-main-content h4 {
  color: var(--mud-palette-text-primary) !important;
  opacity: 1 !important;
  visibility: visible !important;
  line-height: 1.35 !important;
  margin-bottom: 0.65rem !important;
}
.admin-shell .mud-main-content .mud-typography-body1,
.admin-shell .mud-main-content .mud-typography-body2,
.admin-shell .mud-main-content .mud-typography-subtitle1,
.admin-shell .mud-main-content .mud-typography-subtitle2,
.admin-shell .mud-main-content .mud-typography-caption {
  color: var(--mud-palette-text-secondary) !important;
  opacity: 1 !important;
}
html.sm-dark .admin-shell .mud-main-content {
  color: #e8eef7 !important;
}
html.sm-dark .admin-shell .mud-main-content .mud-typography-h3,
html.sm-dark .admin-shell .mud-main-content .mud-typography-h4,
html.sm-dark .admin-shell .mud-main-content .mud-typography-h5,
html.sm-dark .admin-shell .mud-main-content .mud-typography-h6,
html.sm-dark .admin-shell .mud-main-content h1,
html.sm-dark .admin-shell .mud-main-content h2,
html.sm-dark .admin-shell .mud-main-content h3,
html.sm-dark .admin-shell .mud-main-content h4 {
  color: #f8fafc !important;
}
html.sm-dark .admin-shell .mud-main-content .mud-typography-body1,
html.sm-dark .admin-shell .mud-main-content .mud-typography-body2,
html.sm-dark .admin-shell .mud-main-content .mud-typography-subtitle1,
html.sm-dark .admin-shell .mud-main-content .mud-typography-subtitle2 {
  color: #cbd5e1 !important;
}
/* AppBar should not cover content */
.admin-shell .mud-appbar {
  z-index: 1200;
}
.admin-shell .mud-drawer {
  z-index: 1100;
}


/* ===== LIGHT MODE admin drawer (readable menus) ===== */
html:not(.sm-dark) .admin-shell .mud-drawer,
html:not(.sm-dark) .admin-shell .admin-drawer,
html:not(.sm-dark) .admin-shell .metronic-drawer {
  background: #ffffff !important;
  color: #0f172a !important;
  border-right: 1px solid #e2e8f0;
}
html:not(.sm-dark) .admin-shell .mud-nav-link,
html:not(.sm-dark) .admin-shell .mud-nav-group,
html:not(.sm-dark) .admin-shell .mud-nav-link .mud-nav-link-text,
html:not(.sm-dark) .admin-shell .mud-typography {
  color: #1e293b !important;
}
html:not(.sm-dark) .admin-shell .mud-nav-link:hover,
html:not(.sm-dark) .admin-shell .mud-nav-link.active {
  background: #f1f5f9 !important;
  color: #0d47a1 !important;
}
html:not(.sm-dark) .admin-shell .mud-nav-link .mud-icon-root {
  color: #475569 !important;
}
html:not(.sm-dark) .admin-shell .mud-nav-link.active .mud-icon-root {
  color: #0d47a1 !important;
}
html:not(.sm-dark) .admin-shell .admin-nav-search .mud-input-slot,
html:not(.sm-dark) .admin-shell .admin-nav-search input {
  color: #0f172a !important;
}


/* ===== Selects / popovers: stay clickable above app bar ===== */
.mud-popover {
  z-index: 2000 !important;
  pointer-events: auto !important;
}
.mud-popover .mud-list,
.mud-popover .mud-list-item,
.mud-select-item,
.mud-menu-item {
  pointer-events: auto !important;
  cursor: pointer !important;
}
/* Do not raise generic overlays above popovers */
.mud-overlay.mud-overlay-dialog {
  z-index: 1400;
}
/* Labels must not steal clicks from the input */
.mud-input-control .mud-input-label {
  pointer-events: none !important;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cms-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px !important;
  margin-bottom: 1rem;
}


/* Dashboard / page headers clear of fixed app bar */
.admin-shell .admin-page-top {
  margin-top: 0.5rem;
  padding-top: 0.25rem;
}
.admin-shell .mud-main-content.print-content,
.admin-shell main.mud-main-content {
  padding-top: 5.25rem !important;
}


/* Light mode appbar = same teal as public site menubar (.pub-nav #0f766e) */
html:not(.sm-dark) .admin-shell .admin-appbar.mud-appbar,
html:not(.sm-dark) .admin-shell .mud-appbar.admin-appbar {
  background: #0f766e !important;
  color: #ffffff !important;
  opacity: 1 !important;
  filter: none !important;
}
html:not(.sm-dark) .admin-shell .admin-appbar .mud-typography,
html:not(.sm-dark) .admin-shell .admin-appbar .mud-button-root,
html:not(.sm-dark) .admin-shell .admin-appbar .mud-icon-button,
html:not(.sm-dark) .admin-shell .admin-appbar .mud-icon-root {
  color: #ffffff !important;
  opacity: 1 !important;
}
html:not(.sm-dark) .admin-shell .mud-nav-link.active,
html:not(.sm-dark) .admin-shell .mud-nav-link:hover {
  background: #ccfbf1 !important;
  color: #0f766e !important;
}
html:not(.sm-dark) .admin-shell .mud-nav-link.active .mud-icon-root,
html:not(.sm-dark) .admin-shell .mud-nav-link:hover .mud-icon-root {
  color: #0d9488 !important;
}
