/**
 * Avozova - Off-Canvas Frontend Styles
 *
 * File: assets/css/off-canvas.css
 *
 * Purpose:
 * - Five opening styles: Slide Right, Slide Left, Full Screen,
 *   Drop Down and Fade In
 * - Overlay and open/close states
 * - Header row: optional title (left) and close button (right)
 * - Optional footer (real footer tag) at the bottom of the panel
 * - Every element in its own box, Navigation (with accordion
 *   submenus)
 * - Full-screen panel on mobile and tablet
 * - Accessibility and reduced motion
 *
 * SMOOTHNESS RULES (why this file looks the way it does):
 * - The panel and the overlay animate only transform / opacity
 *   (GPU friendly). No backdrop-filter / blur on them: blur forces
 *   the browser to re-blur the whole page behind on every frame.
 * - The panel sits on its own layer (will-change + contain).
 * - Page scroll lock is a CSS class on <html> (section 2b), toggled by
 *   off-canvas.js. No layout reads in JavaScript.
 *
 * PRO VARIABLES (all optional):
 * The Pro settings of the Off-Canvas are printed as CSS variables by
 * inc/dynamic-css/header/off-canvas.php. Every variable has the old value
 * as its fallback below, so nothing changes until a setting is saved.
 *   --avozova-oc-speed             panel + overlay motion time
 *   --avozova-oc-width             panel width
 *   --avozova-oc-opacity           panel background opacity (no blur)
 *   --avozova-oc-bg-2 / -gradient-angle   panel gradient
 *   --avozova-oc-border-width / -border-color   panel border
 *   --avozova-oc-panel-shadow      panel glow
 *   --avozova-oc-gap               gap between the element boxes
 *   --avozova-oc-box-hover-border / -glow / -glow-size   box hover and focus
 *   --avozova-oc-link / -link-hover / -link-current / -sub-line   menu colors
 *   --avozova-oc-menu-size / -weight / -spacing / -case   menu text
 *
 * TITLE VARIABLE:
 *   --avozova-oc-title-color       panel title color (Design tab, not Pro).
 *                                  Empty = the title follows the drawer text.
 *
 * HEADER AND FOOTER SETTINGS:
 * The Off Canvas Header and Off Canvas Footer sections print their CSS from
 * inc/dynamic-css/header/off-canvas/off-canvas-header.php and
 * inc/dynamic-css/header/off-canvas/off-canvas-footer.php. They only
 * override the values of sections 9a and 9b below.
 *
 * TOKENS: Colors, spacing, font sizes, heights, radius, shadows,
 * line height and simple hover transitions come from the :root
 * variables of style.css (--avozova-color-*, --avozova-space-*,
 * --avozova-font-size-*, --avozova-height-*, --avozova-radius-*,
 * --avozova-shadow-*, --avozova-line-height-*, --avozova-transition*).
 * There is no hardcoded color here, so Customizer and Night Mode color
 * changes also reach the drawer.
 *
 * What stays as plain numbers on purpose (style.css has no token for them):
 * - z-index of the panel and the overlay (they must be above the
 *   WordPress admin bar, z-index 99999, and style.css stops at 1200),
 * - the panel and submenu motion (speed, easing, offsets),
 * - glow and scrollbar sizes,
 * - the 32px of the WordPress admin bar.
 *
 * NOTE: Yeh file style.css ke BAAD load honi chahiye.
 *
 * @package Avozova
 */


/* =========================================================
   1. OFF-CANVAS OVERLAY
   ========================================================= */

.avozova-off-canvas__overlay {
	position: fixed;
	inset: 0;
	z-index: 9998;

	/* No backdrop-filter: it was re-blurring the page every frame. */
	background: var(
		--avozova-oc-overlay,
		color-mix(in srgb, var(--avozova-color-heading) 55%, transparent)
	);

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	will-change: opacity;

	/* Closing: fade out first, then hide. */
	transition:
		opacity var(--avozova-oc-speed, 0.3s) ease,
		visibility 0s linear var(--avozova-oc-speed, 0.3s);
}

.avozova-off-canvas__overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;

	/* Opening: show at once, then fade in. */
	transition:
		opacity var(--avozova-oc-speed, 0.3s) ease,
		visibility 0s;
}


/* =========================================================
   2. BASE OFF-CANVAS PANEL
   ========================================================= */

