﻿.mud-theme-light {
    --hfz-table-header-bg: #1565C0;
    --hfz-table-row-bg: #E3F2FD;
    --hfz-table-header-color: #FFFFFF;
    --hfz-table-row-color: #000000;
}

.mud-theme-dark {
    --hfz-table-header-bg: #0D47A1;
    --hfz-table-row-bg: #1565C0;
    --hfz-table-header-color: #FFFFFF;
    --hfz-table-row-color: #FFFFFF;
}

.appbar-title {
    width: 50px;
    margin-right: 10px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(24px, 3vw, 24px);
    color: #0277BD;
}

.app-logo {
    margin-right: 5px;
}


.mud-layout {
    height: 100vh;
}

.mud-container {
    padding: 15px 10px !important;
}

.ltr-input input,
.ltr-input textarea {
    direction: ltr !important;
    text-align: left !important;
}

    /* ===================================================
       Pie Chart Styles
       =================================================== */

    /* کانتینر و خود SVG */
    .custom-pie-chart svg {
        overflow: visible !important;
        isolation: isolate;
        transform-origin: center;
        animation: piePopIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }

    /* استایل اسلایس‌ها */
    .custom-pie-chart path {
        cursor: pointer;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease, opacity 0.2s ease;
        transform-origin: center;
        stroke: var(--mud-palette-surface, #ffffff);
        stroke-width: 2px;
    }

        /* هاور روی اسلایس پای */
        .custom-pie-chart path:hover {
            transform: scale(1.01);
            filter: drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.6));
            opacity: 1;
        }

    /* مات شدن سایر قطعات پای هنگام هاور */
    /* .custom-pie-chart svg:hover path:not(:hover) {
        
        filter: grayscale(85%);
    } */

    @keyframes piePopIn {
        0%

    {
        transform: scale(0.6) rotate(-25deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    }


    /* ===================================================
       Bar Chart Styles
       =================================================== */

    /* کانتینر بار چارت */
    .custom-bar-chart ::deep svg {
        overflow: visible !important;
    }

    /* در MudBlazor میله‌ها بسته به نسخه با path یا rect رسم می‌شوند */
    .custom-bar-chart .mud-chart-bar path,
    .custom-bar-chart .mud-chart-bar rect,
    .custom-bar-chart .mud-charts-bar-series path,
    .custom-bar-chart g.mud-chart-serie path {
        cursor: pointer;
        rx: 5px;
        ry: 5px;
        transform-box: fill-box;
        transform-origin: bottom center;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s ease, opacity 0.2s ease;
        animation: barGrowUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    }

        /* هاور روی هر میله */
        .custom-bar-chart .mud-chart-bar path:hover,
        .custom-bar-chart .mud-chart-bar rect:hover,
        .custom-bar-chart .mud-charts-bar-series path:hover,
        .custom-bar-chart g.mud-chart-serie path:hover {
            transform: scaleY(1.05) scaleX(1.03);
            filter: drop-shadow(0px 6px 12px rgba(0, 0, 0, 0.25)) brightness(1.1);
            opacity: 1;
        }

    /* انیمیشن لود میله‌ها */
    @keyframes barGrowUp {
        0%

    {
        transform: scaleY(0);
        opacity: 0;
    }

    100% {
        transform: scaleY(1);
        opacity: 1;
    }

    }

    /* استایل متون و محورها */
    .custom-bar-chart text {
        font-family: inherit !important;
        font-size: 0.8rem;
        fill: var(--mud-palette-text-secondary, #757575);
    }

    .custom-bar-chart line {
        stroke: var(--mud-palette-lines-default, rgba(0, 0, 0, 0.1));
        stroke-dasharray: 4 4;
    }

@media (max-width: 600px) {
    .mud-xs-table .mud-table-cell {
        align-items: stretch;
    }

    .mud-container, .mud-card-content {
        padding: 10px 10px !important;
    }

    .mud-main-content {
        padding: 55px 5px !important;
    }

    .mud-paper{
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    .mud-dialog-width-sm, .mud-dialog-width-full {
        width: calc(100% - 30px);
    }

    .mud-dialog .mud-dialog-content {
        padding: 8px 12px;
    }

    .mud-snackbar-provider {
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        max-width: none !important;
        width: auto !important;
        align-items: stretch !important;
    }

    /* تک‌تک آیتم‌های اسنک‌بار در حالت موبایل تمام‌عرض شوند -- */
    .mud-snackbar-provider .mud-snackbar {
        width: 100% !important;
        max-width: 100% !important;
        margin: 4px 0 !important;
    }

    .mud-snackbar-location-bottom-right {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }

}