/* D-EDGE booking calendar modal (inc/dedge-booking.php). Visual language of .booking */

.dedge {
	position: fixed;
	inset: 0;
	z-index: 210;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear 0.4s;
}

.dedge.is-open {
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}

.dedge-overlay {
	position: absolute;
	inset: 0;
	background: rgba(24, 23, 22, 0.5);
	opacity: 0;
	transition: opacity 0.4s ease;
}

.dedge.is-open .dedge-overlay {
	opacity: 1;
}

.dedge-dialog {
	position: relative;
	width: 100%;
	max-width: 1040px;
	max-height: 100%;
	display: flex;
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.dedge.is-open .dedge-dialog {
	opacity: 1;
	transform: translateY(0);
}

.dedge-inner {
	position: relative;
	width: 100%;
	min-height: 420px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	padding: 56px 48px 32px;
	background: #e9e5e3;
	border-radius: 12px;
	color: #181716;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.dedge-close {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 2;
	display: flex;
	width: 28px;
	height: 28px;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	transition: opacity 0.3s ease;
}

.dedge-close:hover {
	opacity: 0.7;
}

.dedge-close svg {
	display: block;
	width: 100%;
	height: 100%;
}

.dedge-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.dedge-loader.is-hidden {
	opacity: 0;
	visibility: hidden;
}

.dedge-loader::before {
	content: "";
	width: 40px;
	height: 40px;
	border: 2px solid rgba(24, 23, 22, 0.15);
	border-top-color: #181716;
	border-radius: 50%;
	animation: dedge-spin 0.8s linear infinite;
}

.dedge-loader .form-loader-spinner {
	display: none;
}

@keyframes dedge-spin {
	to {
		transform: rotate(360deg);
	}
}

.dedge .fb-widget {
	position: relative;
	min-height: 360px;
}

.dedge-note {
	margin-top: 24px;
	font-size: 16px;
	line-height: 1.4;
	text-align: center;
}

.dedge-note a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dedge-error {
	padding: 80px 0;
	text-align: center;
	font-size: 18px;
	line-height: 1.4;
}

@media (max-width: 767px) {
	.dedge {
		padding: 0;
	}

	.dedge-inner {
		max-height: 100vh;
		max-height: 100dvh;
		height: 100vh;
		height: 100dvh;
		padding: 56px 12px 32px;
		border-radius: 0;
	}

	.dedge-close {
		top: 16px;
		right: 16px;
	}
}

/* Widget typography in the site fonts (D-EDGE ships Open Sans / serif title). Class selectors only - data-v hashes change between releases. */
#dedge-booking .fbw-calendar--container,
#dedge-booking .fbw-calendar--container input,
#dedge-booking .fbw-calendar--container select,
#dedge-booking .fbw-calendar--container button {
	font-family: "Bricolage Grotesque", sans-serif;
}

#dedge-booking .fbw-calendar--title,
#dedge-booking .fbw-calendar--title h1 {
	font-family: "Bricolage Grotesque", sans-serif;
	font-weight: 300;
	letter-spacing: -0.04em;
}

#dedge-booking .fbw-calendar--action .next .next--button {
	font-family: "Special Gothic", sans-serif;
	letter-spacing: 0.02em;
}

@media (max-width: 767px) {
	.dedge-inner {
		padding-left: 4px;
		padding-right: 4px;
	}

	/* "IDR 2,160,000" must fit a 1/7 column on a 360-390px screen */
	#dedge-booking .day--price {
		font-size: 9px;
		letter-spacing: -0.03em;
	}
}
