/* Add here all your CSS customizations */

/* Navigation Active State Styling */
ul.nav-main li.active > a {
	background: #0073d8 !important;
	color: #fff !important;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(0, 115, 216, 0.3);
}

/* Icon styling for active items - NOT in collapsed sidebar */
html:not(.sidebar-left-collapsed) ul.nav-main li.active > a i {
	background: #fff !important;
	color: #0073d8 !important;
	border-radius: 50%;
	padding: 2px;
}

/* Sub-menu active state */
ul.nav-main li.nav-parent.active > a {
	background: #0073d8 !important;
	color: #fff !important;
	border-radius: 4px;
}

/* Icon styling for active parent items - NOT in collapsed sidebar */
html:not(.sidebar-left-collapsed) ul.nav-main li.nav-parent.active > a i {
	background: #fff !important;
	color: #0073d8 !important;
	border-radius: 50%;
	padding: 2px;
}

ul.nav-main li.nav-parent ul.nav-children li.active > a {
	background: rgba(0, 115, 216, 0.15) !important;
	color: #0073d8 !important;
	border-left: 3px solid #0073d8;
	padding-left: 17px;
	border-radius: 0 4px 4px 0;
	font-weight: 600;
}

/* Hover effects for navigation */
ul.nav-main li > a:hover {
	background: rgba(0, 115, 216, 0.1) !important;
	color: #005bb5 !important;
	transition: all 0.3s ease;
	border-radius: 4px;
}

/* ul.nav-main li.active > a:hover {
	background: #005bb5 !important;
} */



ul.nav-main li.nav-parent.nav-expanded > a::after {
	transform: rotate(90deg);
}

/* Sub-menu styling */
ul.nav-main li.nav-parent ul.nav-children {
	display: none;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 0 0 4px 4px;
	margin-top: 2px;
}

ul.nav-main li.nav-parent.nav-expanded ul.nav-children {
	display: block;
}

ul.nav-main li.nav-parent ul.nav-children li a {
	padding-left: 45px;
	font-size: 13px;
	color: #777;
}

/* Mobile Responsive Table Styles */
@media (max-width: 767px) {
    .table-responsive {
        border: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table th,
    .table td {
        white-space: nowrap;
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

/* Better mobile scrolling for tables */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Fix scrolling issues for Add Funds page and all merchant pages */
html.fixed {
    overflow: hidden;
}

html.fixed body {
    overflow: hidden;
    height: 100vh;
}

html.fixed .body {
    overflow: hidden;
    height: 100vh;
}

html.fixed .inner-wrapper {
    overflow: hidden;
    height: 100vh;
}

html.fixed .content-body {
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 70px); /* Adjust based on header height */
    padding-bottom: 30px;
}

/* Ensure cards and sections don't have overflow hidden */
.card-body {
    overflow: visible;
}

.section {
    overflow: visible;
}

/* Fix table scroll issues */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

/* Ensure sidebar has proper z-index and styling */
html.fixed .sidebar-left {
    z-index: 999;
    background: #fff;
    border-right: 1px solid #e9ecef;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Fix sidebar navigation styling */
.sidebar-left .sidebar-nav {
    background: transparent;
}

.sidebar-left .sidebar-nav > .nav > .nav-parent > .nav-children {
    background: #f8f9fa;
    border-left: 3px solid #007bff;
}

/* Ensure sidebar menu items are properly styled */
.sidebar-left .sidebar-nav .nav > li > a {
    color: #495057;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    align-items: center;
}

.sidebar-left .sidebar-nav .nav > li > a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.sidebar-left .sidebar-nav .nav > li.nav-active > a,
.sidebar-left .sidebar-nav .nav > li.nav-expanded > a {
    background-color: #007bff;
    color: #fff;
}

/* Fix submenu styling */
.sidebar-left .sidebar-nav .nav > li > .nav-children {
    padding-left: 0;
    background: #f8f9fa;
}

.sidebar-left .sidebar-nav .nav > li > .nav-children > li > a {
    padding: 10px 40px;
    font-size: 13px;
    color: #6c757d;
    border-bottom: none;
}

.sidebar-left .sidebar-nav .nav > li > .nav-children > li > a:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.sidebar-left .sidebar-nav .nav > li > .nav-children > li.nav-active > a {
    background-color: #007bff;
    color: #fff;
}

/* Fix for page headers */
.page-header {
    position: relative;
    z-index: 1;
}

/* Specific fix for Add Funds form layout */
.merchant-addfunds .card {
    margin-bottom: 20px;
}

.merchant-addfunds .content-body {
    padding: 20px;
}

/* Sidebar Navigation - Collapsed State Icon Fixes */
/* Hide text spans when sidebar is collapsed */
html.sidebar-left-collapsed .sidebar-left .nav-main li a span {
    display: none;
}

/* Center and enlarge icons in collapsed state */
html.sidebar-left-collapsed .sidebar-left .nav-main li a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 0 !important;
    text-align: center;
}

html.sidebar-left-collapsed .sidebar-left .nav-main li a i {
    font-size: 24px !important;
    margin: 0 !important;
    display: block;
}

/* Hide submenu arrow in collapsed state */
html.sidebar-left-collapsed .sidebar-left .nav-main li.nav-parent > a::after {
    display: none;
}

/* Hide submenu completely when collapsed */
html.sidebar-left-collapsed .sidebar-left .nav-main li.nav-parent .nav-children {
    display: none !important;
}

/* Sidebar header in collapsed state */
html.sidebar-left-collapsed .sidebar-left .sidebar-header .sidebar-title {
    display: none;
}

html.sidebar-left-collapsed .sidebar-left .sidebar-header {
    text-align: center;
    padding: 15px 0;
}

html.sidebar-left-collapsed .sidebar-left .sidebar-header .sidebar-toggle {
    margin: 0 auto;
}

/* Fix icon visibility on hover in collapsed sidebar - Override all icon background styles */
html.sidebar-left-collapsed .sidebar-left .nav-main li a i {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

html.sidebar-left-collapsed .sidebar-left .nav-main li > a i {
    color: #666 !important;
}

html.sidebar-left-collapsed .sidebar-left .nav-main li > a:hover i {
    background: transparent !important;
    color: #0073d8 !important;
}

html.sidebar-left-collapsed .sidebar-left .nav-main li.active > a i {
    background: transparent !important;
    color: #fff !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

html.sidebar-left-collapsed .sidebar-left .nav-main li.active > a:hover i {
    background: transparent !important;
    color: #fff !important;
}

html.sidebar-left-collapsed .sidebar-left .nav-main li.nav-parent.active > a i {
    background: transparent !important;
    color: #fff !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Ultra-specific rules to force icon visibility in collapsed sidebar */
body html.sidebar-left-collapsed .sidebar-left .nav-main li a i,
body html.sidebar-left-collapsed .sidebar-left .nav-main li.active a i,
body html.sidebar-left-collapsed .sidebar-left .nav-main li.nav-parent.active a i {
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

body html.sidebar-left-collapsed .sidebar-left .nav-main li a:hover i {
    background: none !important;
    background-color: transparent !important;
    color: #0073d8 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

body html.sidebar-left-collapsed .sidebar-left .nav-main li.active a i,
body html.sidebar-left-collapsed .sidebar-left .nav-main li.active a:hover i {
    background: none !important;
    background-color: transparent !important;
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}
