/* WP Drilldown Menu — namespaced with .wpddm- to avoid clashing with any theme */

/* Color/size custom properties are defined on :root by the plugin's
   inline_style_vars() output (from your Settings), so they cascade down
   to .wpddm-wrap and everything inside it. Do NOT redeclare them here —
   an element-level declaration of a custom property always wins over an
   inherited one, so doing so would permanently override the admin settings. */
.wpddm-wrap {
	display: inline-block;
	line-height: 1;
	box-sizing: border-box;
}
.wpddm-wrap *,
.wpddm-wrap *::before,
.wpddm-wrap *::after {
	box-sizing: border-box;
}

/* Toggle (hamburger) button */
.wpddm-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 8px;
	font-size: var(--wpddm-font-size);
	color: var(--wpddm-text);
}
.wpddm-toggle-icon {
	display: inline-flex;
	flex-direction: column;
	justify-content: space-between;
	width: 22px;
	height: 16px;
}
.wpddm-toggle-icon span {
	display: block;
	height: 2px;
	width: 100%;
	background: currentColor;
	border-radius: 1px;
}

/* Custom uploaded icon replaces the default hamburger lines */
.wpddm-toggle-icon-custom {
	width: 22px;
	height: 22px;
	justify-content: center;
}
.wpddm-toggle-icon-img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Overlay behind the panel */
.wpddm-overlay {
	position: fixed;
	inset: 0;
	background: var(--wpddm-overlay);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--wpddm-speed) ease;
	z-index: var(--wpddm-z-index);
}
.wpddm-wrap.wpddm-is-open .wpddm-overlay {
	opacity: 1;
	visibility: visible;
}

/* Off-canvas container */
.wpddm-container {
	position: fixed;
	top: 0;
	bottom: 0;
	width: min(var(--wpddm-width), 92vw);
	background: var(--wpddm-bg);
	color: var(--wpddm-text);
	font-size: var(--wpddm-font-size);
	z-index: calc(var(--wpddm-z-index) + 1);
	overflow: hidden;
	box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
	transition: transform var(--wpddm-speed) ease;
	display: flex;
	flex-direction: column;
}
.wpddm-wrap[data-side="left"] .wpddm-container { left: 0; transform: translateX(-100%); }
.wpddm-wrap[data-side="right"] .wpddm-container { right: 0; transform: translateX(100%); }
.wpddm-wrap.wpddm-is-open .wpddm-container { transform: translateX(0); }

.wpddm-close {
	align-self: flex-end;
	background: transparent;
	border: 0;
	font-size: 28px;
	line-height: 1;
	padding: 12px 16px;
	cursor: pointer;
	color: var(--wpddm-text);
}

/* Panels — each level is an absolutely positioned full-height panel that
   slides in from the right and out to the left as the user drills down. */
.wpddm-panels {
	position: relative;
	flex: 1 1 auto;
	overflow: hidden;
}
.wpddm-panel {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-y: auto;
	background: var(--wpddm-bg);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform var(--wpddm-speed) ease, visibility 0s linear var(--wpddm-speed);
}
.wpddm-panel-active {
	transform: translateX(0);
	visibility: visible;
	transition: transform var(--wpddm-speed) ease, visibility 0s linear 0s;
	z-index: 2;
}
.wpddm-panel-off-left {
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform var(--wpddm-speed) ease, visibility 0s linear var(--wpddm-speed);
}
.wpddm-panel-off-right {
	transform: translateX(100%);
	visibility: hidden;
	transition: transform var(--wpddm-speed) ease, visibility 0s linear var(--wpddm-speed);
}
/* Used only for the instant, invisible "priming" step that places a panel
   on the correct side before its real slide-in transition starts. */
.wpddm-panel.wpddm-no-transition {
	transition: none !important;
}

.wpddm-panel-heading {
	padding: 16px;
	font-weight: 600;
	border-bottom: 1px solid var(--wpddm-border);
	text-transform: uppercase;
	font-size: 0.85em;
	letter-spacing: 0.04em;
	opacity: 0.7;
}

.wpddm-back-item { border-bottom: 1px solid var(--wpddm-border); }
.wpddm-back {
	width: 100%;
	text-align: left;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 14px 16px;
	font-size: 0.95em;
	color: var(--wpddm-accent);
	display: flex;
	align-items: center;
	gap: 6px;
}
.wpddm-back-arrow { font-size: 1.1em; }

.wpddm-item {
	position: relative;
	border-bottom: 1px solid var(--wpddm-border);
}
.wpddm-item > a {
	display: block;
	padding: 14px 48px 14px 16px;
	color: var(--wpddm-text);
	text-decoration: none;
}
.wpddm-item > a:hover,
.wpddm-item > a:focus {
	color: var(--wpddm-accent);
}

.wpddm-open {
	position: absolute;
	top: 0;
	right: 0;
	width: 48px;
	height: 100%;
	background: transparent;
	border: 0;
	border-left: 1px solid var(--wpddm-border);
	cursor: pointer;
}
.wpddm-open::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-top: 2px solid var(--wpddm-accent);
	border-right: 2px solid var(--wpddm-accent);
	transform: translate(-65%, -50%) rotate(45deg);
}

/* Hide toggle by default; JS/inline style unhides it below the configured breakpoint */
.wpddm-toggle { display: none; }
@media (max-width: 782px) {
	.wpddm-toggle { display: inline-flex; }
}

/* Lock page scroll while the panel is open (class added to <html> by JS) */
html.wpddm-scroll-lock { overflow: hidden; }
