/**
 * Jeepa Travel Sikkim: mobile and tablet menu drawer ("Himalayan evening").
 *
 * Loaded after header.css (see jeepa_nav_design_enabled() in inc/assets.php).
 * Only screens up to 1100px are affected; the desktop menu is unchanged.
 * Markup additions: template-parts/header/drawer-head.php and drawer-foot.php.
 * No fonts or image files: artwork is inline SVG.
 */

.jeepa-drawer-head,
.jeepa-drawer-foot {
	display: none;
}

@media (max-width: 1100px) {

	/* ---------- Toggle: icon button, word kept for screen readers ---------- */
	.jeepa-menu-toggle {
		position: relative;
		justify-content: center;
		width: 48px;
		height: 48px;
		padding: 0;
		gap: 0;
		border: 1.5px solid rgb(255 255 255 / 34%);
		border-radius: 14px;
		background: rgb(255 255 255 / 8%);
		transition: background-color .2s ease, border-color .2s ease;
	}

	.jeepa-menu-toggle:hover {
		background: rgb(255 255 255 / 16%);
		border-color: rgb(255 255 255 / 55%);
	}

	.jeepa-menu-toggle span:last-child {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.jeepa-menu-toggle span:first-child {
		position: relative;
		display: block;
		width: 22px;
		height: 2.5px;
		border-radius: 3px;
		background: #fff;
		font-size: 0;
		line-height: 0;
	}

	.jeepa-menu-toggle span:first-child::before,
	.jeepa-menu-toggle span:first-child::after {
		content: "";
		position: absolute;
		left: 0;
		height: 2.5px;
		border-radius: 3px;
		background: #fff;
		transition: width .25s ease;
	}

	.jeepa-menu-toggle span:first-child::before {
		top: -7px;
		width: 22px;
	}

	.jeepa-menu-toggle span:first-child::after {
		top: 7px;
		width: 14px;
	}

	.jeepa-menu-toggle:hover span:first-child::after {
		width: 22px;
	}

	/* ---------- Drawer surface ---------- */
	.jeepa-primary-nav {
		--jnd-ease: cubic-bezier(.22, 1, .36, 1);
		display: flex;
		flex-direction: column;
		width: min(380px, 88vw);
		padding: 0;
		border-radius: 0 26px 26px 0;
		/* Lighter meadow green. Darkest at the bottom so white text keeps 4.5:1 or better. */
		background:
			radial-gradient(45% 22% at 100% 0%, rgb(255 255 255 / 10%) 0%, transparent 70%),
			radial-gradient(90% 40% at 0% 60%, rgb(255 104 26 / 7%) 0%, transparent 65%),
			linear-gradient(176deg, #23874b 0%, #1f7e46 50%, #1a7442 100%);
		box-shadow: 20px 0 60px rgb(0 0 0 / 25%);
		transition: transform .42s var(--jnd-ease), visibility .42s;
	}

	.jeepa-mobile-nav-scrim:not([hidden]) {
		background: rgb(10 40 24 / 50%);
	}

	.jeepa-menu-close {
		z-index: 3;
		top: 22px;
		right: 18px;
		width: 42px;
		height: 42px;
		border: 0;
		background: rgb(255 255 255 / 12%);
		transition: background-color .2s ease, transform .3s var(--jnd-ease);
	}

	.jeepa-menu-close:hover {
		background: rgb(255 255 255 / 22%);
		transform: rotate(90deg);
	}

	.jeepa-menu-close:focus-visible {
		outline: 3px solid #fff;
		outline-offset: 2px;
	}

	/* ---------- Brand header and garland ---------- */
	.jeepa-drawer-head {
		display: block;
		flex: none;
		padding: 18px 72px 0 18px;
	}

	.jeepa-drawer-brand {
		display: flex;
		align-items: center;
		gap: 12px;
		min-height: 64px;
		color: #fff;
		text-decoration: none;
	}

	.jeepa-drawer-logo {
		flex: 0 0 58px;
		display: grid;
		place-items: center;
		width: 58px;
		height: 58px;
		border-radius: 50%;
		background: #fff;
		box-shadow: 0 0 0 3px rgb(255 255 255 / 18%), 0 10px 22px -10px rgb(0 0 0 / 60%);
		overflow: hidden;
	}

	.jeepa-drawer-logo img {
		display: block;
		width: 52px;
		height: 52px;
		object-fit: contain;
	}

	.jeepa-drawer-brand-text {
		display: flex;
		flex-direction: column;
		min-width: 0;
	}

	.jeepa-drawer-name {
		font-size: 1.125rem;
		font-weight: 700;
		line-height: 1.2;
		letter-spacing: -.01em;
	}

	.jeepa-drawer-tagline {
		margin-top: 3px;
		color: #fff;
		font-size: .875rem;
		line-height: 1.3;
	}

	.jeepa-drawer-brand:focus-visible {
		outline: 3px solid #fff;
		outline-offset: 4px;
		border-radius: 14px;
	}

	.jeepa-drawer-flags {
		display: block;
		width: calc(100% + 90px);
		max-width: none;
		height: auto;
		margin: 6px 0 0 -18px;
		overflow: visible;
	}

	/* ---------- Menu items ---------- */
	.jeepa-primary-nav .jeepa-menu-list {
		flex: none;
		padding: 6px 14px 4px;
	}

	.jeepa-primary-nav .jeepa-menu-list > li {
		--flag: #4f8df5;
		opacity: 0;
		transform: translateX(-16px);
		transition: opacity .35s ease, transform .5s var(--jnd-ease);
	}

	.jeepa-primary-nav .jeepa-menu-list > li:nth-child(5n+2) { --flag: #eef2f8; }
	.jeepa-primary-nav .jeepa-menu-list > li:nth-child(5n+3) { --flag: #ff6b6b; }
	.jeepa-primary-nav .jeepa-menu-list > li:nth-child(5n+4) { --flag: #34d399; }
	.jeepa-primary-nav .jeepa-menu-list > li:nth-child(5n+5) { --flag: #fbbf24; }

	.jeepa-primary-nav.is-open .jeepa-menu-list > li {
		opacity: 1;
		transform: none;
	}

	.jeepa-primary-nav.is-open .jeepa-menu-list > li:nth-child(1) { transition-delay: .06s; }
	.jeepa-primary-nav.is-open .jeepa-menu-list > li:nth-child(2) { transition-delay: .10s; }
	.jeepa-primary-nav.is-open .jeepa-menu-list > li:nth-child(3) { transition-delay: .14s; }
	.jeepa-primary-nav.is-open .jeepa-menu-list > li:nth-child(4) { transition-delay: .18s; }
	.jeepa-primary-nav.is-open .jeepa-menu-list > li:nth-child(5) { transition-delay: .22s; }
	.jeepa-primary-nav.is-open .jeepa-menu-list > li:nth-child(6) { transition-delay: .26s; }
	.jeepa-primary-nav.is-open .jeepa-menu-list > li:nth-child(n+7) { transition-delay: .30s; }

	.jeepa-primary-nav .jeepa-menu-list > li + li {
		border-top: 1px solid rgb(255 255 255 / 8%);
	}

	.jeepa-primary-nav .jeepa-menu-list > li > a {
		position: relative;
		display: flex;
		align-items: center;
		gap: 12px;
		margin: 3px 0;
		padding: 13px 14px 13px 22px;
		border: 0;
		border-radius: 14px;
		color: #fff;
		font-size: 1.1875rem;
		font-weight: 700;
		line-height: 1.3;
		white-space: normal;
		transition: background-color .2s ease;
	}

	/* Prayer flag tick */
	.jeepa-primary-nav .jeepa-menu-list > li > a::before {
		content: "";
		position: absolute;
		top: 50%;
		left: 8px;
		width: 4px;
		height: 18px;
		margin-top: -9px;
		border-radius: 4px;
		background: var(--flag);
		transition: height .25s var(--jnd-ease), margin-top .25s var(--jnd-ease), background-color .2s ease;
	}

	/* Arrow on plain links (parents use their own toggle button) */
	.jeepa-primary-nav .jeepa-menu-list > li:not(.menu-item-has-children) > a::after {
		content: "";
		flex: none;
		width: 8px;
		height: 8px;
		margin-left: auto;
		border-top: 2px solid currentColor;
		border-right: 2px solid currentColor;
		transform: rotate(45deg);
		opacity: .45;
		transition: opacity .2s ease, transform .25s var(--jnd-ease);
	}

	.jeepa-primary-nav .jeepa-menu-list > li > a:hover,
	.jeepa-primary-nav .jeepa-menu-list > li > a:focus-visible {
		background: rgb(255 255 255 / 9%);
		color: #fff;
	}

	.jeepa-primary-nav .jeepa-menu-list > li > a:hover::after {
		opacity: .9;
		transform: translateX(3px) rotate(45deg);
	}

	.jeepa-primary-nav .jeepa-menu-list > li > a:focus-visible {
		outline: 3px solid #fff;
		outline-offset: -3px;
	}

	/* Current page */
	.jeepa-primary-nav .jeepa-menu-list > li:is(.current-menu-item, .current-menu-ancestor, .current_page_item) > a {
		background: rgb(255 255 255 / 13%);
	}

	.jeepa-primary-nav .jeepa-menu-list > li:is(.current-menu-item, .current-menu-ancestor, .current_page_item) > a::before {
		height: 28px;
		margin-top: -14px;
		background: var(--jeepa-orange, #ff681a);
	}

	/* Submenu toggle */
	.jeepa-primary-nav .jeepa-menu-list li.menu-item-has-children > .jeepa-submenu-toggle {
		width: 42px;
		height: 42px;
		border: 0;
		border-radius: 12px;
		background: rgb(255 255 255 / 9%);
	}

	.jeepa-primary-nav .jeepa-menu-list li.menu-item-has-children > .jeepa-submenu-toggle:hover,
	.jeepa-primary-nav .jeepa-menu-list li.is-submenu-open > .jeepa-submenu-toggle {
		background: rgb(255 255 255 / 18%);
	}

	/* Submenu */
	.jeepa-primary-nav .jeepa-menu-list li.menu-item-has-children > .sub-menu {
		margin: 0 0 10px 22px;
		padding: 2px 0 2px 12px;
		width: auto;
		border-left: 2px dashed rgb(255 255 255 / 20%);
	}

	.jeepa-primary-nav .jeepa-menu-list .sub-menu a {
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 10px 12px;
		border-radius: 10px;
		color: #fff;
		font-size: 1.0625rem;
		font-weight: 600;
	}

	.jeepa-primary-nav .jeepa-menu-list .sub-menu a::before {
		content: "";
		flex: none;
		width: 6px;
		height: 6px;
		border-radius: 50%;
		background: #fff;
		opacity: .75;
	}

	.jeepa-primary-nav .jeepa-menu-list .sub-menu :is(.current-menu-item, .current_page_item) > a {
		background: rgb(255 255 255 / 12%);
		color: #fff;
	}

	.jeepa-primary-nav .jeepa-menu-list .sub-menu :is(.current-menu-item, .current_page_item) > a::before {
		background: var(--jeepa-orange, #ff681a);
		opacity: 1;
	}

	/* ---------- Contact card and mountains ---------- */
	.jeepa-drawer-foot {
		position: relative;
		display: block;
		flex: none;
		margin-top: auto;
		padding: 18px 14px 0;
	}

	.jeepa-drawer-card {
		position: relative;
		z-index: 1;
		padding: 14px;
		border: 1px solid rgb(255 255 255 / 13%);
		border-radius: 18px;
		background: rgb(255 255 255 / 7%);
		opacity: 0;
		transform: translateY(12px);
		transition: opacity .4s ease .3s, transform .55s var(--jnd-ease) .3s;
	}

	.jeepa-primary-nav.is-open .jeepa-drawer-card {
		opacity: 1;
		transform: none;
	}

	.jeepa-drawer-kicker {
		margin: 0 0 10px;
		color: #fff;
		font-size: .8125rem;
		font-weight: 700;
		line-height: 1.3;
		letter-spacing: .08em;
		text-transform: uppercase;
	}

	.jeepa-drawer-actions {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.jeepa-drawer-action {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		min-height: 50px;
		padding: 10px 12px;
		border-radius: 14px;
		font-size: 1rem;
		font-weight: 700;
		line-height: 1.2;
		text-decoration: none;
		transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
	}

	.jeepa-drawer-action svg {
		flex: none;
		width: 20px;
		height: 20px;
	}

	.jeepa-drawer-call {
		background: #c84508;
		box-shadow: 0 12px 22px -14px rgb(255 104 26 / 90%);
		color: #fff;
	}

	.jeepa-drawer-call:hover {
		background: #a93a06;
		color: #fff;
	}

	.jeepa-drawer-whatsapp {
		background: #fff;
		color: #0b4724;
	}

	.jeepa-drawer-whatsapp svg {
		color: #1a9e4b;
		fill: currentColor;
	}

	.jeepa-drawer-whatsapp:hover {
		background: #e9fbef;
		color: #0b4724;
	}

	.jeepa-drawer-action:hover {
		transform: translateY(-2px);
	}

	.jeepa-drawer-action:focus-visible {
		outline: 3px solid #fff;
		outline-offset: 3px;
	}

	.jeepa-drawer-ridge {
		height: 92px;
		margin: -26px -14px 0;
		border-radius: 0 0 26px 0;
		background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 110' preserveAspectRatio='none'%3E%3Cpath d='M0 70L40 52L75 62L120 30L150 48L185 22L215 44L255 34L300 58L340 40L400 60V110H0Z' fill='%2379c894' fill-opacity='.5'/%3E%3Cpath d='M120 30L110 37L116 36L120 40L125 36L130 38Z M185 22L175 30L181 29L186 33L191 29L196 31Z M255 34L247 40L252 39L256 42L260 39L264 41Z M340 40L333 45L338 44L341 47L345 44L349 46Z' fill='%23ffffff' fill-opacity='.85'/%3E%3Cpath d='M0 85L50 66L95 80L145 58L200 78L250 62L310 82L360 64L400 76V110H0Z' fill='%23196e3d'/%3E%3Cpath d='M0 98L60 84L120 96L190 80L260 97L330 86L400 98V110H0Z' fill='%23125a32'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
		pointer-events: none;
	}
}

@media (max-width: 1100px) and (prefers-reduced-motion: reduce) {
	.jeepa-primary-nav .jeepa-menu-list > li,
	.jeepa-drawer-card {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
