/* Mini sidebar styles moved from includes/mini-sidebar.php */

/* Container */
#mini-sidebar {
    position: fixed;
    top: 30%;
    right: 0;
    transform: translateY(-50%);
    z-index: 99999;
    font-family: "Tahoma", "IRANSans", sans-serif;
}

/* Toggle button */
#sidebar-toggle {
    background: #8f429a;
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
    position: relative;
    z-index: 2;
}

#sidebar-toggle:hover {
    background: #732f80;
}

/* Panel */
.sidebar-content {
    position: absolute;
    right: -260px;
    /* hidden */
    top: 0;
    width: 240px;
    background-image: linear-gradient(180deg, #fff 0%, #eaeaea 100%);
    box-shadow: -3px 3px 12px rgba(0, 0, 0, 0.25);
    border-radius: 12px 0 0 12px;
    padding: 0;
    transition: right 0.4s ease;
    direction: rtl;
    text-align: right;
    z-index: 2;
    will-change: right;
    overflow: hidden;
}

#mini-sidebar.active .sidebar-content {
    right: 0;
}

.sidebar-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-content li {
    margin: 0;
}

.sidebar-content li:hover {
    background: linear-gradient(0deg, #474747 0%, #8f429a 100%);
}

.sidebar-content a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.4px;
    color: #8f429a;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent !important;
    border-bottom: 1px solid;
    border-image: linear-gradient(to left, #fff -11%, #d1d1d1 102%, #fff 110%) 1;
}

.sidebar-content a:hover {
    transform: translateX(-5px);
    background: linear-gradient(0deg, #474747 0%, #8f429a 100%) !important;
    color: #fff;
    border-color: #8f429a;
}

/* Unique colors per item */
.sidebar-content li:nth-child(1) a {
    background: #e63946;
}

/* red */
.sidebar-content li:nth-child(1) a:hover {
    background: #c72e39;
}

.sidebar-content li:nth-child(2) a {
    background: #457b9d;
}

/* blue */
.sidebar-content li:nth-child(2) a:hover {
    background: #35607a;
}

.sidebar-content li:nth-child(3) a {
    background: #2a9d8f;
}

/* teal */
.sidebar-content li:nth-child(3) a:hover {
    background: #21786f;
}

.sidebar-content li:nth-child(4) a {
    background: #f4a261;
}

/* orange */
.sidebar-content li:nth-child(4) a:hover {
    background: #d98945;
}

.sidebar-content li:nth-child(5) a {
    background: #2d6a4f;
}

/* purple */
.sidebar-content li:nth-child(5) a:hover {
    background: #22543d;
}

.sidebar-content li:nth-child(6) a {
    background: #8f429a;
}

/* green */
.sidebar-content li:nth-child(6) a:hover {
    background: #732f80;
}


/* Overlay */
.mini-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99990;
}

.mini-sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#sidebar-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: rgba(143, 66, 152, 0.3);
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

.mini-sidebar-icon-wrapper {
    background: #8f429a;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.mini-sidebar-icon {
    width: 50px;
    /* filter: contrast(0%); */
}

.sidebar-content a:hover img {
    filter: unset;
}

@media (max-width: 480px) {
    .sidebar-content {
        width: 220px;
        right: -240px;
    }

    #mini-sidebar.active .sidebar-content {
        right: 0;
    }

    #sidebar-toggle{
        display: none;
    }
}
