/* IE Panel */
.ie-panel {
    display: none;
    background: #212121;
    padding: 10px 0;
    box-shadow: 3px 3px 5px 0 rgba(0,0,0,.3);
    clear: both;
    text-align: center;
    position: relative;
    z-index: 1;
}

html.ie-10 .ie-panel, html.lt-ie-10 .ie-panel {
    display: block;
}

/* Custom navbar styles for specific pages */
.rd-navbar-custom.rd-navbar-transparent.rd-navbar-static .rd-navbar-main-inner {
    background-color: rgb(100, 10, 15) !important;
}

/* Custom navbar styles for mobile/small screens (partner pages) */
.rd-navbar-custom.rd-navbar-fixed .rd-navbar-main-inner {
    background-color: rgb(100, 10, 15) !important;
}

.rd-navbar-custom.rd-navbar-fixed .rd-nav-link {
    color: #6c757d !important;
}

/* Menu items without toggle - full background on hover */
.rd-navbar-custom.rd-navbar-fixed .rd-nav-item:not(.rd-navbar-submenu) > .rd-nav-link:hover {
    color: #ffffff !important;
    background-color: rgb(100, 10, 15) !important;
}

/* Menu items with toggle - 2/3 background on hover */
.rd-navbar-custom.rd-navbar-fixed .rd-nav-item.rd-navbar-submenu > .rd-nav-link:hover {
    color: #ffffff !important;
    position: relative;
}

/* Link 4/5 background on hover for items with toggle */
.rd-navbar-custom.rd-navbar-fixed .rd-nav-item.rd-navbar-submenu > .rd-nav-link:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 80%;
    height: 100%;
    background-color: rgb(100, 10, 15) !important;
    z-index: -1;
}

/* Toggle 1/3 background on hover */
.rd-navbar-custom.rd-navbar-fixed .rd-nav-item.rd-navbar-submenu > .rd-navbar-submenu-toggle:hover::after {
    color: #ffffff !important;
    background-color: rgb(100, 10, 15) !important;
}

/* Account toggle button color for Partner pages */
.rd-navbar-custom.rd-navbar-fixed .menu-account > .rd-navbar-submenu-toggle::after {
    color: #6c757d !important;
}

/* Account toggle button hover state for Partner pages */
.rd-navbar-custom.rd-navbar-fixed .menu-account > .rd-navbar-submenu-toggle:hover::after {
    color: #ffffff !important;
    background-color: rgb(100, 10, 15) !important;
}

/* Custom loader background for partner pages */
.preloader-partner .loader > div:before {
    background: rgb(100, 10, 15) !important;
}

/* Nested dropdown positioning */
.rd-navbar-static .rd-navbar-dropdown .rd-navbar-submenu {
    position: relative;
}

/* Active state for nested dropdown items */
.rd-navbar-static .rd-dropdown-item.active > .rd-dropdown-link {
    color: #ffffff;
    background-color: rgba(3, 65, 87, 0.1);
}

.rd-navbar-static .rd-dropdown-item.active.rd-navbar-submenu > .rd-dropdown-link {
    color: #ffffff;
    background-color: rgba(3, 65, 87, 0.1);
}

/* Mobile sidebar styles for User Page and Partner Page */
/* User Page - Normal state: colored text and toggle, white background */
.rd-navbar-fixed .menu-users-page > .rd-dropdown-link {
    color: #6c757d !important;
    background-color: #ffffff !important;
}

.rd-navbar-fixed .menu-users-page > .rd-navbar-submenu-toggle::after {
    color: #6c757d !important;
    height: 52px !important;
    line-height: 52px !important;
}

/* User Page - Hover state: white text and toggle, colored background (only when User Page link itself is hovered) */
.rd-navbar-fixed .menu-users-page > .rd-dropdown-link:hover {
    color: #ffffff !important;
    position: relative;
    background-color: transparent !important;
}

/* Link 2/3 background on hover - use ::before on the link itself */
.rd-navbar-fixed .menu-users-page > .rd-dropdown-link {
    position: relative;
}

/* Ensure parent li has proper height */
.rd-navbar-fixed .menu-users-page {
    min-height: 52px;
}

.rd-navbar-fixed .menu-users-page > .rd-dropdown-link:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 52px;
    width: 80%;
    background-color: rgb(3, 65, 87) !important;
    z-index: 0;
}

/* Ensure link text is above background */
.rd-navbar-fixed .menu-users-page > .rd-dropdown-link:hover {
    z-index: 1;
    position: relative;
}

/* Ensure parent doesn't have background that covers the pseudo-element */
.rd-navbar-fixed .menu-users-page > .rd-dropdown-link:hover {
    background-color: transparent !important;
}

/* Toggle 1/3 background on hover - only when toggle itself is hovered */
.rd-navbar-fixed .menu-users-page > .rd-navbar-submenu-toggle:hover::after {
    color: #ffffff !important;
    background-color: rgb(3, 65, 87) !important;
}

