﻿/* =========================================================
   MPE — BASE STRUCTURE (بدون رنگ)
   Version 5.0
   فونت: وزیرمتن (CDN)
   ========================================================= */

/* ═══ VAZIRMATN — فونت اصلی ═══ */
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ═══ BASE ═══ */
html {
    direction: rtl;
    font-size: 16px;
}

html,
body,
button,
input,
select,
textarea,
.form-control,
.form-select,
.btn,
.table,
.dropdown-menu,
.modal {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

body {
    margin: 0;
    direction: rtl;
    font-size: 1rem;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    max-width: 100%;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ═══ HEADER STRUCTURE — مشترک بین همه تم‌ها ═══ */
header {
    display: block;
    width: 100%;
    position: relative;
    z-index: 10;
}

    header .container-fluid {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

.mpe-header-logo {
    width: 80px;
    height: 80px;
    max-width: 80px;
    max-height: 80px;
    object-fit: cover;
    border-radius: 50%;
    padding: 2px;
    display: inline-block;
    transition: all 0.35s ease;
}

    .mpe-header-logo:hover {
        transform: scale(1.05) rotate(-3deg);
    }

.mpe-header-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.mpe-header-title__line1 {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.3px;
    margin: 0;
    text-align: center;
}

.mpe-header-title__line2 {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: clamp(0.9rem, 1.4vw, 1.15rem);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.5px;
    margin: 0;
    text-align: center;
}

/* ═══ HEADER MOBILE ═══ */
@media (max-width: 991px) {
    .mpe-header-logo {
        width: 60px;
        height: 60px;
        max-width: 60px;
        max-height: 60px;
    }

    .mpe-header-title {
        min-height: 60px;
    }

    .mpe-header-title__line1 {
        font-size: 1rem;
    }

    .mpe-header-title__line2 {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .mpe-header-logo {
        width: 50px;
        height: 50px;
        max-width: 50px;
        max-height: 50px;
    }
}

/* ═══ NAVBAR STRUCTURE ═══ */
.mpe-navbar {
    transition: all 0.3s ease;
}

    .mpe-navbar .navbar-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        padding: 4px 10px;
        border-radius: 8px;
        transition: all 0.25s ease;
    }

        .mpe-navbar .navbar-toggler i {
            color: inherit;
            line-height: 1;
        }

/* ═══ CARDS ═══ */
.card {
    border-radius: 16px !important;
    transition: all 0.3s ease;
}

/* ═══ FORMS ═══ */
.form-control,
.form-select {
    border-radius: 10px !important;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

/* ═══ BUTTONS ═══ */
.btn {
    border-radius: 10px !important;
    transition: all 0.3s ease;
}

/* ═══ TABLES ═══ */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

    .table thead th {
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
        padding: 12px 16px;
    }

    .table tbody td {
        vertical-align: middle;
        padding: 12px 16px;
    }

/* ═══ CHECKBOXES (Toggle Switch) ═══ */
input[type="checkbox"]:not(.btn-check),
input[type="checkbox"].form-check-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 3.2rem !important;
    height: 1.75rem !important;
    border-radius: 50px !important;
    position: relative !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    vertical-align: middle !important;
    background-color: #e2e8f0 !important;
    border: none !important;
}

    input[type="checkbox"]:not(.btn-check)::before,
    input[type="checkbox"].form-check-input::before {
        content: '' !important;
        position: absolute !important;
        width: 1.25rem !important;
        height: 1.25rem !important;
        border-radius: 50% !important;
        right: 2px !important;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
        background-color: #fff !important;
    }

    input[type="checkbox"]:not(.btn-check):checked,
    input[type="checkbox"].form-check-input:checked {
        background-color: #c9a227 !important;
    }

        input[type="checkbox"]:not(.btn-check):checked::before,
        input[type="checkbox"].form-check-input:checked::before {
            right: calc(100% - 1.45rem) !important;
        }

}
.mpe-floating-cta {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9990;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

    .mpe-floating-cta .cta-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        font-size: 15px;
        transition: all 0.3s ease;
    }

    .mpe-floating-cta:hover .cta-icon {
        transform: rotate(-12deg) scale(1.1);
    }

    .mpe-floating-cta .cta-text {
        line-height: 1;
        white-space: nowrap;
    }

/* ═══ SCROLL TOP STRUCTURE ═══ */
.mpe-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9989;
}

    .mpe-scroll-top.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mpe-scroll-top:hover {
        transform: translateY(-4px) scale(1.1);
    }

/* ═══ RESPONSIVE — CTA & ScrollTop ═══ */
@media (max-width: 768px) {
    .mpe-floating-cta {
        bottom: 16px;
        left: 16px;
        right: 84px;
        justify-content: center;
        padding: 12px 18px;
        font-size: 0.88rem;
    }

    .mpe-scroll-top {
        bottom: 16px;
        right: 16px;
        width: 46px;
        height: 46px;
        font-size: 18px;
    }
}

@media print {
    .mpe-floating-cta,
    .mpe-scroll-top {
        display: none !important;
    }
}

/* ═══ THEME SWITCHER STRUCTURE ═══ */
.theme-switcher-container {
    position: fixed !important;
    top: 50% !important;
    left: -30px !important;
    transform: translateY(-50%) !important;
    z-index: 99999 !important;
    transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

    .theme-switcher-container:hover {
        left: 0 !important;
    }

    .theme-switcher-container .btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
    }

        .theme-switcher-container .btn:hover {
            transform: scale(1.1) rotate(15deg);
        }
/* ═══ FLOATING CTA STRUCTURE ═══ */
.mpe-floating-cta {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    right: auto !important; /* ⭐ قفل کردن در سمت چپ */
    z-index: 9990;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

    .mpe-floating-cta .cta-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        font-size: 15px;
        transition: all 0.3s ease;
    }

    .mpe-floating-cta:hover .cta-icon {
        transform: rotate(-12deg) scale(1.1);
    }

    .mpe-floating-cta .cta-text {
        line-height: 1;
        white-space: nowrap;
    }

/* ═══ RESPONSIVE — CTA & ScrollTop ═══ */
/* ═══ FLOATING CTA STRUCTURE ═══ */
.mpe-floating-cta {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    right: auto !important;
    z-index: 9999 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 14px 22px !important;
    border-radius: 999px !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    font-weight: 800 !important;
    font-size: 0.92rem !important;
    text-decoration: none !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

    .mpe-floating-cta .cta-icon {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 28px !important;
        height: 28px !important;
        border-radius: 50% !important;
        font-size: 15px !important;
        transition: all 0.3s ease !important;
    }

    .mpe-floating-cta:hover {
        transform: translateY(-4px) scale(1.05) !important;
    }

        .mpe-floating-cta:hover .cta-icon {
            transform: rotate(-12deg) scale(1.1) !important;
        }

    .mpe-floating-cta .cta-text {
        line-height: 1 !important;
        white-space: nowrap !important;
    }

/* ═══ SCROLL TOP STRUCTURE ═══ */
.mpe-scroll-top {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    cursor: pointer !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 9989 !important;
}

    .mpe-scroll-top.visible {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    .mpe-scroll-top:hover {
        transform: translateY(-4px) scale(1.1) !important;
    }

/* ═══ RESPONSIVE — CTA & ScrollTop ═══ */
@media (max-width: 768px) {
    .mpe-floating-cta {
        bottom: 16px !important;
        left: 16px !important;
        right: auto !important;
        padding: 10px 18px !important;
        font-size: 0.85rem !important;
    }

        .mpe-floating-cta .cta-icon {
            width: 24px !important;
            height: 24px !important;
            font-size: 13px !important;
        }

    .mpe-scroll-top {
        bottom: 16px !important;
        right: 16px !important;
        width: 46px !important;
        height: 46px !important;
        font-size: 18px !important;
    }
}

@media print {
    .mpe-floating-cta,
    .mpe-scroll-top {
        display: none !important;
    }
}

/* ═══ THEME SWITCHER STRUCTURE ═══ */
.theme-switcher-container {
    position: fixed !important;
    top: 50% !important;
    left: -30px !important;
    transform: translateY(-50%) !important;
    z-index: 99999 !important;
    transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

    .theme-switcher-container:hover {
        left: 0 !important;
    }

    .theme-switcher-container .btn {
        width: 60px !important;
        height: 60px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: transform 0.3s ease !important;
    }

        .theme-switcher-container .btn:hover {
            transform: scale(1.1) rotate(15deg) !important;
        }


/* ═══ SMART CHECKBOX (TEXT FIRST, SWITCH LAST) ═══ */
.form-check {
    display: flex !important;
    flex-direction: row-reverse !important; /* متن اول، چک‌باکس بعد */
    align-items: center !important;
    justify-content: flex-end !important; /* چیدمان از راست شروع شود */
    padding: 0 !important;
    margin: 0 !important;
    gap: 0.75rem !important; /* فاصله بین متن و چک‌باکس */
}

    /* چک‌باکس را از حالت شناور خارج کن */
    .form-check input[type="checkbox"] {
        position: static !important;
        margin: 0 !important;
        flex-shrink: 0 !important; /* سوییچ کوچک نشود */
    }

    /* لیبل (متن) */
    .form-check label {
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
    }

/* اگر asp:CheckBox یک span با کلاس form-check ساخت، آن را هم مدیریت می‌کنیم */
span.form-check {
    display: inline-flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

/* Full-page blocker shown by Controls/General/ucUpdateProgress. */
.mpe-waiting {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(12, 18, 32, 0.48);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    cursor: wait;
    pointer-events: all;
}

.mpe-waiting-box {
    min-width: 220px;
    padding: 1.75rem 2rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.22);
    text-align: center;
}

.mpe-waiting-spinner {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.mpe-spinner-circle {
    width: 3rem;
    height: 3rem;
    border: 5px solid #e9ecef;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: mpeUpdateProgressSpin 0.75s linear infinite;
}

.mpe-waiting-text {
    color: #343a40;
    font-size: 1rem;
    font-weight: 600;
}

@keyframes mpeUpdateProgressSpin {
    to { transform: rotate(360deg); }
}
