/*
 * KA Venue Maps 1.0.0
 * Every rule is scoped to .ka-venue-map / .ka-venue-map-notice: no other iframe or theme element is affected.
 *
 * Border colour: Noisa has no colour variables and its event pages can be light or dark, so the border follows
 * the surrounding text colour. To fix a colour, set --ka-venue-map-border-color on any ancestor (or on :root).
 */

.ka-venue-map {
	box-sizing: border-box; /* the 2px border is inside the 450px */
	display: block;
	position: relative;
	width: 100%;
	max-width: 450px;
	aspect-ratio: 1 / 1;
	margin-left: 0;
	margin-right: 0;
	padding: 0;
	border: 2px solid var(--ka-venue-map-border-color, currentColor);
	border-radius: 8px;
	overflow: hidden;
	line-height: 0;
}

/* Two classes, so the theme's "iframe { margin-bottom }" and ".single-noisa_events iframe { width }" rules do not win. */
.ka-venue-map .ka-venue-map__frame {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 6px; /* 8px outer radius minus the 2px border */
}

/* Browsers without aspect-ratio (before 2021): the classic square box. */
@supports not (aspect-ratio: 1 / 1) {
	.ka-venue-map::before {
		content: "";
		display: block;
		padding-top: 100%;
	}

	.ka-venue-map .ka-venue-map__frame,
	.ka-venue-map .ka-venue-map__label {
		position: absolute;
		top: 0;
		left: 0;
	}
}

/* WPBakery frontend editor placeholder. */
.ka-venue-map--placeholder {
	border-style: dashed;
}

.ka-venue-map .ka-venue-map__label {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 100%;
	padding: 16px;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
}

.ka-venue-map .ka-venue-map__label strong {
	font-size: 16px;
}

/* Shown only to people who can edit the event. */
.ka-venue-map-notice {
	box-sizing: border-box;
	max-width: 450px;
	margin: 0 0 20px;
	padding: 10px 12px;
	border: 2px dashed #d63638;
	border-radius: 8px;
	background: #fff;
	color: #1d2327;
	font-size: 13px;
	line-height: 1.5;
}
