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

:root {
    --sidebar-width: 230px;
    --header-height: 64px;
    --header-height-mobile: 56px;
}

/* MMain component adjustments for responsive behavior */
.m-main {
    transition: padding-left 0.3s ease, padding-top 0.3s ease;
    /* Reduced gap: header height (64px) */
    padding-top: calc(var(--header-height)) !important;
}

/* When drawer is open on desktop */
.m-main.drawer-open {
    padding-left: var(--sidebar-width) !important;
}

/* When drawer is closed or on mobile */
.m-main.drawer-closed {
    padding-left: 0 !important;
}

/* Content container - fixed max-width, fluid below */
.content-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    transition: max-width 0.3s ease;
}

@media (max-width: 960px) {
    .m-main {
        padding-left: 0 !important;
        padding-top: calc(var(--header-height-mobile) + 16px) !important;
    }
}

@media (max-width: 1264px) {
    .content-container {
        padding: 0 16px;
    }
}

/* Icon selection highlight */
.icon-selected {
    background-color: rgba(25, 118, 210, 0.15) !important;
    border: 2px solid rgb(var(--v-theme-primary)) !important;
}

/* Monochrome brand icons - uses MASA Blazor secondary theme color */
.brand-icon-monochrome {
    filter: brightness(0) saturate(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0.95) contrast(0.9);
}

/* Fallback for when CSS custom properties are available */
@supports (color: var(--test)) {
    .brand-icon-monochrome {
        filter: brightness(0) saturate(100%) invert(30%) sepia(80%) saturate(600%) hue-rotate(230deg);
    }
}

@media (max-width: 960px) {
    .content-container {
        padding: 0 12px;
    }
}

@media (max-width: 599px) {
    .content-container {
        padding: 0 8px;
    }
}

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

:root {
    --sidebar-width: 230px;
}

/* SSR-safe drawer padding - use high specificity selectors */
.m-main.surface.bg-surface-container-lowest.drawer-open,
.m-main.surface.drawer-open {
    padding-left: var(--sidebar-width) !important;
}

.m-main.surface.bg-surface-container-lowest.drawer-closed,
.m-main.surface.drawer-closed {
    padding-left: 0 !important;
}

/* Mobile: always no padding regardless of drawer state */
/* Use !important to override inline styles from Blazor */
@media (max-width: 1264px) {
    .m-main.surface.bg-surface-container-lowest[style*="padding-left"],
    .m-main.surface[style*="padding-left"] {
        padding-left: 0 !important;
    }
}