/**
 * Location post type — tpc/location-map and tpc/location-links.
 */

/* Map ------------------------------------------------------------------ */

.tpc-location-map {
	--tpc-location-map-height: 420px;

	position: relative;
	overflow: hidden;
	border-radius: var(--wp--custom--border--radius, 8px);
}

.tpc-location-map iframe {
	display: block;
	width: 100%;
	height: var(--tpc-location-map-height);
	border: 0;
}

.tpc-location-map__link {
	display: inline-block;
	margin-top: 0.75em;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

/* Contact list --------------------------------------------------------- */

.tpc-location-info {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tpc-location-info__item {
	display: flex;
	align-items: flex-start;
	gap: 0.75em;
	padding: 5px 0;
	line-height: 1.3em;
	letter-spacing: 1px;
}

.tpc-location-info__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin-top: 0.1em;
}

.tpc-location-info__icon img {
	width: 22px;
	height: 22px;
	object-fit: contain;
}

.tpc-location-info__text a {
	text-decoration: none;
}

.tpc-location-info__text a:hover,
.tpc-location-info__text a:focus {
	color: #008556;
	text-decoration: underline;
}

.tpc-location-info__item--coordinates {
	opacity: 0.75;
	font-size: 0.875em;
	letter-spacing: normal;
}

.tpc-location-info--no-icons .tpc-location-info__item {
	gap: 0;
}

/* Contact rows built from core Row blocks ------------------------------ */

.tpc-location-row {
	align-items: flex-start;
}

.tpc-location-row .tpc-icon,
.tpc-location-row .tpc-icon img {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	margin: 0;
	object-fit: contain;
}

.tpc-location-row p {
	margin: 0;
	line-height: 1.3em;
}

/* A bound core/button that has to read as plain text, because core/button is
   the only core block whose URL can be bound (tel:, directions). */
.tpc-plain-button .wp-block-button__link {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	text-decoration: none;
}

.tpc-plain-button .wp-block-button__link:hover,
.tpc-plain-button .wp-block-button__link:focus {
	color: #008556;
	background: none;
	text-decoration: underline;
}

/* Links ---------------------------------------------------------------- */

.tpc-location-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--style--block-gap, 0.75rem);
	align-items: center;
}

.tpc-location-links__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.6em 1.4em;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: opacity 0.15s ease-in-out;
}

.tpc-location-links__item:hover,
.tpc-location-links__item:focus {
	opacity: 0.8;
	text-decoration: none;
}

.tpc-location-links__item--gofood {
	border-color: transparent;
	background-color: #00aa13;
	color: #fff;
}

.tpc-location-links__item--grabfood {
	border-color: transparent;
	background-color: #00b14f;
	color: #fff;
}

.tpc-location-links__item--phone,
.tpc-location-links__item--directions {
	color: var(--wp--preset--color--primary, currentColor);
}

/* Address / detail lines used by the block templates ------------------- */

.tpc-location-address {
	white-space: pre-line; /* Keeps the line breaks typed into the field. */
}

@media (max-width: 600px) {
	.tpc-location-links__item {
		flex: 1 1 45%;
	}
}
