/* ==========================================================
   BASE STYLES (ALL SCREENS)
   Restore clean navigation look
   ========================================================== */

.apc-category-nav a,
.apc-category-nav a:visited {
  color: inherit;
  text-decoration: none;
} 

/* IMPOVEMENT STYLES --> */
.apc-category-nav ul {
	list-style: none;
}

.apc-category-nav ul[hidden] {
	display: none !important;
}

.apc-category-nav > ul {
   padding: 0!important;
   margin: 0!important;
   padding-bottom: 60px !important;
	
}

.apc-category-nav li {
	margin: 0.5rem 0;
}

.apc-category-nav ul ul {
    padding-left: 18px;
    border-left: 1px solid #eaeaea;
	margin-top: 0.35rem;
}

.apc-category-nav-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.apc-category-nav > ul > li > .apc-category-nav-item > a {
    font-weight: 600;
	flex: 1;
}

.apc-category-nav > ul > li > .apc-category-nav-item > a::before {
    display:none;
}

.apc-category-nav li > .apc-category-nav-item > a {
    position: relative;
    display: block;
	padding: 8px 12px;
	font-size: 15px;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	flex: 1;
    transition: color 0.2s ease;
}

.apc-category-nav li > .apc-category-nav-item > a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 70%;
    background: var(--rehateh-blue);
    transition: width 0.2s ease;
}

.apc-category-nav li.is-current > .apc-category-nav-item,
.apc-category-nav li > .apc-category-nav-item:hover {
	background: #93b5af2b;
}

.apc-category-nav li.is-current > .apc-category-nav-item > a::before,
.apc-category-nav li > .apc-category-nav-item:hover > a::before {
    width: 3px;
}

.apc-category-nav > ul > li:first-child > .apc-category-nav-item > a::before {
    display: none;
}

.apc-cat-branch-toggle {
	border: 0;
	background: transparent;
	cursor: pointer;
	color: inherit;
	line-height: 1;
	padding: 0.4rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6rem;
	height: 1.6rem;
}

.apc-cat-branch-toggle::before {
	content: "";
	width: 0.45rem;
	height: 0.45rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.apc-cat-branch-toggle[aria-expanded="false"]::before {
	transform: rotate(-45deg);
}
/* <-- IMPOVEMENT STYLES */

/* ==========================================================
   DESKTOP (DEFAULT BEHAVIOR)
   Navigation stays in normal flow
   ========================================================== */


/* Hide mobile-only UI on desktop */
@media (min-width: 783px) {
	.apc-category-nav-trigger,
	.apc-category-nav-overlay,
	.apc-category-nav-close {
		display: none;
	}
}

/* ==========================================================
   MOBILE DRAWER
   ========================================================== */

@media (max-width: 782px) {

	/* ---------- Trigger button ---------- */

	.apc-category-nav-trigger {
		display: inline-flex;
		align-items: center;
		gap: 0.5em;
		background: none;
		border: 0 !important;
		box-shadow: 0 0 0 1px #0d0d0d0d;
		/*box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px; */
		border-radius: 6px;
		padding: 0.5em 0.75em;
		cursor: pointer;
		font: inherit;
		color: inherit !important;
	}
	
	.apc-category-nav-trigger:visited {
		color: inherit !important;
	}

	.apc-category-nav-trigger__icon {
		font-size: 1.1em;
		line-height: 1;
	}

	/* ---------- Overlay ---------- */

	.apc-category-nav-overlay {
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.25s ease;
		z-index: 9998;
	}

	/* ---------- Drawer ---------- */

	.apc-category-nav {
		position: fixed;
		top: 0;
		left: 0;
		height: 100%;
		width: min(85%, 320px);
		background: var(--wp--preset--color--background, #ffffff);
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		overflow-y: auto;
		z-index: 9999;
		padding: 1em;
		box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
	}

	/* ---------- Close button ---------- */

	.apc-category-nav-close {
		
		background: none;
		font-size: 1.25em;
		cursor: pointer;
		margin-bottom: 1em;
		padding: 0;	
		line-height: 1;
		color: inherit !important;
		
		width: 40px;
		height: 40px;

		display: flex;
		align-items: center;
		justify-content: center;
		border: 1px solid var(--rehateh-background) !important;
		border-radius: 50%;
	
	}
	
	.apc-category-nav-close:visited {
		color: inherit !important;
	}

	/* ---------- Open state ---------- */

	.apc-category-nav-wrapper.is-open .apc-category-nav {
		transform: translateX(0);
	}

	.apc-category-nav-wrapper.is-open .apc-category-nav-overlay {
		opacity: 1;
		pointer-events: auto;
	}

	/* ---------- Optional mobile spacing tweaks ---------- */

	.apc-category-nav li {
		margin: 0.5rem 0;
	}

	.apc-category-nav li > .apc-category-nav-item > a {
		padding: 8px 12px;
	}
}
