﻿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;
    }
}


/*نمایش توست*/
.toast-modern {
    border-radius: 14px;
    animation: slideUpFade 0.4s ease-out;
}

.toast-icon {
    opacity: 0.9;
}

@keyframes slideUpFade {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}
  

/*نمایش هینت در ایندکس*/
.card-action {
    position: relative;
    cursor: pointer;
}

.card-help {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #212529;
    color: #fff;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    pointer-events: none;
    z-index: 10;
}

    .card-help.show {
        opacity: 1;
        visibility: visible;
    }


/*نمایش متن قبل از کارت ها*/
.intro-box {
    background: linear-gradient(180deg, #f8f9fa, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 18px 20px;
    color: #444;
}

    .intro-box p {
        font-size: 14px;
        line-height: 1.8;
        color: #666;
    }
