/**
 * Misko Navigation — drilldown (mobile) + dropdown polish (desktop).
 */

/* ---------------------------------------------------------------------
 * Shared
 * ------------------------------------------------------------------- */

.misko-nav-hidden {
	display: none !important;
}

/* ---------------------------------------------------------------------
 * Mobile sidebar arrows
 * The customizer colors top-level menu icons cream (#FCF7F2) for the
 * transparent desktop header — invisible on the white sidebar. Restore
 * a dark, inherited color and point the arrow right, since tapping a
 * parent item now drills into a panel instead of opening an accordion.
 * ------------------------------------------------------------------- */

.sidebar-menu .primary-navigation .menu-item-arrow .woostify-svg-icon {
	color: inherit;
}

.sidebar-menu .primary-navigation .menu-item-arrow .woostify-svg-icon svg {
	transform: rotate(-90deg);
}

/* ---------------------------------------------------------------------
 * Mobile drilldown (inside .sidebar-menu)
 * Rows mirror the Woostify sidebar menu style: 0 20px padding,
 * 1px #ececec separators, 48px+ row height.
 * ------------------------------------------------------------------- */

.sidebar-menu .misko-drill {
	background: #fff;
}

.sidebar-menu .misko-drill-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sidebar-menu .misko-drill-row {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sidebar-menu .misko-drill-back,
.sidebar-menu .misko-drill-next,
.sidebar-menu .misko-drill-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 48px;
	padding: 10px 20px;
	margin: 0;
	border: 0;
	border-bottom: 1px solid #ececec;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	color: #000;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.sidebar-menu .misko-drill-back:hover,
.sidebar-menu .misko-drill-next:hover,
.sidebar-menu .misko-drill-link:hover {
	background-color: rgba(0, 0, 0, 0.03);
	color: #000;
}

.sidebar-menu .misko-drill-back:focus-visible,
.sidebar-menu .misko-drill-next:focus-visible,
.sidebar-menu .misko-drill-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

/* Back row: arrow + level title, visually distinguished. */
.sidebar-menu .misko-drill-back {
	justify-content: flex-start;
	font-weight: 600;
}

.sidebar-menu .misko-drill-back-arrow {
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 14px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	flex: 0 0 auto;
}

/* Parent rows: title left, chevron right. */
.sidebar-menu .misko-drill-chevron {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
	flex: 0 0 auto;
	opacity: 0.6;
}

.sidebar-menu .misko-drill-row-title {
	flex: 1 1 auto;
	overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------------
 * Desktop dropdown polish
 * Woostify already provides hover/flyout mechanics; this only refines.
 * ------------------------------------------------------------------- */

@media (min-width: 992px) {
	.main-navigation .primary-navigation > .menu-item .sub-menu {
		min-width: 220px;
		padding: 6px 0;
	}

	.main-navigation .primary-navigation .sub-menu .menu-item a {
		padding-top: 8px;
		padding-bottom: 8px;
		white-space: nowrap;
	}

	/* The "all of this category" link is visually separated. */
	.main-navigation .primary-navigation .sub-menu .misko-all-link > a,
	.main-navigation .primary-navigation .sub-menu li.misko-all-link a {
		font-weight: 700;
	}
}

/* Keep long category names usable in the mobile drilldown. */
@media (max-width: 991px) {
	.sidebar-menu .misko-drill {
		width: 100%;
	}
}
