/* MudBlazor Theme Override - Force Blue Colors */
/* This file ensures all MudBlazor components use TeyaWebApp's default blue theme */

/* Override MudBlazor primary colors globally */
:root {
    --mud-palette-primary: #1976D2 !important;
    --mud-palette-primary-rgb: 25, 118, 210 !important;
    --mud-palette-primary-text: #FFFFFF !important;
    --mud-palette-primary-darken: #1565C0 !important;
    --mud-palette-primary-lighten: #42A5F5 !important;
    --mud-palette-secondary: #424242 !important;
    --mud-palette-secondary-rgb: 66, 66, 66 !important;
    --mud-palette-appbar-background: #1565C0 !important;
    --mud-palette-drawer-icon: #1976D2 !important;
    --mud-palette-action-default: #1976D2 !important;
}

/* Force MudButton primary colors */
::deep .mud-button-filled.mud-button-filled-primary {
    background-color: #1976D2 !important;
    color: #FFFFFF !important;
}

::deep .mud-button-filled.mud-button-filled-primary:hover {
    background-color: #1565C0 !important;
}

::deep .mud-button-outlined.mud-button-outlined-primary {
    border-color: #1976D2 !important;
    color: #1976D2 !important;
}

::deep .mud-button-text.mud-button-text-primary {
    color: #1976D2 !important;
}

/* Force MudAppBar colors */
::deep .mud-appbar {
    background-color: #1565C0 !important;
    color: #FFFFFF !important;
}

/* Force AppBar icons to be white */
::deep .mud-appbar .mud-icon-button {
    color: #FFFFFF !important;
}

::deep .mud-appbar .mud-icon-button .mud-icon {
    color: #FFFFFF !important;
}

::deep .mud-appbar .mud-menu .mud-icon {
    color: #FFFFFF !important;
}

::deep .mud-appbar .mud-button {
    color: #FFFFFF !important;
}

/* Force MudDrawer colors */
::deep .mud-drawer {
    background-color: #F5F5F5 !important;
}

::deep .mud-nav-link-icon {
    color: #1976D2 !important;
}

::deep .mud-nav-link.active {
    background-color: rgba(25, 118, 210, 0.12) !important;
    color: #1976D2 !important;
}

::deep .mud-nav-link.active .mud-nav-link-icon {
    color: #1976D2 !important;
}

/* Force MudIconButton colors */
::deep .mud-icon-button.mud-icon-button-color-primary {
    color: #1976D2 !important;
}

/* Force MudTextField colors */
::deep .mud-input-control.mud-input-control-margin-normal.mud-select {
    border-color: #1976D2 !important;
}

::deep .mud-input-control.mud-input-control-margin-normal.mud-select:focus-within {
    border-color: #1976D2 !important;
}

::deep .mud-input-label.mud-input-label-animated.mud-input-label-color-primary {
    color: #1976D2 !important;
}

/* Force MudCheckBox colors */
::deep .mud-checkbox.mud-checkbox-color-primary .mud-checkbox-input:checked + .mud-checkbox-icon {
    color: #1976D2 !important;
}

/* Force MudRadio colors */
::deep .mud-radio.mud-radio-color-primary .mud-radio-input:checked + .mud-radio-icon {
    color: #1976D2 !important;
}

/* Force MudSwitch colors */
::deep .mud-switch.mud-switch-color-primary .mud-switch-input:checked + .mud-switch-track {
    background-color: rgba(25, 118, 210, 0.5) !important;
}

::deep .mud-switch.mud-switch-color-primary .mud-switch-input:checked + .mud-switch-track .mud-switch-thumb {
    background-color: #1976D2 !important;
}

/* Force MudSlider colors */
::deep .mud-slider.mud-slider-color-primary .mud-slider-track {
    background-color: #1976D2 !important;
}

::deep .mud-slider.mud-slider-color-primary .mud-slider-thumb {
    background-color: #1976D2 !important;
}

/* Force MudProgressCircular colors */
::deep .mud-progress-circular.mud-progress-color-primary svg circle {
    stroke: #1976D2 !important;
}

/* Force MudProgressLinear colors */
::deep .mud-progress-linear.mud-progress-color-primary .mud-progress-linear-bar {
    background-color: #1976D2 !important;
}

/* Force MudChip colors */
::deep .mud-chip.mud-chip-color-primary {
    background-color: #1976D2 !important;
    color: #FFFFFF !important;
}

/* Force MudBadge colors */
::deep .mud-badge.mud-badge-color-primary {
    background-color: #1976D2 !important;
    color: #FFFFFF !important;
}

/* Force MudAlert colors */
::deep .mud-alert.mud-alert-filled-info {
    background-color: #1976D2 !important;
    color: #FFFFFF !important;
}

/* Force MudTabs colors */
::deep .mud-tabs .mud-tab.mud-tab-active {
    color: #1976D2 !important;
    border-bottom-color: #1976D2 !important;
}

::deep .mud-tabs .mud-tab:hover {
    color: #1976D2 !important;
}

/* Force MudMenu colors */
::deep .mud-menu-item:hover {
    background-color: rgba(25, 118, 210, 0.08) !important;
}

::deep .mud-menu-item.mud-menu-item-active {
    background-color: rgba(25, 118, 210, 0.12) !important;
    color: #1976D2 !important;
}

/* Force MudPagination colors */
::deep .mud-pagination .mud-pagination-item.mud-pagination-item-selected {
    background-color: #1976D2 !important;
    color: #FFFFFF !important;
}

/* Force MudFab colors */
::deep .mud-fab.mud-fab-color-primary {
    background-color: #1976D2 !important;
    color: #FFFFFF !important;
}

