/* ==========================================================================
   Mobile Drilldown Nav — mobile-drilldown.css
   All selectors scoped under .mdn-wrap.
   Colour overrides are driven by CSS custom properties set per widget
   instance via the Elementor style controls.
   ========================================================================== */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.mdn-wrap {
	position: relative;
	width: 100%;
}

/* ── Header bar ───────────────────────────────────────────────────────────── */
/*
 * The header is a two-layer design:
 *   Outer — accent colour (blue), 70 px tall, provides the top coloured stripe.
 *   Inner — background colour (cream), 60 px, sits 10 px from the top so the
 *           accent peeks out above it.
 */
.mdn-header {
	position: relative;
	background: var(--mdn-header-accent, #005e83);
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(26, 26, 26, 0.1);
	height: 70px;
	overflow: hidden;
}

.mdn-header-inner {
	position: absolute;
	top: 10px;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--mdn-header-bg, #fefbee);
	padding: 6px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* ── Logo ─────────────────────────────────────────────────────────────────── */
.mdn-logo {
	display: flex;
	align-items: center;
	text-decoration: none;
	flex-shrink: 0;
}

.mdn-logo img {
	height: 48px;
	width: auto;
	display: block;
}

.mdn-logo--text {
	font-family: 'Rubik', sans-serif;
	font-weight: 700;
	font-size: 18px;
	color: var(--mdn-nav-link-color, #00384e);
}

/* ── Reset: undo Elementor kit global button styles inside the widget ─────── */
/*
 * .elementor-kit-N button has specificity (0,1,1). By scoping under .mdn-wrap
 * we get (0,2,0) for named-class rules, which reliably wins.
 * This broad rule also wins by cascade order when specificity ties.
 */
.mdn-wrap button {
	font-family: 'Rubik', sans-serif;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
	background-color: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
	cursor: pointer;
}

.mdn-wrap button:hover,
.mdn-wrap button:focus {
	background-color: transparent;
	color: inherit;
}

/* ── Hamburger toggle ─────────────────────────────────────────────────────── */
.mdn-wrap .mdn-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--mdn-toggle-color, #005e83);
	padding: 0;
	flex-shrink: 0;
}

/* Show hamburger / hide close by default; swap when panel is open. */
.mdn-icon-hamburger {
	display: flex;
}

.mdn-icon-close {
	display: none;
}

.mdn-wrap.is-open .mdn-header {
	border-radius: 8px 8px 0 0;
}

.mdn-wrap.is-open .mdn-icon-hamburger {
	display: none;
}

.mdn-wrap.is-open .mdn-icon-close {
	display: flex;
}

/* ── Panel ────────────────────────────────────────────────────────────────── */
/*
 * Positioned fixed so it always spans the full viewport width regardless of
 * which Elementor container the widget lives in. `top` is set dynamically
 * by JS so it appears flush below the header bar.
 */
.mdn-panel {
	display: none;
	position: fixed;
	left: 10px;
	right: 0;
	width: 100%;
	background: var(--mdn-panel-bg, #d8ece7);
	border-radius: 0 0 8px 8px;
	box-shadow: inset 0 2px 4px 0 rgba(26, 26, 26, 0.10), 0 2px 4px rgba(26, 26, 26, 0.1);
	z-index: 99999;
	overflow-y: auto;
	max-height: 85vh;
  	max-width: calc(var(--content-width) - 20px);
}

.mdn-panel.is-open {
	display: block;
}

/* ── Nav links section ────────────────────────────────────────────────────── */
.mdn-nav-links {
	padding: 32px 16px 24px;
	position: relative;
	overflow: hidden;
}

/* ── Screens (drilldown level panels) ─────────────────────────────────────── */
.mdn-screen {
	display: none;
}

.mdn-screen.is-active {
	display: block;
}

/* ── Nav list ─────────────────────────────────────────────────────────────── */
.mdn-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.mdn-wrap .mdn-item a,
.mdn-wrap .mdn-drill-btn {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	width: 100%;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-family: 'Rubik', sans-serif;
	font-weight: 500;
	font-size: 18px;
	line-height: 24px;
	color: var(--mdn-nav-link-color, #00384e);
	text-decoration: none;
	text-align: left;
}

.mdn-caret-right {
	flex-shrink: 0;
	color: var(--mdn-nav-link-color, #00384e);
}

/* ── Back row (sub-screen header) ─────────────────────────────────────────── */
.mdn-back-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 8px;
	margin-bottom: 32px;
	border-bottom: 1px solid #005e83;
}

.mdn-wrap .mdn-back-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: none;
	cursor: pointer;
	font-family: 'Rubik', sans-serif;
	font-weight: 500;
	font-size: 18px;
	line-height: 24px;
	color: var(--mdn-back-link-color, #009abe);
	padding: 0;
}

.mdn-caret-left {
	flex-shrink: 0;
}

.mdn-parent-label {
	font-family: 'Brother 1816 Printed', sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 24px;
	color: var(--mdn-nav-link-color, #00384e);
	white-space: nowrap;
}

/* ── Utility section ──────────────────────────────────────────────────────── */
.mdn-utility {
	border-top: 1px solid #005e83;
	padding: 24px 16px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ── Search form ──────────────────────────────────────────────────────────── */
.mdn-search-form {
	display: flex;
	align-items: center;
	gap: 16px;
	border: 1.6px solid #005e83;
	border-radius: 8px;
	padding: 8px;
	width: 100%;
}

.mdn-wrap .mdn-search-icon {
	background: none;
	border: none;
	cursor: pointer;
	color: #005e83;
	padding: 0;
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.mdn-search-input {
	flex: 1;
	border: none !important;
	background: transparent;
	font-family: 'Rubik', sans-serif;
	font-size: 14px;
	color: #005e83;
	outline: none;
	padding: 0;
	padding-left: 0 !important;
	height: 17px;
}

.mdn-search-input::placeholder {
	color: #005e83 !important;
	opacity: 1;
	font-weight: 500;
}

/* ── Utility links list ───────────────────────────────────────────────────── */
.mdn-utility-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.mdn-utility-list a {
	font-family: 'Rubik', sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: normal;
	color: var(--mdn-utility-link-color, #005e83);
	text-decoration: none;
}

.mdn-utility-list a:hover {
	text-decoration: underline;
}