.avozova-off-canvas {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: auto;

	z-index: 9999;

	display: flex;
	flex-direction: column;

	box-sizing: border-box;

	width: min(var(--avozova-oc-width, 400px), 90vw);
	max-width: 100%;

	height: 100vh;
	height: 100dvh;

	margin: 0;
	overflow: hidden;

	/*
	 * Solid panel (no backdrop-filter) so opening stays smooth.
	 * Pro: the opacity (no blur, so it is cheap) and a second color for a
	 * gradient. Without a second color both stops are the same, so the
	 * panel looks flat.
	 */
	background: linear-gradient(
		var(--avozova-oc-gradient-angle, 160deg),
		color-mix(in srgb, var(--avozova-oc-bg, var(--avozova-color-surface)) var(--avozova-oc-opacity, 100%), transparent),
		color-mix(in srgb, var(--avozova-oc-bg-2, var(--avozova-oc-bg, var(--avozova-color-surface))) var(--avozova-oc-opacity, 100%), transparent)
	);

	color: var(--avozova-oc-text, var(--avozova-color-text));

	border: var(--avozova-oc-border-width, 0) solid var(--avozova-oc-border-color, var(--avozova-color-border));
	border-radius: var(--avozova-oc-radius, 0);

	box-shadow: var(--avozova-oc-panel-shadow, var(--avozova-shadow-3));

	opacity: 1;
	transform: translateX(100%);

	visibility: hidden;
	pointer-events: none;

	/* Own GPU layer; inner changes do not re-layout the page. */
	will-change: transform;
	contain: layout paint;

	/* Closing: slide out first, then hide. */
	transition:
		transform var(--avozova-oc-speed, 0.35s) cubic-bezier(0.22, 1, 0.36, 1),
		opacity calc(var(--avozova-oc-speed, 0.35s) * 0.7) ease,
		visibility 0s linear var(--avozova-oc-speed, 0.35s);
}


/* Default opening state. */

.avozova-off-canvas.is-open {
	transform: translateX(0);
	visibility: visible;
	pointer-events: auto;

	/* Opening: visible at once, then slide in. */
	transition:
		transform var(--avozova-oc-speed, 0.35s) cubic-bezier(0.22, 1, 0.36, 1),
		opacity calc(var(--avozova-oc-speed, 0.35s) * 0.7) ease,
		visibility 0s;
}


/* =========================================================
   2b. PAGE SCROLL LOCK
   ========================================================= */

/*
 * off-canvas.js toggles this class on <html> while a panel is open.
 * scrollbar-gutter keeps the scrollbar space, so the page does not
 * jump sideways when the scrollbar disappears.
 */

html.avozova-oc-open {
	overflow: hidden;
	scrollbar-gutter: stable;
}


/* =========================================================
   3. OPENING STYLE: SLIDE RIGHT
   ========================================================= */

/*
 * Panel enters from the right edge.
 * This is also the default when no style is selected.
 */

.avozova-off-canvas--opening-slide-right {
	right: 0;
	left: auto;
	transform: translateX(100%);
	opacity: 1;
}

.avozova-off-canvas--opening-slide-right.is-open {
	transform: translateX(0);
}


/* =========================================================
   4. OPENING STYLE: SLIDE LEFT
   ========================================================= */

/*
 * Panel enters from the left edge.
 */

.avozova-off-canvas--opening-slide-left {
	right: auto;
	left: 0;
	transform: translateX(-100%);
	opacity: 1;
}

.avozova-off-canvas--opening-slide-left.is-open {
	transform: translateX(0);
}


/* Preserve compatibility with the existing left modifier. */

.avozova-off-canvas--left {
	right: auto;
	left: 0;
	transform: translateX(-100%);
}

.avozova-off-canvas--left.is-open {
	transform: translateX(0);
}


/* =========================================================
   5. OPENING STYLE: FULL SCREEN
   ========================================================= */

/*
 * On desktop, the panel expands to the full viewport.
 * On mobile and tablet, all opening styles use full-screen
 * dimensions, while their selected animations are preserved.
 */

.avozova-off-canvas--opening-full-screen {
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;

	width: 100vw;
	max-width: none;

	height: 100vh;
	height: 100dvh;

	margin: 0;
	border-radius: 0;

	transform: scale(0.98);
	opacity: 0;
}

.avozova-off-canvas--opening-full-screen.is-open {
	transform: scale(1);
	opacity: 1;
}


