/*
 * Virtina child: booking calendar popup.
 * Shared component, no page prefix. Opened from the header profile block.
 */

:root {
	--vch-calendar-backdrop: rgba(0, 0, 0, 0.5);
	--vch-calendar-surface: #fff;
	--vch-calendar-text: #000;
	--vch-calendar-border: #e5e5e5;
	--vch-calendar-close-bg: #000;
	--vch-calendar-close-text: #fff;
	--vch-calendar-focus: #000;
}

.vch-calendar {
	/* Reset the browser's dialog defaults so the panel controls its own size. */
	box-sizing: border-box;
	width: min(960px, calc(100vw - 32px));
	height: min(760px, calc(100vh - 32px));
	max-width: none;
	max-height: none;
	padding: 0;
	border: 0;
	border-radius: 24px;
	background: var(--vch-calendar-surface);
	color: var(--vch-calendar-text);
	font-family: 'Inter', sans-serif;
	overflow: hidden;
}

.vch-calendar[open] {
	display: flex;
	flex-direction: column;
}

.vch-calendar::backdrop {
	background: var(--vch-calendar-backdrop);
}

.vch-calendar__panel {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
}

.vch-calendar__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 24px;
	border-bottom: 1px solid var(--vch-calendar-border);
}

.vch-calendar__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.54px;
}

.vch-calendar__close {
	display: inline-flex;
	flex: 0 0 40px;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--vch-calendar-close-bg);
	color: var(--vch-calendar-close-text);
	font: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.vch-calendar__close:focus-visible {
	outline: 2px solid var(--vch-calendar-focus);
	outline-offset: 3px;
}

/* The iframe is added when the popup first opens, so Calendly loads only on demand. */
.vch-calendar__frame {
	flex: 1;
	min-height: 0;
}

.vch-calendar__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 640px) {
	.vch-calendar {
		width: 100vw;
		height: 100vh;
		border-radius: 0;
	}
}
