/**
 * Heyat System (authenticated shell) UX refine — additive only.
 * References: Material Design 3 (type scale / contrast), Fluent 2 (focus, consistency).
 * Preserves MudBlazor theme tokens and user personalization (--app-font-size).
 */

.heyat-app-shell,
.mud-layout {
    /* Readable floor; still respects user preference when larger */
    font-size: max(15px, var(--app-font-size, 14px));
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* Stronger secondary text contrast (WCAG-oriented) */
.mud-theme-provider .mud-typography-body2,
.mud-theme-provider .mud-typography-caption,
.mud-theme-provider .mud-input-helper-text,
.mud-theme-provider .mud-list-item-text .mud-typography-body2 {
    opacity: 1 !important;
}

.mud-theme-provider:not(.mud-theme-dark) .mud-typography-body2,
.mud-theme-provider:not(.mud-theme-dark) .mud-input-helper-text {
    color: #3f4b5a !important;
}

.mud-theme-provider.mud-theme-dark .mud-typography-body2,
.mud-theme-provider.mud-theme-dark .mud-input-helper-text {
    color: #c9d1d9 !important;
}

/* Consistent primary action emphasis */
.mud-theme-provider .mud-button-filled.mud-button-filled-primary {
    font-weight: 700;
    min-height: 2.5rem;
    letter-spacing: 0.01em;
}

.mud-theme-provider .mud-button-outlined,
.mud-theme-provider .mud-button-text {
    min-height: 2.5rem;
    font-weight: 650;
}

.mud-theme-provider .mud-icon-button {
    min-width: 2.5rem;
    min-height: 2.5rem;
}

/* Keyboard focus visibility (Fluent) */
.mud-theme-provider .mud-button-root:focus-visible,
.mud-theme-provider .mud-icon-button:focus-visible,
.mud-theme-provider .mud-nav-link:focus-visible,
.mud-theme-provider a:focus-visible,
.mud-theme-provider button:focus-visible {
    outline: 3px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

/* Tab bar / breadcrumbs readability */
.heyat-app-shell .mud-tabs .mud-tab,
.mud-layout .mud-tabs .mud-tab {
    font-size: 0.95rem;
    font-weight: 650;
    min-height: 2.75rem;
}

/* Snackbar / alerts remain readable */
.mud-snackbar .mud-snackbar-content-message,
.mud-alert .mud-alert-message {
    font-size: 0.95rem;
    line-height: 1.55;
}

@media (max-width: 960px) {
    .mud-theme-provider .mud-button-filled,
    .mud-theme-provider .mud-button-outlined {
        min-height: 2.75rem;
    }

    .mud-theme-provider .mud-icon-button {
        min-width: 2.75rem;
        min-height: 2.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mud-theme-provider * {
        scroll-behavior: auto !important;
    }
}