/* =========================================================
   6. OPENING STYLE: DROP DOWN
   ========================================================= */

/*
 * Panel drops down from the top of the viewport.
 * Its desktop width follows the normal panel width.
 */

.avozova-off-canvas--opening-dropdown {
	top: 0;
	right: 0;
	bottom: auto;
	left: 0;

	width: 100%;
	max-width: none;

	height: auto;
	max-height: 100vh;
	max-height: 100dvh;

	transform: translateY(-100%);
	opacity: 1;

	border-radius: var(--avozova-oc-radius, 0);
}

.avozova-off-canvas--opening-dropdown.is-open {
	transform: translateY(0);
}


/* =========================================================
   7. OPENING STYLE: FADE IN
   ========================================================= */

/*
 * Panel appears through opacity instead of sliding.
 */

.avozova-off-canvas--opening-fade {
	transform: none;
	opacity: 0;
}

.avozova-off-canvas--opening-fade.is-open {
	transform: none;
	opacity: 1;
}


/* =========================================================
   8. INNER WRAPPER
   ========================================================= */

/*
 * The inner wrapper is a flex column (default align-items: stretch).
 * The header row (9a), the content (10) and the footer (9b) are its
 * children and stretch to the full width by themselves, so they have no
 * width of their own. Because of that, a side margin set in the
 * Customizer (Header Margin / Footer Margin) stays inside the panel.
 */

.avozova-off-canvas__inner {
	position: relative;

	display: flex;
	flex: 1 1 auto;
	flex-direction: column;

	width: 100%;
	min-width: 0;
	min-height: 0;
	height: 100%;
}


/* =========================================================
   9. CLOSE BUTTON
   ========================================================= */

/*
 * The close button is a flex item of the header row (section 9a).
 * margin-inline-start: auto keeps it on the right, also when there
 * is no title. "Close Position: left" (Pro) is set in
 * inc/dynamic-css/header/off-canvas.php with flex order.
 */

.avozova-off-canvas__close {
	position: relative;
	z-index: 2;

	flex-shrink: 0;
	align-self: center;
	margin-block: 0;
	margin-inline-start: auto;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	width: var(--avozova-height-1);
	height: var(--avozova-height-1);
	padding: 0;

	border: 1px solid var(--avozova-color-border);
	border-radius: var(--avozova-radius-2);

	background: transparent;
	color: inherit;

	font: inherit;
	font-size: var(--avozova-font-size-7);
	line-height: 1;

	cursor: pointer;

	transition:
		background-color var(--avozova-transition-fast),
		border-color var(--avozova-transition-fast),
		box-shadow var(--avozova-transition-fast),
		transform var(--avozova-transition);
}

.avozova-off-canvas__close:hover {
	background: var(--avozova-color-header);
	border-color: var(--avozova-color-primary);
	box-shadow: 0 0 14px color-mix(in srgb, var(--avozova-color-primary) 40%, transparent);
	transform: rotate(90deg);
}

.avozova-off-canvas__close:focus-visible {
	outline: 2px solid var(--avozova-color-primary);
	outline-offset: 3px;
	box-shadow: 0 0 14px color-mix(in srgb, var(--avozova-color-primary) 45%, transparent);
}


/* =========================================================
   9a. HEADER ROW AND PANEL TITLE
   ========================================================= */

/*
 * Header row: title on the left (optional), close button on the right.
 * template-parts/header/off-canvas.php prints the title only when
 * "Panel Title" is filled in the Customizer.
 *
 * Settings of the Off Canvas Header section (background, border, padding,
 * margin) override this rule. No width here: see section 8.
 */

.avozova-off-canvas__header {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: var(--avozova-space-3);

	box-sizing: border-box;
	min-width: 0;

	/*
	 * Top and bottom padding are the same (space-3 = 16px), so the title
	 * and the close button sit in the exact center of the header box, also
	 * when the Header Padding setting is empty. The space between the header
	 * and the first box comes from the content padding-top (rule below).
	 * Same on desktop, tablet and mobile.
	 */
	padding:
		var(--avozova-space-3)
		var(--avozova-space-3)
		var(--avozova-space-3)
		var(--avozova-space-4);
}

.avozova-off-canvas__title {
	flex: 1 1 auto;
	align-self: center;
	min-width: 0;
	margin-block: 0;
	padding-block: 0;

	color: var(--avozova-oc-title-color, inherit);
	font-size: var(--avozova-font-size-4);
	font-weight: var(--avozova-font-weight-semibold);
	line-height: var(--avozova-line-height-2);

	overflow-wrap: anywhere;
}

