@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html,
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html,
body {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.button-link {
    text-decoration: unset;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 0.625rem;
}

.title.title-secondary {
    padding-top: 0.313rem;
    padding-bottom: 0;
    color: var(--bs-secondary-color, var(--DS-color-content-neutral-default-rest));
}

.title-header-text {
    font-size: 2.5rem;
    line-height: 3rem;
    font-weight: 600;
    letter-spacing: 0rem;
    padding: 0.3125rem 0;
}

.title-content-text {
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 2.5rem;
    letter-spacing: 0rem;
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.block-content {
    width: 31.25rem;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: 100%;
}

.icon {
    width: var(--icon-width);
    height: var(--icon-height);
    background-color: currentcolor;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-image: var(--icon-mask-image);
    mask-image: var(--icon-mask-image);
}

/* GLOBAL BACKGROUND IMAGE CLASS */
.maxton-bg {
    background-image: url('/maxtonbg.webp') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
}

/* Support for semi-transparent components to show bg */
.dark-blue-theme .mud-main-content {
    background-color: transparent !important;
}

/* Override Surface Variable for Dark Blue Theme */
.dark-blue-theme {
    --mud-palette-surface: rgba(15, 21, 53, 0.95) !important;
}

/* Ensure MudPaper/Grid uses the new surface variable */
.dark-blue-theme .mud-paper,
.dark-blue-theme .mud-table-container,
.dark-blue-theme .mud-data-grid,
.dark-blue-theme .mud-table {
    background-color: var(--mud-palette-surface) !important;
    backdrop-filter: blur(10px);
    /* Glassmorphism effect */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Header slightly more transparent or lighter if needed, otherwise inherit or use distinct color */
.dark-blue-theme .mud-table-head {
    background-color: rgba(26, 34, 56, 0.8) !important;
}

/* Specific overwrite for Maxton DataGrid Header */
.dark-blue-theme .maxton-datagrid .mud-table-head {
    background-color: royalblue !important;
}

/* Enable scrollbar for sorting/filtering dropdowns if lists are long */
.mud-list {
    max-height: 400px;
    overflow-y: auto !important;
}

/* Ensure the table container handles overflow correctly without hiding pagination */
.maxton-datagrid .mud-table-container {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

/* Responsive Search Box - Mobile Optimized */
.maxton-search {
    width: 100%;
    max-width: 300px;
}

@media (max-width: 600px) {
    .maxton-search {
        max-width: 150px !important;
        /* Shrink search on mobile to fit buttons */
    }

    /* Fix Native MudDataGrid Menu Overflow on Mobile */
    .mud-data-grid .mud-toolbar .mud-menu-popover-provider .mud-popover {
        left: auto !important;
        right: 10px !important;
        transform-origin: top right !important;
        max-width: 90vw;
    }

    /* Global Mobile Typography Fixes */
    .text-mobile-h6 {
        font-size: 1.1rem !important;
    }

    .mud-typography-h5.text-mobile-h6 {
        font-size: 1.1rem !important;
    }

    .mud-tabs-tab {
        padding: 8px 12px !important;
        min-width: unset !important;
    }

    .mud-tab-icon-text {
        font-size: 0.75rem !important;
    }
}