/**
 * FooEvents seating dialog overrides
 *
 * Theme header is position:fixed; z-index:9999 (mobile nav 99999).
 * FooEvents sets .ui-dialog to z-index:1000, so the dialog titlebar
 * (and close button) sit under the sticky header and cannot be clicked.
 */

.ui-widget-overlay {
	z-index: 100000 !important;
}

.ui-dialog,
.ui-front.ui-dialog,
.ui-dialog[aria-describedby="fooevents_seating_dialog"] {
	z-index: 100001 !important;
}

/* Keep the dialog clear of the fixed header */
.ui-dialog[aria-describedby="fooevents_seating_dialog"] {
	top: max(160px, 12vh) !important;
	max-height: calc(100vh - 180px);
	overflow: hidden;
}

.ui-dialog[aria-describedby="fooevents_seating_dialog"] #fooevents_seating_dialog {
	max-height: calc(100vh - 260px);
	overflow: auto;
}

/* Anchor close button to the titlebar top-right (not the dialog middle) */
.ui-dialog[aria-describedby="fooevents_seating_dialog"] .ui-dialog-titlebar {
	position: relative;
	padding-right: 44px;
}

.ui-dialog[aria-describedby="fooevents_seating_dialog"] .ui-dialog-titlebar-close {
	position: absolute;
	top: 0;
	right: 0;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none !important;
	color: transparent !important;
	cursor: pointer;
	z-index: 2;
}

.ui-dialog[aria-describedby="fooevents_seating_dialog"] .ui-dialog-titlebar-close::before {
	content: "×";
	display: block;
	width: 36px;
	height: 36px;
	line-height: 36px;
	text-align: center;
	font-size: 24px;
	font-weight: 400;
	color: #333 !important;
	margin: 0;
}

.ui-dialog[aria-describedby="fooevents_seating_dialog"] .ui-dialog-titlebar-close:hover,
.ui-dialog[aria-describedby="fooevents_seating_dialog"] .ui-dialog-titlebar-close:focus {
	background: #f0f0f0 !important;
	outline: none;
}

.ui-dialog[aria-describedby="fooevents_seating_dialog"] .ui-dialog-titlebar-close:hover::before,
.ui-dialog[aria-describedby="fooevents_seating_dialog"] .ui-dialog-titlebar-close:focus::before {
	color: #091412 !important;
}

@media screen and (max-width: 768px) {
	.ui-dialog[aria-describedby="fooevents_seating_dialog"] {
		top: max(120px, 10vh) !important;
		max-height: calc(100vh - 140px);
		width: 94% !important;
		max-width: 94% !important;
	}

	.ui-dialog[aria-describedby="fooevents_seating_dialog"] #fooevents_seating_dialog {
		max-height: calc(100vh - 220px);
	}
}
