/* Keep embedded SVG icons within the size selected by MudBlazor. */
.mud-icon-root > svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.index-grid-single-line .mud-table-cell {
    white-space: nowrap;
}

@font-face {
    font-family: iranyekan;
    font-style: normal;
    font-weight: bold;
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebboldfanum.eot');
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebboldfanum.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
    url('../Content/fonts/IRANYekan/woff/iranyekanwebboldfanum.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../Content/fonts/IRANYekan/ttf/iranyekanwebboldfanum.ttf') format('truetype');
}

@font-face {
    font-family: iranyekan;
    font-style: normal;
    font-weight: 100;
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebthinfanum.eot');
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebthinfanum.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
    url('../Content/fonts/IRANYekan/woff/iranyekanwebthinfanum.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../Content/fonts/IRANYekan/ttf/iranyekanwebthinfanum.ttf') format('truetype');
}

@font-face {
    font-family: iranyekan;
    font-style: normal;
    font-weight: 300;
    src: url('../Content/fonts/IRANYekan/eot/iranyekanweblightfanum.eot');
    src: url('../Content/fonts/IRANYekan/eot/iranyekanweblightfanum.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
    url('../Content/fonts/IRANYekan/woff/iranyekanweblightfanum.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../Content/fonts/IRANYekan/ttf/iranyekanweblightfanum.ttf') format('truetype');
}

@font-face {
    font-family: iranyekan;
    font-style: normal;
    font-weight: normal;
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebregularfanum.eot');
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebregularfanum.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
    url('../Content/fonts/IRANYekan/woff/iranyekanwebregularfanum.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../Content/fonts/IRANYekan/ttf/iranyekanwebregularfanum.ttf') format('truetype');
}

@font-face {
    font-family: iranyekan;
    font-style: normal;
    font-weight: 500;
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebmediumfanum.eot');
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebmediumfanum.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
    url('../Content/fonts/IRANYekan/woff/iranyekanwebmediumfanum.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../Content/fonts/IRANYekan/ttf/iranyekanwebmediumfanum.ttf') format('truetype');
}

@font-face {
    font-family: iranyekan;
    font-style: normal;
    font-weight: 800;
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebextraboldfanum.eot');
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebextraboldfanum.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
    url('../Content/fonts/IRANYekan/woff/iranyekanwebextraboldfanum.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../Content/fonts/IRANYekan/ttf/iranyekanwebextraboldfanum.ttf') format('truetype');
}

@font-face {
    font-family: iranyekan;
    font-style: normal;
    font-weight: 850;
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebblackfanum.eot');
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebblackfanum.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
    url('../Content/fonts/IRANYekan/woff/iranyekanwebblackfanum.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../Content/fonts/IRANYekan/ttf/iranyekanwebblackfanum.ttf') format('truetype');
}

@font-face {
    font-family: iranyekan;
    font-style: normal;
    font-weight: 900;
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebextrablackfanum.eot');
    src: url('../Content/fonts/IRANYekan/eot/iranyekanwebextrablackfanum.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
    url('../Content/fonts/IRANYekan/woff/iranyekanwebextrablackfanum.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../Content/fonts/IRANYekan/ttf/iranyekanwebextrablackfanum.ttf') format('truetype');
}

@font-face {
    font-family: MunicipalServices;
    font-style: normal;
    font-weight: 900;
    src: url('../Content/fonts/MunicipalServices/MunicipalServices.eot');
    src: url('../Content/fonts/MunicipalServices/MunicipalServices.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
    url('../Content/fonts/MunicipalServices/MunicipalServices.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../Content/fonts/MunicipalServices/MunicipalServices.ttf') format('truetype');
}


.digital-input-alt {
    font-family: 'Digital-7', 'iranyekan' !important;
    font-size: 28px !important;
    line-height: 22px !important;
    letter-spacing: 3px !important;
}

#digital-input {
    letter-spacing: 10px;
    padding: 6px 10px;
    width: 316px;
    height: 104px;
    font-size: 100px;
    font-family: 'Digital-7', 'iranyekan' !important;
    text-align: center;
    line-height: 1;
}

/* Page sections: title, actions, filters, then data or form content. */
.appbar-page-title {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
    min-width: 0;
    max-width: 40vw;
    margin-inline: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: var(--mud-typography-subtitle1-size);
    font-weight: var(--mud-typography-subtitle1-weight);
}

.appbar-page-title[hidden] {
    display: none;
}

.mobile-appbar-shell { width: 100%; }
.mobile-appbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; width: 100%; }
.mobile-appbar > button, .mobile-appbar > a, .mobile-account-menu button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-width: 0; min-height: 52px; padding: 4px; border: 0; border-radius: var(--mud-default-borderradius);
    background: transparent; color: var(--mud-palette-text-secondary); font: inherit; text-decoration: none; cursor: pointer;
}
.mobile-appbar span { font-size: .7rem; white-space: nowrap; }
.mobile-appbar a.active, .mobile-appbar button:hover, .mobile-appbar a:hover { color: var(--mud-palette-primary); background: var(--mud-palette-action-default-hover); }
.mobile-appbar button:focus-visible, .mobile-appbar a:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
.mobile-account-menu, .mobile-account-menu .mud-menu-activator, .mobile-account-menu button { width: 100%; }
.mobile-account-logout { border: 0; background: transparent; color: var(--mud-palette-error); width: 100%; font: inherit; cursor: pointer; }
.application-search-content { min-height: 180px; }

