/*
 * Showroom list (contact-1 reference): heading, an optional featured showroom (white card, address on the left,
 * map on the right 282 of 585px, 263px tall, soft shadow), then address cards two per row with 1px dividers
 * between the columns and the rows. Each card: name, then address, phone, email and hours rows with a 13px grey
 * icon 26px before the text; the opening time under the hours in 9px.
 * The original theme (the user's editor markup, no rt-* classes): core/group section > core/heading, a shadowed core/group around
 * core/columns (address card + rtthemes/map) and a grid group (Columns 2, minimum width 15rem) with the Divided block
 * style (theme block-styles/divided) holding the cards; rows are core/icon (theme icons) beside a fixed-width text.
 * These rules style the HTML reference only.
 */
:where(.rt-showroom-list) {
	color: var(--rt-color-contrast);
}

.rt-showroom-list {
	--rt-showroom-list-inset: 1.625rem;
	box-sizing: border-box;
	inline-size: min(100%, 36.5625rem);
}

.rt-showroom-list__title {
	margin: 0;
	padding: 0 var(--rt-showroom-list-inset) 2.4375rem;
	color: var(--rt-color-contrast);
	font-family: var(--rt-font-family-heading);
	font-size: var(--rt-font-size-large);
	font-weight: var(--rt-font-weight-bold);
	line-height: 2.8125rem;
}

/* Featured showroom: address card beside the map */
.rt-showroom-list__featured {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 48.2%;
	min-height: 16.4375rem;
	background-color: var(--rt-color-base);
	box-shadow: var(--rt-showroom-list-shadow);
}

.rt-showroom-list__featured > .rt-showroom-list__card {
	align-self: center;
	padding: var(--rt-showroom-list-inset);
}

.rt-showroom-list__featured > .rt-map {
	min-height: 0;
}

/* Address cards: one per row on mobile, a divider above every card but the first */
.rt-showroom-list__items {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	padding-inline: var(--rt-showroom-list-inset);
}

.rt-showroom-list__items > .rt-showroom-list__card {
	padding-block: var(--rt-spacing-50);
}

.rt-showroom-list__items > .rt-showroom-list__card:nth-child(n+2) {
	border-block-start: 1px solid var(--rt-color-line);
}

.rt-showroom-list__items > .rt-showroom-list__card:first-child {
	padding-block-start: 0;
}

.rt-showroom-list__featured + .rt-showroom-list__items > .rt-showroom-list__card:first-child {
	padding-block-start: var(--rt-spacing-50);
}

.rt-showroom-list__items > .rt-showroom-list__card:last-child {
	padding-block-end: 0;
}

/* Wider: two columns, a divider between the columns and above every row but the first */
@media (min-width: 37.5625rem) {
	.rt-showroom-list__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rt-showroom-list__items > .rt-showroom-list__card {
		padding-block: 3.75rem;
	}

	.rt-showroom-list__items > .rt-showroom-list__card:nth-child(odd) {
		padding-inline-end: var(--rt-spacing-40);
	}

	.rt-showroom-list__items > .rt-showroom-list__card:nth-child(even) {
		padding-inline-start: 4.375rem;
		border-inline-start: 1px solid var(--rt-color-line);
	}

	.rt-showroom-list__items > .rt-showroom-list__card:nth-child(2) {
		border-block-start: 0;
	}

	.rt-showroom-list__items > .rt-showroom-list__card:nth-child(-n+2) {
		padding-block-start: 0;
	}

	.rt-showroom-list__featured + .rt-showroom-list__items > .rt-showroom-list__card:nth-child(-n+2) {
		padding-block-start: 3.125rem;
	}

	/* Last row: the column divider ends just below the text */
	.rt-showroom-list__items > .rt-showroom-list__card:last-child,
	.rt-showroom-list__items > .rt-showroom-list__card:nth-child(odd):nth-last-child(2) {
		padding-block-end: var(--rt-spacing-20);
	}
}

/* Card text */
.rt-showroom-list__card > * {
	margin: 0;
	font-size: var(--rt-font-size-small);
	line-height: 1.25rem;
}

.rt-showroom-list__name {
	color: var(--rt-color-contrast);
	font-family: inherit;
	font-weight: var(--rt-font-weight-medium);
}

.rt-showroom-list__address,
.rt-showroom-list__phone,
.rt-showroom-list__email,
.rt-showroom-list__hours,
.rt-showroom-list__time {
	position: relative;
	max-width: 11.75rem;
	padding-inline-start: var(--rt-showroom-list-inset);
}

.rt-showroom-list__address {
	padding-block-start: 0.8125rem;
}

.rt-showroom-list__phone,
.rt-showroom-list__email,
.rt-showroom-list__hours {
	padding-block-start: 0.6875rem;
}

.rt-showroom-list__card .rt-showroom-list__time {
	padding-block-start: 0.125rem;
	font-size: 0.5625rem; /* preset-exempt: opening-hours note (9) */
	line-height: 0.75rem;
}

.rt-showroom-list__phone a,
.rt-showroom-list__email a {
	color: inherit;
	text-decoration: none;
}

.rt-showroom-list__phone a:hover,
.rt-showroom-list__email a:hover {
	color: var(--rt-color-accent);
}

/* Row icons: 13px, grey, at the start of the first line */
.rt-showroom-list__address::before,
.rt-showroom-list__phone::before,
.rt-showroom-list__email::before,
.rt-showroom-list__hours::before {
	content: "";
	position: absolute;
	left: 0;
	width: 0.8125rem;
	height: 0.8125rem;
	background-color: var(--rt-color-muted);
	-webkit-mask: var(--rt-showroom-list-icon) 50% 50% / contain no-repeat;
	mask: var(--rt-showroom-list-icon) 50% 50% / contain no-repeat;
	translate: 0 0.1875rem;
}

.rt-showroom-list__address::before {
	top: 0.8125rem;
	--rt-showroom-list-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E");
}

.rt-showroom-list__phone::before {
	top: 0.6875rem;
	--rt-showroom-list-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25c1.1.37 2.3.57 3.6.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E");
}

.rt-showroom-list__email::before {
	top: 0.6875rem;
	--rt-showroom-list-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm1 2.4V17h16V7.4l-8 5.3-8-5.3zM5.2 7l6.8 4.5L18.8 7H5.2z'/%3E%3C/svg%3E");
}

.rt-showroom-list__hours::before {
	top: 0.6875rem;
	--rt-showroom-list-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7z'/%3E%3C/svg%3E");
}

/* Mobile: the map under the address */
@media (max-width: 37.5rem) {
	.rt-showroom-list__featured {
		grid-template-columns: minmax(0, 1fr);
	}

	.rt-showroom-list__featured > .rt-map {
		min-height: 15rem;
	}
}