/*
 * The close button is no longer placed over the content, so the content
 * does not need the big top padding any more (also on mobile and tablet).
 */
.avozova-off-canvas__header + .avozova-off-canvas__content {
	padding-top: var(--avozova-space-2);
}


/* =========================================================
   9b. PANEL FOOTER
   ========================================================= */

/*
 * Footer: sits below the scrolling content and stays at the bottom of
 * the panel. template-parts/header/off-canvas.php prints it only when
 * "Panel Footer" has text in the Customizer.
 * The bottom padding keeps the text clear of the phone's home bar.
 *
 * Settings of the Off Canvas Footer section (text color, background,
 * font size, border, padding, margin) override this rule.
 * No width here: see section 8.
 */

.avozova-off-canvas__footer {
	flex: 0 0 auto;

	box-sizing: border-box;
	min-width: 0;

	padding:
		var(--avozova-space-3)
		var(--avozova-space-4)
		calc(var(--avozova-space-3) + env(safe-area-inset-bottom, 0px));

	border-top: 1px solid var(--avozova-color-border);

	font-size: var(--avozova-font-size-2);
	line-height: var(--avozova-line-height-3);

	overflow-wrap: anywhere;
}

.avozova-off-canvas__footer p {
	margin: 0;
}

.avozova-off-canvas__footer p + p {
	margin-top: var(--avozova-space-2);
}

.avozova-off-canvas__footer a {
	color: inherit;
	text-decoration: underline;
}


/* =========================================================
   9c. PANEL WITHOUT HEADER
   ========================================================= */

/*
 * "Panel Header" switched off in the Customizer: no header row is printed,
 * but the close button must stay. template-parts/header/off-canvas.php then
 * prints the button alone and the panel gets this class. The button floats
 * in the top corner (right by default; "Close Position: left" is set in
 * inc/dynamic-css/header/off-canvas.php). The content keeps its own top
 * padding (section 10, space-8), so nothing runs under the button.
 */

.avozova-off-canvas--no-header .avozova-off-canvas__close {
	position: absolute;
	top: var(--avozova-space-3);
	inset-inline-end: var(--avozova-space-3);
	margin: 0;
}


/* =========================================================
   10. CONTENT AREA
   ========================================================= */

.avozova-off-canvas__content {
	flex: 1 1 auto;

	width: 100%;
	min-width: 0;
	min-height: 0;

	box-sizing: border-box;

	overflow-x: hidden;
	overflow-y: auto;

	padding: var(
		--avozova-oc-padding,
		var(--avozova-space-8) var(--avozova-space-4) var(--avozova-space-4)
	);

	text-align: var(--avozova-oc-align, left);

	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;

	/* Slim neon scrollbar. */
	scrollbar-width: thin;
	scrollbar-color: color-mix(in srgb, var(--avozova-color-primary) 60%, transparent) transparent;
}

.avozova-off-canvas__content::-webkit-scrollbar {
	width: 6px;
}

.avozova-off-canvas__content::-webkit-scrollbar-track {
	background: transparent;
}

.avozova-off-canvas__content::-webkit-scrollbar-thumb {
	border-radius: var(--avozova-radius-full);
	background: color-mix(in srgb, var(--avozova-color-primary) 60%, transparent);
}

.avozova-off-canvas__content::-webkit-scrollbar-thumb:hover {
	background: var(--avozova-color-primary);
}


/* =========================================================
   10b. ELEMENT BOXES
   ========================================================= */

/*
 * Every element added to the Off-Canvas (menu, search, social,
 * button ...) sits in its own box. template-parts/header/off-canvas.php
 * prints one .avozova-off-canvas__item wrapper per element, so the
 * boxes are styled here and the elements inside stay untouched.
 *
 * The content area becomes one column: all boxes have the same width
 * and the same gap between them.
 *
 * No entrance animation: the boxes appear together with the panel,
 * so the panel opens smoothly.
 */

.avozova-off-canvas__content {
	display: flex;
	flex-direction: column;
	gap: var(--avozova-oc-gap, var(--avozova-space-2));
}