@media (max-width: 959.98px) {
    .application-shell .application-footer { display: none; }
    .application-shell .docs-appbar-filter { display: none !important; }
    .application-shell .docs-appbar {
        top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
        width: 100% !important; height: auto !important; margin: 0 !important;
        background: var(--mud-palette-surface); border-top: 1px solid var(--mud-palette-lines-default);
    }
    .application-shell .docs-appbar > .mud-toolbar {
        height: auto; min-height: 68px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    }
    .application-shell .mud-main-content {
        padding-top: 16px !important; padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .application-shell .application-drawer { padding-bottom: 0; }
    .application-shell .application-mobile-drawer-tools {
        box-sizing: border-box;
        height: 68.2px;
    }
    .application-shell .application-mobile-drawer-tools > .mud-toolbar {
        height: 100%; min-height: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mobile-appbar-shell .appbar-page-title { display: block; max-width: 100%; width: 100%; margin: 0; padding: 4px 12px 8px; text-align: center; font-size: .8rem; }
    .mobile-appbar-shell .appbar-page-title[hidden] { display: none; }
}

:root {
    --page-section-gap: 16px;
}

.mud-container--gutters {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.management-page,
.management-page-content {
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.management-page-content > .mud-grid,
.index-filter-panel .mud-expand-panel-content > .mud-grid {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Components opened directly by DialogService need the normal dialog gutters. */
.mud-dialog > :has(.management-page-header):not(.mud-dialog-content) {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    padding: 0 16px 24px;
    overflow-y: auto;
}

/* Explicit opt-in for editors whose dialog content must keep stable gutters. */
.mud-dialog > .dialog-management-page:not(.mud-dialog-content) {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    padding: 0 16px 24px;
    overflow-x: hidden;
    overflow-y: auto;
}

.mud-dialog-width-full {
    width: calc(100% - 32px) !important;
}

.mud-expand-panel .mud-expand-panel-content.mud-expand-panel-gutters {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

.mud-dialog > .mud-grid:has(.management-page-header) {
    width: 100%;
    margin: 0;
}

.mud-dialog > .mud-grid:has(.management-page-header) > .mud-grid-item {
    padding: 0;
}

.mud-dialog .management-page-header {
    display: none;
}

.mud-dialog .mud-grid-item,
.mud-dialog .management-page-content {
    min-width: 0;
}

.management-page-content > .mud-grid:has(> .mud-grid-item .management-page-header) {
    width: 100%;
    margin: 0;
}

.management-page-content > .mud-grid:has(> .mud-grid-item .management-page-header) > .mud-grid-item {
    padding: 0;
}

.management-page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    padding: 1.1rem 1.25rem;
    margin-block: 0 var(--page-section-gap);
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--mud-palette-primary) 14%, var(--mud-palette-surface)) 0%,
        var(--mud-palette-surface) 72%);
}

.management-page-header__icon {
    display: grid;
    flex: 0 0 3.4rem;
    width: 3.4rem;
    height: 3.4rem;
    place-items: center;
    border-radius: var(--mud-default-borderradius);
    color: var(--mud-palette-primary-text);
    background: var(--mud-palette-primary);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--mud-palette-primary) 30%, transparent);
}