/* User Page - Normal state when child dropdown is hovered (keep normal colors) */
.rd-navbar-fixed .menu-users-page:hover:has(.rd-navbar-dropdown:hover) > .rd-dropdown-link:not(:hover) {
    color: #6c757d !important;
    background-color: #ffffff !important;
}

.rd-navbar-fixed .menu-users-page:hover:has(.rd-navbar-dropdown:hover) > .rd-navbar-submenu-toggle:not(:hover)::after {
    color: #6c757d !important;
    background-color: transparent !important;
}

/* Partner Page - Normal state: colored text, white background */
.rd-navbar-fixed .menu-partners-page > .rd-dropdown-link {
    color: #6c757d !important;
    background-color: #ffffff !important;
}

/* Partner Page - Hover state: white text, colored background (full background, no toggle) */
.rd-navbar-fixed .menu-partners-page:hover > .rd-dropdown-link {
    color: #ffffff !important;
    background-color: rgb(100, 10, 15) !important;
}

/* Toggle button clickable area - 1/5 width (20%) for Account */
.rd-navbar-fixed .menu-account {
    position: relative;
}

.rd-navbar-fixed .menu-account > .rd-navbar-submenu-toggle::after {
    width: 20% !important;
    right: 0 !important;
    color: #6c757d !important;
}

/* Account toggle button hover state for non-Partner pages */
.rd-navbar-fixed .menu-account > .rd-navbar-submenu-toggle:hover::after {
    color: #ffffff !important;
    background-color: rgba(3, 65, 87, 255) !important;
}

/* Adjust link padding to make room for toggle button */
.rd-navbar-fixed .menu-account > .rd-nav-link {
    padding-right: calc(20% + 16px) !important;
}

/* Toggle button clickable area - 1/5 width (20%) for User Page */
.rd-navbar-fixed .menu-users-page {
    position: relative;
}

.rd-navbar-fixed .menu-users-page > .rd-navbar-submenu-toggle::after {
    width: 20% !important;
    right: 0 !important;
    height: 52px !important;
    line-height: 52px !important;
}

/* Adjust link padding to make room for toggle button */
.rd-navbar-fixed .menu-users-page > .rd-dropdown-link {
    padding-right: calc(20% + 16px) !important;
}

/* Partner page text selection color */
.partner-page ::selection {
    background-color: rgb(100, 10, 15);
    color: #ffffff;
}

.partner-page ::-moz-selection {
    background-color: rgb(100, 10, 15);
    color: #ffffff;
}

/* ============================================
   Desktop View (rd-navbar-static) - User Page Submenu
   ============================================ */

/* Hide toggle for Account */
.rd-navbar-static .menu-account > .rd-navbar-submenu-toggle {
    display: none !important;
}

.rd-navbar-static .menu-account > .rd-nav-link {
    padding-right: 0 !important;
}

/* Hide toggle for User Page (always show children when Account dropdown is open) */
.rd-navbar-static .menu-users-page > .rd-navbar-submenu-toggle {
    display: none !important;
}

.rd-navbar-static .menu-users-page > .rd-dropdown-link {
    padding-right: 24px !important;
}

/* Premium Account dropdown styling */
.rd-navbar-static .rd-navbar-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 15px, 0) scale(0.95);
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%) !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    border-top: 3px solid rgba(3, 65, 87, 255) !important;
    padding: 10px 4px !important;
    margin-top: 10px !important;
    min-width: 240px !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Account dropdown - remove border-top when User Page dropdown is below */
.rd-navbar-static .menu-account > .rd-navbar-dropdown:has(.menu-users-page) {
    border-top: none !important;
}

/* Account dropdown - change border-top color for Partner Page */
.rd-navbar-static .menu-account > .rd-navbar-dropdown:has(.menu-partners-page):not(:has(.menu-users-page)) {
    border-top: 3px solid rgba(100, 10, 15, 0.3) !important;
}

.rd-navbar-static .menu-account > .rd-navbar-dropdown {
    left: auto !important;
    right: -40px !important;
}

/* Show Account dropdown on hover */
.rd-navbar-static .rd-navbar-submenu:hover > .rd-navbar-dropdown,
.rd-navbar-static .rd-navbar-submenu.focus > .rd-navbar-dropdown,
.rd-navbar-static .rd-navbar-submenu.opened > .rd-navbar-dropdown {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
}

/* User Page nested dropdown - inline within same box, visible when Account dropdown is open */
.rd-navbar-static .rd-navbar-dropdown .rd-navbar-dropdown {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: block !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-top: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: auto !important;
    width: auto !important;
    transition: none !important;
}

/* Partner Page - normal state: no background, neutral text color (match other items) */
.rd-navbar-static .menu-partners-page > .rd-dropdown-link {
    background: transparent !important;
    color: #6c757d !important;
    margin-top: 6px !important;
}

/* Partner Page hover: background color based on rgb(100,10,15), neutral text color */
.rd-navbar-static .menu-partners-page > .rd-dropdown-link:hover {
    background: linear-gradient(135deg, rgba(100, 10, 15, 0.1) 0%, rgba(100, 10, 15, 0.08) 100%) !important;
    color: #6c757d !important;
    transform: translateX(6px) !important;
    box-shadow: 0 2px 8px rgba(100, 10, 15, 0.1) !important;
}

