@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --mud-typography-overline-family: 'Roboto', 'sans-serif' !important;
    --mud-typography-overline-size: 0.625rem !important;
    --mud-typography-overline-weight: 400 !important;
    --mud-typography-overline-lineheight: normal !important;
    --mud-typography-overline-letterspacing: 1.5px !important;
    --mud-typography-overline-text-transform: uppercase !important;
    --mud-typography-overline-color: #424242 !important;
    --mud-typography-overline-margin-bottom: 0.5rem !important;
}

.mud-typography-overline {
    font-size: var(--mud-typography-overline-size);
    font-family: var(--mud-typography-overline-family);
    font-weight: var(--mud-typography-overline-weight);
    line-height: var(--mud-typography-overline-lineheight);
    letter-spacing: var(--mud-typography-overline-letterspacing);
    text-transform: var(--mud-typography-overline-text-transform);
    /*color: var(--mud-typography-overline-color);*/
}

.hoverable:hover {
    cursor: pointer;
    -webkit-filter: brightness(50%);
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    -ms-transition: all 0.5s ease;
    transition: all 0.5s ease;
}

a:hover {
    color: inherit !important;
}

body {
    background: var(--mud-palette-background);
}

/* Product-wide tooltip treatment. Rich report/audit tooltips and the existing
   MudBlazor hints share the same readable, high-contrast surface. */
.mud-tooltip {
    max-width: min(24rem, calc(100vw - 2rem));
    padding: .65rem .8rem;
    border: 1px solid #34445a;
    border-radius: .65rem;
    text-align: left;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: .005em;
    white-space: normal;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .42);
}

.mud-tooltip.mud-tooltip-default {
    color: #eef4fb;
    background-color: #16202d;
}

.mud-tooltip.mud-tooltip-default.mud-tooltip-arrow::after {
    border-color: #16202d transparent transparent transparent;
}

.mud-tooltip-root,
.app-tooltip-target {
    cursor: help;
}

.mud-tooltip-root :is(button, a, [role="button"]),
.app-tooltip-target :is(button, a, [role="button"]) {
    cursor: pointer;
}

.attendance-report-tooltip-root {
    width: 100%;
}

.app-tooltip-content {
    display: grid;
    min-width: 11rem;
    gap: .55rem;
}

.app-tooltip-title {
    padding-bottom: .45rem;
    border-bottom: 1px solid rgba(168, 188, 214, .2);
    color: #f7faff;
    font-size: .875rem;
    font-weight: 700;
}

.app-tooltip-body {
    color: #cbd7e6;
    font-weight: 400;
}

.app-tooltip-grid {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 1rem;
    row-gap: .4rem;
    align-items: baseline;
}

.app-tooltip-label {
    color: #91a4bd;
}

.app-tooltip-value {
    color: #f1f5fa;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.app-tooltip-value-accent {
    color: #f2c96d;
}

.audit-details-tooltip-root {
    width: 100%;
}

.audit-details-tooltip {
    max-width: 22rem;
    overflow-wrap: anywhere;
}

/* MudContainer is rendered inside the layout component, so this spacing must
   live in the global stylesheet rather than MainLayout's isolated stylesheet. */
.app-content {
    padding-top: 2rem !important;
    padding-bottom: 2.5rem !important;
}

/* MudDrawer renders outside MainLayout's CSS-isolation boundary. Keep the
   collapsed rail scrollable without showing a distracting narrow scrollbar. */
.shell-drawer-collapsed,
.shell-drawer-collapsed .mud-drawer-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.shell-drawer-collapsed::-webkit-scrollbar,
.shell-drawer-collapsed .mud-drawer-content::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.mud-input-label,
.mud-input-helper-text {
    color: var(--mud-palette-text-secondary);
}

.mud-table-cell.sticky-right {
    background-color: var(--mud-palette-surface) !important;
    box-shadow: -1px 0 0 var(--mud-palette-lines-default);
}

/* Explicit fallbacks for MudBlazor components which use the semantic Info
   palette directly instead of the theme's primary contrast token. */
.mud-button-filled-info,
.mud-chip-filled.mud-chip-color-info,
.mud-tabs-tabbar-info {
    color: var(--mud-palette-info-text) !important;
}

/* MudGrid uses negative gutters; keep dashboard operation panels below their tab hit area. */
.operations-tabs > .mud-tabs-tabbar {
    position: relative;
    z-index: 2;
}

.operations-tabs > .operations-tab-panel {
    min-height: 25rem;
    padding: 2.5rem .25rem .5rem !important;
}

/* PanelClass is rendered inside MudTabs and therefore cannot be reached
   reliably from the page's isolated stylesheet. */
.attendance-settings-page .attendance-tab-panel {
    min-height: 28rem;
    padding: 1.5rem 1.25rem !important;
}

.device-details-page .device-tab-panel {
    padding-top: 1.5rem !important;
}

.dashboard-page .dashboard-primary-panel {
    min-height: 34rem;
    padding: .5rem 1.25rem 1.5rem !important;
}

.platform-admin .admin-tab-panel {
    padding: 2rem 1.5rem 1.5rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: var(--mud-palette-surface);
}

.feature-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: .5rem 0 4rem;
}

.feature-page-header {
    padding-bottom: .5rem;
}

.feature-page-header .mud-typography-body1 {
    margin-top: .5rem;
    max-width: 800px;
}

.feature-table-surface {
    padding: 1rem 1.25rem;
}

.feature-table-surface .mud-table-root {
    margin-top: .25rem;
}

.mud-table-container + .mud-table-pagination {
    margin-top: .75rem;
}

@media (max-width: 720px) {
    .app-content { padding-top: 1rem !important; }
    .feature-page { padding-top: 0; }
    .feature-table-surface { padding: .5rem; }
    .dashboard-page .dashboard-primary-panel { padding-inline: .25rem !important; }
    .platform-admin .admin-tab-panel { padding: 1.4rem .85rem 1rem; }
}

@media (min-width: 960px) {
    .attendance-settings-page .attendance-tab-panel { padding-inline: 2rem !important; }
    .dashboard-page .dashboard-primary-panel { padding-inline: 2rem !important; }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    position: fixed;
    display: none;
    inset: 0;
    padding: 1.25rem;
    background-color: rgba(5, 9, 15, .72);
    z-index: 10020;
    text-align: center;
    backdrop-filter: blur(7px);
}

    #blazor-error-ui .blazor-error-card {
        width: min(31rem, calc(100% - 2.5rem));
        padding: 2rem;
        border-radius: 1rem;
        color: #e7edf6;
        background: #121821;
        border: 1px solid #2b3748;
        box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    #blazor-error-ui .blazor-error-icon {
        display: grid;
        place-items: center;
        width: 3.25rem;
        height: 3.25rem;
        border-radius: 50%;
        color: #ffb74d;
        background: rgba(255, 183, 77, .12);
        font-size: 1.5rem;
        font-weight: 700;
    }

    #blazor-error-ui strong {
        color: #f2f6fc;
        font-size: 1.2rem;
    }

    #blazor-error-ui p {
        margin: 0;
        color: #aab8ca;
        line-height: 1.55;
    }

    #blazor-error-ui .reload {
        min-height: 2.75rem;
        padding: .65rem 1.25rem;
        border-radius: .65rem;
        color: #07111f;
        background: #7caeff;
        font-weight: 600;
        text-decoration: none;
    }

    #blazor-error-ui .reload:hover {
        background: #9bc2ff;
    }
/* Google permits hiding the v3 badge when its required disclosure remains visible in the sign-in flow. */
.grecaptcha-badge {
    visibility: hidden !important;
}
