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

/* Fallback values — overridden by App.razor server-side injection via ILayoutDimensionsService */
:root {
    --sidebar-width: 230px;
    --secondary-sidebar-width: 320px;
    --header-height: 64px;
    --header-height-mobile: 56px;
}

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

/* Sidebar offset for MMain and MFooter */
@media (min-width: 1264px) {
    /* Основной сайдбар (230px) */
    .m-main-with-sidebar, 
    footer.m-footer.m-main-with-sidebar {
        padding-left: var(--sidebar-width) !important;
    }
    
    /* Вторичный сайдбар для Playground (320px) */
    .m-main-immersive,
    footer.m-footer.m-main-immersive {
        padding-left: var(--secondary-sidebar-width) !important;
    }
}

@media (max-width: 960px) {
    .m-main-with-sidebar,
    .m-main-immersive,
    footer.m-footer.m-main-with-sidebar,
    footer.m-footer.m-main-immersive {
        padding-left: 0 !important;
    }
}

/* Let MASA Blazor handle drawer padding via its native classes */
/* Removed: .drawer-open / .drawer-closed overrides that conflict with MASA */

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

/* Let MASA Blazor handle drawer padding - removed conflicting overrides */