.avozova-off-canvas__item {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: var(--avozova-space-2);

	border: 1px solid var(--avozova-color-border);
	border-radius: var(--avozova-radius-3);

	background: color-mix(in srgb, var(--avozova-color-primary) 4%, transparent);

	transition:
		border-color var(--avozova-transition),
		background-color var(--avozova-transition),
		box-shadow var(--avozova-transition);
}

/* Neon glow while the box has the focus inside. */
.avozova-off-canvas__item:focus-within {
	border-color: var(--avozova-oc-box-hover-border, color-mix(in srgb, var(--avozova-color-primary) 55%, transparent));
	background: color-mix(in srgb, var(--avozova-color-primary) 7%, transparent);
	box-shadow:
		0 0 0 1px color-mix(in srgb, var(--avozova-oc-glow, var(--avozova-color-primary)) 18%, transparent),
		0 0 var(--avozova-oc-glow-size, 20px) color-mix(in srgb, var(--avozova-oc-glow, var(--avozova-color-primary)) 22%, transparent);
}

/* Hover glow only on devices that really hover (no sticky glow on touch). */
@media (hover: hover) {

	.avozova-off-canvas__item:hover {
		border-color: var(--avozova-oc-box-hover-border, color-mix(in srgb, var(--avozova-color-primary) 55%, transparent));
		background: color-mix(in srgb, var(--avozova-color-primary) 7%, transparent);
		box-shadow:
			0 0 0 1px color-mix(in srgb, var(--avozova-oc-glow, var(--avozova-color-primary)) 18%, transparent),
			0 0 var(--avozova-oc-glow-size, 20px) color-mix(in srgb, var(--avozova-oc-glow, var(--avozova-color-primary)) 22%, transparent);
	}
}


/* =========================================================
   11. NAVIGATION
   ========================================================= */

/* ---------------------------------------------------------
   11.1 Base list and links
   --------------------------------------------------------- */

.avozova-off-canvas__navigation {
	width: 100%;
}

.avozova-off-canvas__navigation-list,
.avozova-off-canvas__navigation-list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.avozova-off-canvas__navigation-list li {
	position: relative;
	margin: 0;
	padding: 0;
}

/*
 * Link height: space-2 above and below + line-height-4 (1.7) gives a
 * comfortable touch target (about 43px at 16px text).
 */
.avozova-off-canvas__navigation-list a {
	display: block;

	padding: var(--avozova-space-2) var(--avozova-space-3);
	border-radius: var(--avozova-radius-2);

	color: var(--avozova-oc-link, inherit);
	font: inherit;
	font-size: var(--avozova-oc-menu-size, inherit);
	font-weight: var(--avozova-oc-menu-weight, inherit);
	line-height: var(--avozova-line-height-4);
	letter-spacing: var(--avozova-oc-menu-spacing, inherit);
	text-transform: var(--avozova-oc-menu-case, inherit);
	text-decoration: none;

	overflow-wrap: anywhere;

	transition:
		color var(--avozova-transition-fast),
		background-color var(--avozova-transition-fast);
}

.avozova-off-canvas__navigation-list a:hover {
	color: var(--avozova-oc-link-hover, var(--avozova-color-primary));
	background-color:
		color-mix(in srgb, var(--avozova-color-primary) 5%, transparent);
}

.avozova-off-canvas__navigation-list a:focus-visible {
	outline: 2px solid var(--avozova-color-primary);
	outline-offset: 2px;
	border-radius: var(--avozova-radius-2);

	box-shadow:
		0 0 8px color-mix(in srgb, var(--avozova-color-primary) 35%, transparent);
}


/* ---------------------------------------------------------
   11.2 Nested Navigation – Grouped Surface & Accent Rail
   --------------------------------------------------------- */

.avozova-off-canvas__navigation-list ul {
	margin: var(--avozova-space-1) 0 var(--avozova-space-2) var(--avozova-space-2);
	padding: var(--avozova-space-2) var(--avozova-space-2) var(--avozova-space-2) var(--avozova-space-3);

	border-radius: 0 var(--avozova-radius-2) var(--avozova-radius-2) 0;
	border-left: 2px solid
		var(--avozova-oc-sub-line, color-mix(in srgb, var(--avozova-color-primary) 50%, transparent));

	background-color:
		color-mix(in srgb, var(--avozova-color-primary) 4%, transparent);

	box-shadow:
		-4px 0 14px -10px
		color-mix(in srgb, var(--avozova-color-primary) 75%, transparent);
}


/* ---------------------------------------------------------
   11.3 Submenus – Accordion Controls
   --------------------------------------------------------- */

