@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@font-face {
    font-family: 'Vazir';
    src: url('/fonts/Vazir.woff2') format('woff2'), url('/fonts/Vazir.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


html, body,
.mud-typography,
.mud-input,
.mud-input-control,
.mud-button,
.mud-table,
.mud-nav-link,
.mud-tab,
.mud-alert {
    font-family: 'Vazir', Tahoma, 'Segoe UI', sans-serif !important;
}

/* ——— RTL و تراز متن فارسی (بدون چپ‌چین) ——— */
html[dir="rtl"],
html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] body {
    text-align: right;
}

.mud-table-container,
.mud-data-grid,
.pwa-scrollbar,
.watchman-grid-scroll,
.ob-list-scroll,
.portfolio-grid-scroll,
.stock-peers-scroll,
.ob-depth-table-wrap {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

.mud-table,
.mud-data-grid,
.ob-depth-native-table,
.stock-ind-table {
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.mud-table .mud-table-row,
.mud-data-grid .mud-table-row {
    transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

.mud-table .mud-table-row:hover,
.mud-data-grid .mud-table-row:hover {
    background-color: rgba(2, 132, 199, 0.045);
}

body.dark-mode .mud-table .mud-table-row:hover,
body.dark-mode .mud-data-grid .mud-table-row:hover {
    background-color: rgba(125, 211, 252, 0.07);
}

.mud-table .mud-table-cell,
.mud-data-grid .mud-table-cell {
    vertical-align: middle;
}

.mud-table-head .mud-table-cell,
.mud-data-grid .mud-table-head .mud-table-cell {
    font-weight: 700;
    white-space: nowrap;
}

.mud-layout,
.mud-main-content,
.mud-container,
.pwa-content,
.mud-paper,
.mud-card-content,
.mud-typography-body1,
.mud-typography-body2,
.mud-typography-subtitle1,
.mud-typography-subtitle2,
.mud-typography-h5,
.mud-typography-h6,
p,
li,
label {
    text-align: inherit;
}

/* هشدارها و پیام‌های سیستمی — وسط‌چین */
.mud-alert {
    direction: rtl !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100%;
    box-sizing: border-box;
}

.mud-alert .mud-alert-position {
    flex: 0 1 auto !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

.mud-alert .mud-alert-message {
    display: flex !important;
    flex: 0 1 auto;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: auto;
    max-width: 100%;
    margin: 0 !important;
}

.mud-alert .mud-alert-icon {
    align-self: center;
    margin-inline-end: 8px;
    margin-inline-start: 0;
}

/* جدول/گرید: پیام خالی وسط */
.mud-table-no-records .mud-alert,
.mud-data-grid .mud-alert,
td .mud-alert,
.app-alert {
    width: 100%;
}

.mud-snackbar-content-message,
.mud-dialog-content {
    text-align: right;
}

.mud-chip,
.mud-button-label {
    direction: rtl;
}

/* نواحی LTR فقط برای اعداد/نمودار */
[dir="ltr"],
.dir-ltr,
.wm-num,
.ob-num,
.signed-num,
.mareq-marquee,
.mareq-marquee .mareq-track {
    direction: ltr;
    text-align: center;
    unicode-bidi: isolate;
}

.pwa-chart-wrap {
    position: relative;
    width: 100%;
    height: 150px;
    min-height: 150px;
    max-height: 150px;
}

.pwa-chart-wrap__loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.92);
}

body.dark-mode .pwa-chart-wrap__loading {
    background: rgba(30, 30, 30, 0.92);
}

.pwa-chart-wrap__loading-text {
    font-size: 0.8rem;
    color: var(--mud-palette-text-secondary);
}

.pwa-chart-canvas {
    position: relative;
    width: 100%;
    height: 150px;
    min-height: 150px;
    max-height: 150px;
}

.pwa-chart-canvas {
    width: 100% !important;
    height: 150px !important;
    max-height: 150px;
    max-width: 100%;
    font-family: 'Vazir', Tahoma, sans-serif;
}

/* ارقام لاتین در متن‌های رندرشده با persian-digits.js به ۰–۹ تبدیل می‌شوند */

.news-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.dark-mode .news-card {
    background: #242836;
    border-color: rgba(226, 232, 240, 0.12);
    box-shadow: none;
}

.news-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.news-card__link:hover .news-card__title {
    text-decoration: underline;
}

.news-card__link:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.news-card:hover {
    border-color: rgba(2, 132, 199, 0.28);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

body.dark-mode .news-card:hover {
    border-color: rgba(125, 211, 252, 0.28);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.news-card__body {
    padding: 8px 12px !important;
}

.news-card__title {
    margin: 0 0 4px 0 !important;
    line-height: 1.45;
    font-size: 0.85rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #075985 !important;
}

body.dark-mode .news-card__title {
    color: #7dd3fc !important;
}

.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 0.7rem;
    line-height: 1.3;
    color: var(--mud-palette-text-secondary);
}

body.dark-mode .news-card__meta,
body.dark-mode .news-card__paper,
body.dark-mode .news-card__time {
    color: rgba(226, 232, 240, 0.68);
}

.news-card__paper {
    color: var(--mud-palette-text-secondary);
}

.news-card__sep {
    opacity: 0.55;
    user-select: none;
}

.news-card__time {
    color: var(--mud-palette-text-secondary);
}

.index-news__lead {
    font-size: 0.82rem;
    line-height: 1.7;
    margin: 0 0 12px;
    text-align: right;
}

/* اخبار سراسری: دو ستون، هر کارت تمام عرض سلول */
.index-news__grid {
    width: 100%;
}

.index-news__grid .index-news__item.mud-grid-item {
    display: block;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.index-news__item .news-card,
.index-news__item .mud-card {
    width: 100%;
    box-sizing: border-box;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    inset-inline: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    direction: rtl;
    text-align: center;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        inset-inline-end: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9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MjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "خطایی در بارگذاری رخ داده است.";
    }


.parent-paper {
        position: relative;
        overflow: hidden; /* این باعث می‌شود که همه چیز خارج از محدوده پدر مخفی شود */
        width: 100%;
    }

    .horizontal-container {
        display: flex;
        animation: slide 30s linear infinite;
    }

    .moving-div {
        background-color: #3f51b5;
        color: white;
        padding: 20px;
        margin: 10px;
        border-radius: 8px;
        flex-shrink: 0;
        /* از اینجا تنظیمات به انیمیشن اضافه می‌شود */
    }

    @keyframes slide {
        0% {
            transform: translateX(100%); /* شروع از سمت راست */
        }
        100% {
            transform: translateX(-100%); /* حرکت به سمت چپ و پنهان شدن */
        }
    }

    /* این به کار می‌رود که محتوا به صورت پیوسته حرکت کند */
    .horizontal-container {
        display: flex;
        animation: slide 30s linear infinite;
    }




.marquee-container {
    width: 100%;
    overflow: hidden;
    background-color: #f5f5f5;
    height: 50px;
    position: relative;
    padding-left: 10px;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 10s linear infinite; /* زمان انیمیشن 30 ثانیه */
}

.marquee-item {
    display: inline-block;
    margin-right: 30px;
    font-weight: bold;
    color: #333;
}

@keyframes marquee {
    0% {
        transform: translateX(100%); /* شروع از سمت راست */
    }

    100% {
        transform: translateX(-100%); /* حرکت به سمت چپ */
    }
}