/* Partner Page active state: background color based on rgb(100,10,15), neutral text color */
.rd-navbar-static .menu-partners-page.active > .rd-dropdown-link,
.rd-navbar-static .rd-dropdown-item.active.menu-partners-page > .rd-dropdown-link {
    background: linear-gradient(135deg, rgba(100, 10, 15, 0.15) 0%, rgba(100, 10, 15, 0.12) 100%) !important;
    color: #6c757d !important;
    font-weight: 600 !important;
    box-shadow: inset 0 2px 4px rgba(100, 10, 15, 0.1) !important;
}

/* Add separator after User Page - clear boundary before Partner Page */
.rd-navbar-static .menu-users-page > .rd-navbar-dropdown::after {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
    margin: 12px 16px 10px 16px;
    border-radius: 2px;
}

/* Style nested dropdown items - make it clear they are children */
.rd-navbar-static .rd-navbar-dropdown .rd-navbar-dropdown .rd-dropdown-item {
    padding-left: 20px !important;
    margin: 0 !important;
}

.rd-navbar-static .rd-navbar-dropdown .rd-navbar-dropdown .rd-dropdown-link {
    padding: 10px 24px 10px 52px !important;
    font-size: 13px !important;
    color: #6c757d !important;
    position: relative !important;
    border-radius: 8px !important;
    margin: 2px 10px 2px 10px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    letter-spacing: 0.02em !important;
    background: transparent !important;
}

/* Dash indicator for nested items */
.rd-navbar-static .rd-navbar-dropdown .rd-navbar-dropdown .rd-dropdown-link::before {
    content: '-' !important;
    position: absolute !important;
    left: 28px !important;
    color: #6c757d !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    opacity: 0.6 !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
}

/* Hover effect for nested items */
.rd-navbar-static .rd-navbar-dropdown .rd-navbar-dropdown .rd-dropdown-link:hover {
    background: linear-gradient(135deg, rgba(3, 65, 87, 0.08) 0%, rgba(3, 65, 87, 0.06) 100%) !important;
    color: #6c757d !important;
    transform: translateX(4px);
    padding-left: 56px !important;
}

.rd-navbar-static .rd-navbar-dropdown .rd-navbar-dropdown .rd-dropdown-link:hover::before {
    color: #6c757d !important;
    opacity: 1 !important;
    transform: translateX(2px);
}

/* Active state for nested items */
.rd-navbar-static .rd-navbar-dropdown .rd-navbar-dropdown .rd-dropdown-item.active > .rd-dropdown-link {
    background: linear-gradient(135deg, rgba(3, 65, 87, 0.12) 0%, rgba(3, 65, 87, 0.1) 100%) !important;
    color: #6c757d !important;
    font-weight: 600 !important;
}

.rd-navbar-static .rd-navbar-dropdown .rd-navbar-dropdown .rd-dropdown-item.active > .rd-dropdown-link::before {
    color: #6c757d !important;
}

/* Remove separator between nested items */
.rd-navbar-static .rd-navbar-dropdown .rd-navbar-dropdown .rd-dropdown-item:not(:last-child)::after {
    display: none !important;
}

/* Dropdown items styling */
.rd-navbar-static .rd-dropdown-item {
    position: relative;
}

.rd-navbar-static .rd-dropdown-link {
    padding: 13px 24px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
    margin: 3px 10px !important;
    color: #6c757d !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    position: relative !important;
    display: block !important;
    line-height: 1.5 !important;
}

/* Hover effect for dropdown links */
.rd-navbar-static .rd-dropdown-link:hover {
    background: linear-gradient(135deg, rgba(3, 65, 87, 0.1) 0%, rgba(3, 65, 87, 0.08) 100%) !important;
    color: #6c757d !important;
    transform: translateX(6px);
    box-shadow: 0 2px 8px rgba(3, 65, 87, 0.1) !important;
}

/* User Page hover: background color with animation */
.rd-navbar-static .menu-users-page > .rd-dropdown-link:hover {
    background: linear-gradient(135deg, rgba(3, 65, 87, 0.1) 0%, rgba(3, 65, 87, 0.08) 100%) !important;
    color: #6c757d !important;
    transform: translateX(6px) !important;
    box-shadow: 0 2px 8px rgba(3, 65, 87, 0.1) !important;
}

/* Active state */
.rd-navbar-static .rd-dropdown-item.active > .rd-dropdown-link {
    background: linear-gradient(135deg, rgba(3, 65, 87, 0.15) 0%, rgba(3, 65, 87, 0.12) 100%) !important;
    color: #6c757d !important;
    font-weight: 600 !important;
    box-shadow: inset 0 2px 4px rgba(3, 65, 87, 0.1) !important;
}

/* Remove default bullet points */
.rd-navbar-static .rd-dropdown-item:before {
    display: none !important;
}

/* Separator between items */
.rd-navbar-static .rd-dropdown-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent);
    border-radius: 1px;
}