/*
 * The dropdown arrow is shared with the Header menu and is
 * drawn in header-elements.css, section 1.7.
 *
 * script.js controls the .is-open class on parent <li>.
 */

.avozova-off-canvas__navigation-list li.menu-item-has-children > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--avozova-space-2);
}


/* Open parent item – Active Pill Header. */

.avozova-off-canvas__navigation-list
li.menu-item-has-children.is-open > a {
	color: var(--avozova-oc-link-current, var(--avozova-color-primary));
	background-color:
		color-mix(in srgb, var(--avozova-color-primary) 9%, transparent);
	font-weight: var(--avozova-font-weight-medium);
}

.avozova-off-canvas__navigation-list
li.menu-item-has-children.is-open > a::before {
	filter:
		drop-shadow(
			0 0 5px
			color-mix(in srgb, var(--avozova-color-primary) 75%, transparent)
		);
}


/* Current page & active parent. */

.avozova-off-canvas__navigation-list li.current-menu-item > a,
.avozova-off-canvas__navigation-list li.current-menu-ancestor > a {
	color: var(--avozova-oc-link-current, var(--avozova-color-primary));
	font-weight: var(--avozova-font-weight-semibold);
}


/* ---------------------------------------------------------
   11.4 Submenu Links – Compact Interactive Surface
   --------------------------------------------------------- */

