/*
 * Header button dropdown ("Make an enquiry"). Turned on per menu item with the "has-dropdown" CSS class
 * in Appearance → Menus. Hand-written (no SCSS source). See functions/enquiry-dropdown.php.
 *
 * Looks like the main nav menus (does not change them):
 *  - desktop: small white box under the button (no shadow/rounding), fades in, page behind blurs
 *    (body.menu-open, same as the theme), "» " links with dotted dividers;
 *  - burger menu: options open inline under the button as plain centred links, like the other sub-menus.
 * No brand colours are hard-coded: hover uses the site's primary colour (--bs-primary).
 */

/* Header button arrow: same size (0.7rem) as the main nav dropdown arrows.
   !important on the size so the theme's 1rem .btn.has-chevron arrow can never win. */
#site-header .header-button-menu .btn.has-chevron:after {
	width: .7rem !important;
	height: .7rem !important;
	margin-left: .15rem;
}

.enq-dd {
	position: relative;
	display: inline-block;
}

/* With a dropdown the arrow points down (same chevron + size as the nav arrows), drawn in the button's text colour */
#site-header .enq-dd > a.btn.enq-dd-toggle:after {
	content: '';
	display: inline-block;
	flex: 0 0 .7rem;
	width: .7rem !important;
	height: .7rem !important;
	margin-left: .25rem;
	vertical-align: initial;
	background: currentColor !important;
	-webkit-mask: url('data:image/svg+xml,%3csvg xmlns="http://www.w3.org/2000/svg" width="15.639" height="8.82" viewBox="0 0 15.639 8.82"%3e%3cpath d="M6,13.5l6.405,6.405L18.811,13.5" transform="translate%28-4.586 -12.086%29" fill="none" stroke="%23000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/%3e%3c/svg%3e') 50% / contain no-repeat;
	mask: url('data:image/svg+xml,%3csvg xmlns="http://www.w3.org/2000/svg" width="15.639" height="8.82" viewBox="0 0 15.639 8.82"%3e%3cpath d="M6,13.5l6.405,6.405L18.811,13.5" transform="translate%28-4.586 -12.086%29" fill="none" stroke="%23000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/%3e%3c/svg%3e') 50% / contain no-repeat;
	transition: transform .3s;
}
#site-header .enq-dd.open > a.btn.enq-dd-toggle:after {
	transform: rotate(180deg);
}

.enq-dd-menu {
	display: none;
}
.enq-dd-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.enq-dd-list li {
	margin: 0;
	padding: 0;
}
.enq-dd-item {
	display: block;
	text-decoration: none;
	transition: color .3s;
}

/* ---------- Small box under the button, styled like the nav menu links ----------
   TravelBound: from 576px, where the header button shows its text + arrow (below that it is an icon) */
@media (min-width: 576px) {
	#site-header .enq-dd--header > .enq-dd-menu {
		display: block;
		position: absolute;
		top: calc(100% + 8px);
		right: 0;
		z-index: 1000;
		min-width: 200px;
		padding: 8px 18px;
		background: #fff;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity .3s, visibility 0s .3s;
	}
	#site-header .enq-dd--header.open > .enq-dd-menu {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transition: opacity .3s;
	}
	/* Invisible bridge over the 8px gap so the pointer can move from the button to the options */
	#site-header .enq-dd--header > .enq-dd-menu:before {
		content: '';
		position: absolute;
		left: 0;
		right: 0;
		bottom: 100%;
		height: 8px;
	}
	/* Same as the mega menu links ("» " + dotted divider), in dark text on white */
	#site-header .enq-dd--header .enq-dd-item {
		padding: 8px 0;
		color: #000;
		font-size: .9rem;
		font-weight: 300;
		line-height: 1.5;
		white-space: nowrap;
		border-bottom: 2px dotted rgba(0, 0, 0, .15);
	}
	#site-header .enq-dd--header li:last-child .enq-dd-item {
		border-bottom: 0;
	}
	#site-header .enq-dd--header .enq-dd-item:before {
		content: '» ';
	}
	#site-header .enq-dd--header .enq-dd-item:hover,
	#site-header .enq-dd--header .enq-dd-item:focus {
		color: var(--bs-primary);
	}
}

/* ---------- Burger menu: inline under the button, like the other sub-menus ---------- */
/* Sizes to the button (not full width) so other buttons in the same row keep their space */
.menu-buttons .enq-dd {
	display: flex;
	flex-direction: column;
	align-items: center;
}
.menu-buttons .enq-dd.open > .enq-dd-menu {
	display: block;
}
.menu-buttons .enq-dd-menu {
	padding: 1rem 0 .5rem;
}
.menu-buttons .enq-dd-item {
	padding: .25rem 0;
	color: #fff;
	text-align: center;
}
.menu-buttons .enq-dd-item:hover,
.menu-buttons .enq-dd-item:focus {
	color: #000;
}
