/* Base styles */
:root {
    --base-font-size: 14px;
    --heading-scale: 1.1;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    font-size: var(--base-font-size);
    line-height: 1.5;
    color: #333;
}

/* Heading sizes */
h1 { font-size: 1.8rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* Sidebar Layout Fixes */
.idocs-navigation {
    height: calc(100vh - 120px); /* Adjust based on your header height */
    overflow-y: auto;
    position: sticky;
    top: 80px; /* Adjust based on your header height */
    direction: rtl;
    padding: 15px 0;
    font-size: 0.85rem; /* Smaller font for sidebar */
}

.idocs-navigation > ul {
    flex-direction: column;
    flex-wrap: nowrap;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.idocs-navigation .nav-item {
    width: 100%;
    margin: 0;
}

.idocs-navigation .nav-link {
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 20px;
    color: #333;
    transition: all 0.3s ease;
    display: block;
}

/* Tooltip styles */
.idocs-navigation .nav-link[title]:hover::after {
    content: attr(title);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #000000;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
    z-index: 1000;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.idocs-navigation .nav-link[title]:hover::before {
    content: '';
    position: absolute;
    right: calc(100% - 5px);
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent #000000;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.idocs-navigation .nav-link[title]:hover::after,
.idocs-navigation .nav-link[title]:hover::before {
    opacity: 1;
    transition-delay: 0.5s;
}

.idocs-navigation .nav-link:hover,
.idocs-navigation .nav-link.active {
    background-color: #e9ecef;
    color: #4361ee;
}

/* Submenu styling */
.idocs-navigation .nav-item > ul {
    display: none;
    padding-right: 15px;
    margin: 0;
    list-style: none;
}

.idocs-navigation .nav-item > ul .nav-link {
    padding-right: 30px;
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .idocs-navigation {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        z-index: 1050;
        background: #fff;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
    }
    
    .idocs-navigation.show {
        right: 0;
    }
    
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
    
    .mobile-menu-overlay.show {
        display: block;
    }
}