.avozova-off-canvas__navigation-list ul a {
	padding: var(--avozova-space-2) var(--avozova-space-3);
	border-radius: var(--avozova-radius-2);

	transition:
		color var(--avozova-transition-fast),
		background-color var(--avozova-transition-fast),
		transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.avozova-off-canvas__navigation-list ul a:hover {
	transform: translateX(var(--avozova-space-1));

	background-color:
		color-mix(in srgb, var(--avozova-color-primary) 9%, transparent);
}

.avozova-off-canvas__navigation-list ul a:focus-visible {
	outline-offset: -2px;
}


/* ---------------------------------------------------------
   11.5 Submenu – Smooth Expand and Collapse
   --------------------------------------------------------- */

/* Closed state. */

.avozova-off-canvas__navigation-list
li.menu-item-has-children > ul {
	display: block;

	max-height: 0;
	opacity: 0;
	visibility: hidden;

	overflow: hidden;
	pointer-events: none;

	margin-top: 0;
	margin-bottom: 0;
	padding-top: 0;
	padding-bottom: 0;

	border-left-color: transparent;
	background-color: transparent;
	box-shadow: none;

	transform: translateY(-6px);

	transition:
		max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.2s ease,
		transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
		margin 0.28s ease,
		padding 0.28s ease,
		background-color 0.25s ease,
		border-color 0.25s ease,
		visibility 0s linear 0.35s;
}


/* Open state. */

.avozova-off-canvas__navigation-list
li.menu-item-has-children.is-open > ul {
	max-height: 40rem;
	opacity: 1;
	visibility: visible;

	pointer-events: auto;

	margin-top: var(--avozova-space-1);
	margin-bottom: var(--avozova-space-2);
	padding-top: var(--avozova-space-2);
	padding-bottom: var(--avozova-space-2);

	border-left-color:
		var(--avozova-oc-sub-line, color-mix(in srgb, var(--avozova-color-primary) 55%, transparent));

	background-color:
		color-mix(in srgb, var(--avozova-color-primary) 4%, transparent);

	box-shadow:
		-4px 0 14px -10px
		color-mix(in srgb, var(--avozova-color-primary) 75%, transparent);

	transform: translateY(0);

	transition:
		max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.25s ease 0.04s,
		transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		margin 0.28s ease,
		padding 0.28s ease,
		background-color 0.28s ease,
		border-color 0.28s ease,
		visibility 0s;
}

/* Lag-free exact height transition in modern browsers. */

@supports (interpolate-size: allow-keywords) {

	.avozova-off-canvas__navigation-list
	li.menu-item-has-children > ul {
		interpolate-size: allow-keywords;
		max-height: none;
		height: 0;

		transition:
			height 0.34s cubic-bezier(0.22, 1, 0.36, 1),
			opacity 0.2s ease,
			transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
			margin 0.28s ease,
			padding 0.28s ease,
			background-color 0.25s ease,
			border-color 0.25s ease,
			visibility 0s linear 0.34s;
	}

	.avozova-off-canvas__navigation-list
	li.menu-item-has-children.is-open > ul {
		max-height: none;
		height: auto;

		transition:
			height 0.36s cubic-bezier(0.22, 1, 0.36, 1),
			opacity 0.25s ease 0.04s,
			transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
			margin 0.28s ease,
			padding 0.28s ease,
			background-color 0.28s ease,
			border-color 0.28s ease,
			visibility 0s;
	}
}


/* ---------------------------------------------------------
   11.6 Submenu – Smooth Staggered Reveal
   --------------------------------------------------------- */

.avozova-off-canvas__navigation-list
li.menu-item-has-children.is-open > ul > li {
	animation: avozova-oc-subitem-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: 0.04s;
}

.avozova-off-canvas__navigation-list
li.menu-item-has-children.is-open > ul > li:nth-child(2) {
	animation-delay: 0.08s;
}

.avozova-off-canvas__navigation-list
li.menu-item-has-children.is-open > ul > li:nth-child(3) {
	animation-delay: 0.12s;
}

.avozova-off-canvas__navigation-list
li.menu-item-has-children.is-open > ul > li:nth-child(4) {
	animation-delay: 0.16s;
}

.avozova-off-canvas__navigation-list
li.menu-item-has-children.is-open > ul > li:nth-child(5) {
	animation-delay: 0.2s;
}

.avozova-off-canvas__navigation-list
li.menu-item-has-children.is-open > ul > li:nth-child(n+6) {
	animation-delay: 0.24s;
}


@keyframes avozova-oc-subitem-in {

	from {
		opacity: 0;
		transform: translateY(-6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* ---------------------------------------------------------
   11.7 Optional Item Dividers
   --------------------------------------------------------- */

.avozova-off-canvas--has-dividers
.avozova-off-canvas__navigation-list > li + li {
	border-top: 1px solid var(--avozova-color-border);
}

.avozova-off-canvas--has-dividers
.avozova-off-canvas__navigation-list li.is-open > ul {
	border-top: 1px solid var(--avozova-color-border);
}


/* =========================================================
   12. CUSTOMIZER PREVIEW NOTICE
   ========================================================= */

.avozova-off-canvas__notice {
	margin: var(--avozova-space-3) 0 0;
	padding: var(--avozova-space-3);

	border: 1px dashed var(--avozova-color-border);
	border-radius: var(--avozova-radius-2);

	color: inherit;
	font-size: var(--avozova-font-size-2);
}


/* =========================================================
   13. WordPress ADMIN BAR — DESKTOP
   ========================================================= */

@media screen and (min-width: 1025px) {

	body.admin-bar .avozova-off-canvas {
		top: 32px;
		height: calc(100vh - 32px);
		height: calc(100dvh - 32px);
	}

	body.admin-bar .avozova-off-canvas__overlay {
		top: 32px;
	}

	/* Full-screen style respects the desktop admin bar. */

	body.admin-bar
	.avozova-off-canvas--opening-full-screen {
		top: 32px;
		height: calc(100vh - 32px);
		height: calc(100dvh - 32px);
	}

	/*
	 * Drop Down apni height content ke hisaab se rakhta hai.
	 * Upar ka admin-bar height rule ise poori height bana deta tha,
	 * isliye yahan height wapas auto ki gayi hai.
	 */

	body.admin-bar
	.avozova-off-canvas--opening-dropdown {
		height: auto;
		max-height: calc(100vh - 32px);
		max-height: calc(100dvh - 32px);
	}
}


/* =========================================================
   14. MOBILE AND TABLET — FULL-SCREEN DIMENSIONS
   ========================================================= */

@media screen and (max-width: 1024px) {

	/*
	 * All styles occupy the full viewport.
	 * The selected opening-style class still determines
	 * the animation direction or fade effect.
	 *
	 * The dynamic CSS (inc/dynamic-css/header/off-canvas.php) prints the
	 * Panel Margin and Border Radius only for desktop (1025px and up), so
	 * the margin 0 and radius 0 below are not overridden here.
	 *
	 * The header, footer and content keep the same padding as on desktop
	 * (sections 9a, 9b and 10), so there is no separate mobile padding.
	 *
	 * z-index: WordPress admin bar (z-index 99999) is screen par
	 * logged-in users ke liye drawer ke upar aa jata tha aur close
	 * button dhak jata tha. Isliye drawer aur overlay uske upar hain.
	 */

	.avozova-off-canvas {
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;

		z-index: 100001;

		width: 100vw;
		max-width: none;

		height: 100vh;
		height: 100dvh;

		margin: 0;
		border-radius: 0;

		box-sizing: border-box;
	}

	/* Slide Right remains right-to-left. */

	.avozova-off-canvas--opening-slide-right {
		transform: translateX(100%);
	}

	.avozova-off-canvas--opening-slide-right.is-open {
		transform: translateX(0);
	}

	/* Slide Left remains left-to-right. */

	.avozova-off-canvas--opening-slide-left,
	.avozova-off-canvas--left {
		transform: translateX(-100%);
	}

	.avozova-off-canvas--opening-slide-left.is-open,
	.avozova-off-canvas--left.is-open {
		transform: translateX(0);
	}

	/* Full Screen still uses its scale animation. */

	.avozova-off-canvas--opening-full-screen {
		transform: scale(0.98);
		opacity: 0;
	}

	.avozova-off-canvas--opening-full-screen.is-open {
		transform: scale(1);
		opacity: 1;
	}

	/* Drop Down moves vertically, not horizontally. */

	.avozova-off-canvas--opening-dropdown {
		top: 0;
		right: 0;
		bottom: auto;
		left: 0;

		width: 100vw;
		max-width: none;

		height: 100vh;
		height: 100dvh;

		transform: translateY(-100%);
	}

	.avozova-off-canvas--opening-dropdown.is-open {
		transform: translateY(0);
	}

	/* Fade In does not slide in either direction. */

	.avozova-off-canvas--opening-fade {
		transform: none;
		opacity: 0;
	}

	.avozova-off-canvas--opening-fade.is-open {
		transform: none;
		opacity: 1;
	}

	.avozova-off-canvas__overlay {
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;

		z-index: 100000;
	}

	.avozova-off-canvas__inner {
		width: 100%;
		min-width: 0;
		height: 100%;
	}

	/* Keep full-screen dimensions when the admin bar is visible. */

	body.admin-bar .avozova-off-canvas {
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;

		width: 100vw;
		max-width: none;

		height: 100vh;
		height: 100dvh;

		margin: 0;
		border-radius: 0;
	}

	body.admin-bar .avozova-off-canvas__overlay {
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
	}
}


/* =========================================================
   15. REDUCED MOTION
   ========================================================= */

/*
 * All reduced-motion rules of the Off-Canvas live here.
 * !important is used on purpose: the submenu open state and the
 * @supports block above have higher specificity and would
 * otherwise keep animating.
 */

@media (prefers-reduced-motion: reduce) {

	.avozova-off-canvas,
	.avozova-off-canvas.is-open,
	.avozova-off-canvas__overlay,
	.avozova-off-canvas__overlay.is-open,
	.avozova-off-canvas__close,
	.avozova-off-canvas__item,
	.avozova-off-canvas__navigation-list a,
	.avozova-off-canvas__navigation-list ul a,
	.avozova-off-canvas__navigation-list li.menu-item-has-children > ul,
	.avozova-off-canvas__navigation-list li.menu-item-has-children.is-open > ul {
		transition: none !important;
	}

	.avozova-off-canvas__navigation-list
	li.menu-item-has-children.is-open > ul > li {
		animation: none !important;
	}

	.avozova-off-canvas__close:hover,
	.avozova-off-canvas__navigation-list ul a:hover {
		transform: none;
	}
}


/* =========================================================
   16. ELEMENT DIVIDER
   ========================================================= */

/*
 * The line between elements is the reusable Divider component
 * (avozova-divider.css), printed by template-parts/header/off-canvas.php
 * only when "Item Divider" is on. The template passes no color or opacity,
 * so the look is set here with the variables of the component:
 * - color: the drawer text color (currentcolor),
 * - opacity: 15%,
 * - margins: 0, because the content area is a column with a gap (section
 *   10b), so the gap already sets the distance between the boxes.
 * The Divider settings of the Element Boxes section (Divider Color,
 * Thickness, Length, Opacity) are printed by
 * inc/dynamic-css/header/off-canvas/off-canvas-boxes.php on this same class,
 * after this file, so they win over these defaults.
 */

.avozova-off-canvas__divider {
	--avozova-divider-color: currentcolor;
	--avozova-divider-opacity: 0.15;
	--avozova-divider-mt: 0;
	--avozova-divider-mb: 0;
}