.management-page-header__content {
    min-width: 0;
    flex: 1;
}

.management-page-header__title {
    color: var(--mud-palette-primary);
    font-weight: 800;
}

.management-page-header__description,
.management-page-description {
    margin-top: .1rem;
    color: var(--mud-palette-text-secondary);
}

.management-page-header__details {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .8rem;
}

.management-page-header__details > span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .6rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    color: var(--mud-palette-text-primary);
    background: color-mix(in srgb, var(--mud-palette-surface) 88%, transparent);
    font-size: .78rem;
}

.management-page-header__details .mud-icon-root {
    color: var(--mud-palette-primary);
}

@media (max-width: 700px) {
    .management-page-header {
        align-items: flex-start;
        padding: .9rem;
    }

    .management-page-header__icon {
        flex-basis: 2.8rem;
        width: 2.8rem;
        height: 2.8rem;
    }
}

.application-nav-copy {
    display: block;
    min-width: 0;
    max-width: 100%;
}

.application-nav-copy > span,
.application-nav-description {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.application-nav-description {
    margin-top: 2px;
    font-size: .6875rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--mud-palette-text-secondary);
}

.management-page-actions,
.index-filter-panel,
.index-filter-box {
    margin-block: 0 var(--page-section-gap) !important;
}

.mud-table {
    margin-block-end: var(--page-section-gap);
}

/* Shared flat containers for WebApp grids and filters, including dialogs. */
.mud-table,
.management-page-actions,
.index-filter-panel .mud-expand-panel,
.index-filter-box {
    box-shadow: none !important;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
}

.index-filter-panel {
    box-shadow: none !important;
}

.index-filter-panel .mud-expand-panel {
    overflow: visible;
    border: 1px solid var(--mud-palette-lines-default) !important;
}

.index-filter-panel .mud-expand-panel-header,
.index-filter-panel .mud-expand-panel-text,
.index-filter-panel .mud-expand-panel-text .mud-typography {
    font-size: var(--mud-typography-subtitle1-size);
    font-weight: var(--mud-typography-subtitle1-weight);
    line-height: var(--mud-typography-subtitle1-lineheight);
    letter-spacing: var(--mud-typography-subtitle1-letterspacing);
}

.index-filter-panel .standard-filter-header {
    pointer-events: none;
    cursor: default;
}

.index-filter-panel .standard-filter-toggle {
    pointer-events: auto;
}

.index-filter-panel .mud-collapse-container,
.index-filter-panel .mud-collapse-wrapper,
.index-filter-panel .mud-expand-panel-content {
    overflow: visible !important;
}

.index-filter-box {
    overflow: visible !important;
    padding: 12px;
}

/* Keep index grids full-width while preserving horizontal scrolling for wide grids. */
.index-grid,
.index-grid .mud-table-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.index-grid {
    overflow: hidden;
}

.index-grid .mud-table-container {
    overflow-x: auto;
}

@font-face {
    font-family: 'Digital-7';
    src: url('../Content/fonts/Digital/Digital-7.eot');
    src: url('../Content/fonts/Digital/Digital-7.eot?#iefix') format('embedded-opentype'), url('../Content/fonts/Digital/Digital-7.woff2') format('woff2'), url('../Content/fonts/Digital/Digital-7.woff') format('woff'), url('../Content/fonts/Digital/Digital-7.ttf') format('truetype'), url('../Content/fonts/Digital/Digital-7.svg#Digital-7') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
