/* Modern Navbar Styles */

/* Main Header Container */
.navbar-header-container {
    background: #222831;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    padding-left: 4rem;
    direction: rtl;
    position: relative;
    overflow: visible;
}

/* Buttons Wrapper - Contains both rows */
.navbar-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

/* Logo Container */
.logo-container {
    display: flex;
    align-items: center;
    padding: 0;
    margin-left: 1rem;
    order: -1;
}

.logo-container a {
    display: flex;
    align-items: center;
}

.logo-container img {
    transition: transform 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-container img:hover {
    transform: scale(1.05);
}

/* Modern Topnav */
.topnav {
    background: transparent !important;
    overflow: visible !important;
    direction: rtl;
    text-align: right;
    font-family: 'Yekan Bold' !important;
    padding: 0;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* Modern Nav Links */
.topnav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white !important;
    text-align: center;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-size: 0.9rem;
    background: rgba(99, 102, 241, 0.6);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap;
}

.topnav a:hover {
    background: rgba(99, 102, 241, 0.9);
    color: white !important;
}

.topnav a.active {
    background: rgba(16, 185, 129, 0.6) !important;
    color: white !important;
}

.topnav a.active:hover {
    background: rgba(16, 185, 129, 0.9) !important;
}

/* Special Buttons */
.topnav a[href*="create"] {
    background: rgba(16, 185, 129, 0.6) !important;
    color: white !important;
}

.topnav a[href*="create"]:hover {
    background: rgba(16, 185, 129, 0.9) !important;
}

.topnav a[href*="elanat=1"] {
    background: rgba(239, 68, 68, 0.6) !important;
    color: white !important;
    position: relative;
}

.topnav a[href*="elanat=1"]:hover {
    background: rgba(239, 68, 68, 0.9) !important;
}

.topnav a[style*="float:left"],
.topnav a[style*="float: left"] {
    background: rgba(71, 85, 105, 0.6);
}

.topnav a[style*="float:left"]:hover,
.topnav a[style*="float: left"]:hover {
    background: rgba(71, 85, 105, 0.9);
}

/* Notification Badge */
#elanha {
    background: white;
    color: #ef4444;
    padding: 0.2rem 0.5rem !important;
    border-radius: 10px;
    font-size: 0.7rem !important;
    font-weight: 700;
    margin-right: 0.5rem;
}

/* Header Menu Row - Second Row */
.header-menu-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    position: relative;
}

/* Theme toggle button - positioned at left side of navbar */
.navbar-header-container .theme-toggle-btn {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

/* Header Menu Buttons */
.header-menu-row a.header-menu-btn,
.topnav a.header-menu-btn {
    background: rgba(99, 102, 241, 0.6) !important;
    color: white !important;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.header-menu-row a.header-menu-btn:hover,
.topnav a.header-menu-btn:hover {
    background: rgba(99, 102, 241, 0.9) !important;
    color: white !important;
}

/* Create Order Button - Special styling */
.header-menu-row a.header-menu-btn.create-order-btn,
.topnav a.header-menu-btn.create-order-btn {
    background: #10b981e6 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

.header-menu-row a.header-menu-btn.create-order-btn:hover,
.topnav a.header-menu-btn.create-order-btn:hover {
    background: #10b981e6 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Dropdown Menu */
.dropdown-menu-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu-wrapper .dropdown-toggle::after {
    content: "▼";
    margin-right: 0.5rem;
    font-size: 0.7rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #222831;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-radius: 8px;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    direction: rtl;
    text-align: right;
}

.dropdown-content::before {
    content: "";
    position: absolute;
    top: -0.5rem;
    right: 0;
    left: 0;
    height: 0.5rem;
    background: transparent;
}

.dropdown-content a {
    color: white !important;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 0;
    direction: rtl;
    text-align: right;
}

.dropdown-content a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-content a:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-content a:hover {
    background: rgba(99, 102, 241, 0.6);
}

.dropdown-menu-wrapper:hover .dropdown-content,
.dropdown-content:hover,
.dropdown-menu-wrapper:hover .dropdown-content:hover {
    display: block !important;
}

/* Hamburger Icon */
.topnav .icon {
    display: none;
    background: rgba(99, 102, 241, 0.6) !important;
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.topnav .icon:hover {
    background: rgba(99, 102, 241, 0.9) !important;
}

/* Responsive Design */
@media screen and (max-width: 950px) {
    .navbar-header-container {
        flex-direction: column;
        padding: 0.5rem 1rem;
    }
    
    .navbar-buttons-wrapper {
        width: 100%;
    }
    
    .logo-container {
        align-self: center;
        margin-right: 0;
        margin-top: 0.5rem;
    }
    
    .topnav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .header-menu-row {
        justify-content: center;
    }
    
    /* Theme toggle button in responsive mode - keep at left */
    .navbar-header-container .theme-toggle-btn {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .topnav a:not(:first-child) {
        display: none;
    }

    .topnav a.icon {
        display: block;
    }
    
    .topnav.responsive {
        flex-direction: column;
        align-items: stretch;
    }

    .topnav.responsive a {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        margin: 0.25rem 0;
    }
    
    .topnav.responsive a.icon {
        width: auto;
    }
}

@media screen and (max-width: 768px) {
    .logo-container img {
        width: 60px;
        height: 60px;
    }
    
    .topnav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .navbar-header-container {
        padding: 0.5rem;
    }
}