/* Force MudSpeedDial colors */
::deep .mud-speed-dial .mud-speed-dial-fab.mud-fab-color-primary {
    background-color: #1976D2 !important;
    color: #FFFFFF !important;
}

/* Force MudTimeline colors */
::deep .mud-timeline-item .mud-timeline-item-dot.mud-timeline-item-dot-color-primary {
    background-color: #1976D2 !important;
}

/* Force MudStepper colors */
::deep .mud-stepper .mud-stepper-step.mud-stepper-step-active .mud-stepper-step-icon {
    background-color: #1976D2 !important;
    color: #FFFFFF !important;
}

::deep .mud-stepper .mud-stepper-step.mud-stepper-step-completed .mud-stepper-step-icon {
    background-color: #1976D2 !important;
    color: #FFFFFF !important;
}

/* Force MudRating colors */
::deep .mud-rating .mud-rating-item.mud-rating-item-active {
    color: #1976D2 !important;
}

/* Force MudCarousel colors */
::deep .mud-carousel .mud-carousel-bullets .mud-carousel-bullet.mud-carousel-bullet-active {
    background-color: #1976D2 !important;
}

/* Force MudExpansionPanels colors */
::deep .mud-expand-panel .mud-expand-panel-header:hover {
    background-color: rgba(25, 118, 210, 0.04) !important;
}

/* Force MudDataGrid colors */
::deep .mud-table .mud-table-head .mud-table-cell {
    background-color: rgba(25, 118, 210, 0.08) !important;
}

::deep .mud-table .mud-table-row:hover {
    background-color: rgba(25, 118, 210, 0.04) !important;
}

/* Force MudTreeView colors */
::deep .mud-treeview-item.mud-treeview-item-selected {
    background-color: rgba(25, 118, 210, 0.12) !important;
    color: #1976D2 !important;
}

/* Force any remaining purple colors to blue */
::deep [style*="#512BD4"], ::deep [style*="#512bd4"] {
    color: #1976D2 !important;
    background-color: #1976D2 !important;
    border-color: #1976D2 !important;
}

::deep [style*="#DFD8F7"], ::deep [style*="#dfd8f7"] {
    color: #424242 !important;
    background-color: #F5F5F5 !important;
    border-color: #424242 !important;
}

::deep [style*="#2B0B98"], ::deep [style*="#2b0b98"] {
    color: #1565C0 !important;
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
}

/* Mobile-specific overrides */
@media (max-width: 768px) {
    .mud-appbar {
        background-color: #1565C0 !important;
        color: #FFFFFF !important;
    }

    .mud-appbar .mud-icon-button {
        color: #FFFFFF !important;
    }

    .mud-appbar .mud-icon-button .mud-icon {
        color: #FFFFFF !important;
    }

    .mud-appbar .mud-menu .mud-icon {
        color: #FFFFFF !important;
    }

    .mud-nav-link-icon {
        color: #1976D2 !important;
    }

    .mud-icon-button {
        color: #1976D2 !important;
    }

    .mud-button-filled.mud-button-filled-primary {
        background-color: #1976D2 !important;
        color: #FFFFFF !important;
    }
}

/* Force theme variables for mobile */
.mud-theme-provider {
    --mud-palette-primary: #1976D2 !important;
    --mud-palette-primary-rgb: 25, 118, 210 !important;
    --mud-palette-appbar-background: #1565C0 !important;
    --mud-palette-drawer-icon: #1976D2 !important;
    --mud-palette-action-default: #1976D2 !important;
}

/* Specific overrides for mobile top bar */
::deep .mobile-top-bar {
    background-color: #1565C0 !important;
    color: #FFFFFF !important;
}

::deep .mobile-top-bar .mud-icon-button {
    color: #FFFFFF !important;
}

::deep .mobile-top-bar .mud-icon-button .mud-icon {
    color: #FFFFFF !important;
}

::deep .mobile-top-bar .mud-menu .mud-icon {
    color: #FFFFFF !important;
}

::deep .mobile-top-bar .mud-button {
    color: #FFFFFF !important;
}

/* Web app bar overrides */
::deep .web-app-bar {
    background-color: #1565C0 !important;
    color: #FFFFFF !important;
}

::deep .web-app-bar .mud-icon-button {
    color: #FFFFFF !important;
}

::deep .web-app-bar .mud-icon-button .mud-icon {
    color: #FFFFFF !important;
}

::deep .web-app-bar .mud-menu .mud-icon {
    color: #FFFFFF !important;
}

::deep .web-app-bar .mud-button {
    color: #FFFFFF !important;
}

/* Force specific Material Icons to be white in AppBar */
::deep .mud-appbar .mud-icon-button[aria-label*="Menu"] {
    color: #FFFFFF !important;
}

::deep .mud-appbar .mud-menu-activator .mud-icon {
    color: #FFFFFF !important;
}

::deep .mud-appbar .mud-icon-button .mud-icon.material-icons {
    color: #FFFFFF !important;
}

/* Force Color.Inherit to be white in AppBar context */
::deep .mud-appbar .mud-icon-button-color-inherit {
    color: #FFFFFF !important;
}

::deep .mud-appbar .mud-menu-color-inherit .mud-icon {
    color: #FFFFFF !important;
}

/* Override any Material Icons specifically */
::deep .mud-appbar .material-icons {
    color: #FFFFFF !important;
}

/* Force burger menu and user icons specifically */
::deep .mud-appbar .mud-icon-button[title*="menu"] {
    color: #FFFFFF !important;
}

::deep .mud-appbar .mud-icon-button[title*="account"] {
    color: #FFFFFF !important;
}
