﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    .sidebar {
        position: relative;
        transform: none !important;
        box-shadow: none;
    }

        .sidebar.sidebar-collapsed {
            width: 80px;
        }

    .content.expanded {
        margin-right: 80px;
    }

    .content {
        margin-right: 250px;
        transition: margin 0.3s ease;
    }
    /*html {
        font-size: 16px;
    }

    .sidebar {
        position: fixed;
        top: 56px;
        right: 0;
        width: 250px;
        height: calc(100vh - 56px);
        background-color: #fff;
        border-left: 1px solid #ddd;
        padding: 1rem;
        z-index: 1000;
        overflow-y: auto;*/
        /* در دسکتاپ سایدبار همیشه نمایان است */
        /*transform: translateX(0);
        transition: none;
    }
        .sidebar.sidebar-collapsed {
            width: 80px;
        }

    .content {
        margin-right: 250px;
        padding: 2rem;
        margin-top: 56px;
    }

    #toggleSidebarBtn {
        display: none !important;
    }

    .sidebar .nav-link.active {
        font-weight: bold;
        color: #0d6efd !important;
    }*/
}
/* در موبایل نزار محتوا جابه‌جا شه */
@media (max-width: 767px) {
    .content {
        margin-right: 0 !important;
    }
}
/* موبایل و تبلت (کمتر از 768px) */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        right: 0;
        width: 220px;
        height: calc(100vh - 56px);
        background-color: #fff;
        box-shadow: -2px 0 5px rgba(0,0,0,0.15);
        padding-left: 1rem;
        overflow-y: auto;
        /* مخفی از سمت راست */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1200;
    }

        /* وقتی کلاس show دارد، سایدبار ظاهر می‌شود */
        .sidebar.show {
            transform: translateX(0);
        }

    .content {
        margin: 0;
        padding: 1rem;
        margin-top: 56px;
    }

    /* دکمه فلش باز/بسته کردن سایدبار */
    #toggleSidebarBtn {
        position: fixed;
        top: 65px;
        right: 10px;
        z-index: 1300;
        background-color: #0d6efd;
        color: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0,0,0,0.3);
        font-size: 22px;
    }
}

/* رفع فاصله اضافی سمت راست در موبایل */
@media (max-width: 767.98px) {
    .sidebar {
        width: 220px;
    }

    .content {
        margin-right: 0;
        padding: 1rem;
    }

    #toggleSidebarBtn {
        display: flex;
    }
    


    .container-fluid, .row {
        margin: 0;
        padding: 0;
    }

    .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;
    }

    html {
        position: relative;
        min-height: 100%;
    }

    body {
        margin-bottom: 60px;
    }
}


