/*
 * Defaults match the Raw Pet Food Ontario palette. The admin screen overrides these
 * variables, so edit colors, fonts, sizes and spacing there instead of here.
 */
.rpl {
	--rpl-heading: #66cc00;
	--rpl-city: #66cc00;
	--rpl-time: #90171e;
	--rpl-label: #90171e;
	--rpl-text: #333333;
	--rpl-card-bg: #ffffff;
	--rpl-list-bg: #f6f8f3;
	--rpl-list-text: #1a1a1a;
	--rpl-active: #90171e;
	--rpl-pin: #66cc00;
	--rpl-border: #e2e2e2;
	--rpl-radius: 0px;
	--rpl-route-gap: 40px;
	--rpl-list-w: 190px;
	--rpl-map-w: 40%;
	--rpl-map-h: 320px;
	--rpl-pad: 24px;
	--rpl-max: none;
	--rpl-heading-transform: uppercase;
	--rpl-next-label: "Next pickup";
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: var(--rpl-max);
	margin: 0 auto;
	color: var(--rpl-text);
	line-height: 1.4;
	font-family: var(--rpl-font, inherit);
}

.rpl *,
.rpl *::before,
.rpl *::after {
	box-sizing: border-box;
}

.rpl [hidden] {
	display: none !important;
}

/*
 * Page builder guard. Some builders shrink a widget to the width of its content when it
 * sits in a flex container. Force the widget to full width.
 */
.elementor-widget:has(> .elementor-widget-container > .rpl),
.elementor-widget-shortcode:has(.rpl),
.et_pb_code:has(.rpl),
.et_pb_module:has(> .et_pb_code_inner > .rpl) {
	width: 100% !important;
	max-width: 100% !important;
	flex-grow: 1;
}

/* Route */
.rpl .rpl__route {
	margin: 0 0 var(--rpl-route-gap);
}

.rpl .rpl__route:last-child {
	margin-bottom: 0;
}

.rpl .rpl__heading {
	margin: 0 0 16px;
	padding: 0;
	color: var(--rpl-heading);
	font-family: var(--rpl-heading-font, inherit);
	font-size: var(--rpl-fs-heading, clamp(20px, 2.4vw, 26px));
	font-weight: var(--rpl-heading-weight, 500);
	letter-spacing: var(--rpl-heading-ls, normal);
	line-height: 1.2;
	text-transform: var(--rpl-heading-transform);
}

/* Card */
.rpl .rpl__card {
	display: grid;
	grid-template-columns: var(--rpl-list-w) minmax(0, 1fr);
	overflow: hidden;
	border: 1px solid var(--rpl-border);
	border-radius: var(--rpl-radius);
	background: var(--rpl-card-bg);
}

.rpl.rpl--shadow .rpl__card {
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

/* Tab list */
.rpl .rpl__list {
	min-width: 0;
	background: var(--rpl-list-bg);
}

.rpl .rpl__tablist {
	display: block;
}

.rpl .rpl__tab {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 10px 14px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--rpl-list-text);
	font: inherit;
	font-size: var(--rpl-fs-list, 12px);
	letter-spacing: 0.2px;
	line-height: 1.3;
	text-align: left;
	text-transform: uppercase;
	cursor: pointer;
}

.rpl .rpl__tab:hover,
.rpl .rpl__tab:focus {
	background: transparent;
	color: var(--rpl-active);
}

.rpl .rpl__tab:focus-visible {
	outline: 2px solid var(--rpl-active);
	outline-offset: -2px;
}

.rpl .rpl__tab.is-active,
.rpl .rpl__tab.is-active:hover,
.rpl .rpl__tab.is-active:focus {
	background: var(--rpl-card-bg);
	color: var(--rpl-active);
}

.rpl .rpl__pin,
.rpl .rpl__arrow {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
}

.rpl .rpl__tab.is-active .rpl__pin,
.rpl .rpl__tab.is-active .rpl__arrow {
	color: var(--rpl-pin);
}

.rpl .rpl__tab--note {
	text-transform: none;
	font-size: var(--rpl-fs-list, 12px);
	line-height: 1.35;
}

.rpl .rpl__panel--note .rpl__info {
	align-self: start;
}

.rpl .rpl__note {
	font-size: var(--rpl-fs-note, 18px);
	line-height: 1.5;
}

.rpl .rpl__tab--info {
	cursor: default;
	text-transform: none;
	font-size: var(--rpl-fs-list, 12px);
	line-height: 1.35;
}

.rpl .rpl__tab--info:hover {
	color: var(--rpl-list-text);
}

/* Scroll arrows for the tab row. They only show where the row is stacked and can scroll. */
.rpl .rpl__nav {
	display: none;
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 2;
	align-items: center;
	width: 46px;
	margin: 0;
	padding: 0 8px;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	box-shadow: none;
	color: var(--rpl-active);
	cursor: pointer;
}

.rpl .rpl__nav--prev {
	left: 0;
	justify-content: flex-start;
	background-image: linear-gradient(to right, var(--rpl-list-bg) 45%, transparent);
}

.rpl .rpl__nav--next {
	right: 0;
	justify-content: flex-end;
	background-image: linear-gradient(to left, var(--rpl-list-bg) 45%, transparent);
}

.rpl .rpl__nav:hover,
.rpl .rpl__nav:focus {
	background-color: transparent;
	color: var(--rpl-label);
}

.rpl .rpl__nav svg {
	display: block;
	width: 20px;
	height: 20px;
}

.rpl .rpl__nav--prev svg {
	transform: scaleX(-1);
}

@keyframes rpl-nudge {
	0%, 100% { transform: translateX(0); }
	50% { transform: translateX(5px); }
}

.rpl .rpl__nav--next svg {
	animation: rpl-nudge 1.2s ease-in-out 3;
}

@media (prefers-reduced-motion: reduce) {
	.rpl .rpl__nav svg { animation: none; }
}

/* Panel */
.rpl .rpl__panels {
	min-width: 0;
}

.rpl .rpl__panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, var(--rpl-map-w));
	min-width: 0;
	height: 100%;
}

.rpl .rpl__panel--nomap {
	grid-template-columns: minmax(0, 1fr);
}

.rpl .rpl__info {
	align-self: center;
	min-width: 0;
	padding: var(--rpl-pad);
}

.rpl .rpl__city {
	margin: 0 0 2px;
	padding: 0;
	color: var(--rpl-city);
	font-family: var(--rpl-heading-font, inherit);
	font-size: var(--rpl-fs-city, clamp(26px, 3vw, 34px));
	font-weight: var(--rpl-heading-weight, 500);
	letter-spacing: var(--rpl-heading-ls, normal);
	line-height: 1.1;
	text-transform: var(--rpl-heading-transform);
}

.rpl .rpl__time {
	color: var(--rpl-time);
	font-family: var(--rpl-heading-font, inherit);
	font-size: var(--rpl-fs-time, clamp(18px, 2vw, 22px));
	font-weight: 700;
	line-height: 1.2;
}

.rpl .rpl__spot {
	margin-top: 14px;
	font-size: var(--rpl-fs-spot, 14px);
}

.rpl .rpl__extra {
	margin-top: 6px;
	font-size: var(--rpl-fs-spot, 14px);
}

.rpl .rpl__cols {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: 16px 24px;
	margin-top: 26px;
}

.rpl .rpl__col--address[hidden] + .rpl__col--dates,
.rpl .rpl__col--dates:only-child {
	grid-column: 1 / -1;
}

.rpl .rpl__label {
	margin-bottom: 6px;
	color: var(--rpl-label);
	font-family: var(--rpl-heading-font, inherit);
	font-size: var(--rpl-fs-label, 17px);
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.rpl .rpl__text,
.rpl .rpl__dates {
	font-size: var(--rpl-fs-text, 14px);
}

.rpl .rpl__nodates {
	margin: 0;
}

.rpl .rpl__dates {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rpl .rpl__dates li {
	margin: 0;
	padding: 0;
	line-height: 1.6;
	list-style: none;
}

.rpl .rpl__datenote {
	display: block;
	font-size: 0.9em;
	font-weight: 400;
	line-height: 1.4;
	opacity: 0.85;
}

.rpl .rpl__dates li.is-later {
	display: none;
}

.rpl .rpl__col--dates.is-expanded .rpl__dates li.is-later {
	display: list-item;
}

.rpl .rpl__more {
	display: inline-block;
	margin: 8px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--rpl-active);
	font: inherit;
	font-size: var(--rpl-fs-text, 14px);
	font-weight: 700;
	letter-spacing: 0;
	text-decoration: underline;
	text-transform: none;
	cursor: pointer;
}

.rpl .rpl__more:hover,
.rpl .rpl__more:focus {
	background: transparent;
	color: var(--rpl-label);
}

.rpl .rpl__dates li.is-past {
	opacity: 0.45;
}

.rpl .rpl__dates li.is-next {
	font-weight: 700;
}

.rpl.rpl--next .rpl__dates li.is-next::before {
	content: var(--rpl-next-label);
	display: block;
	width: max-content;
	max-width: 100%;
	margin: 6px 0 2px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--rpl-pin);
	color: #1a1a1a;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
	text-transform: uppercase;
}

.rpl.rpl--next .rpl__dates li.is-next:not(:last-child) {
	margin-bottom: 4px;
}

/* Map */
.rpl .rpl__map {
	position: relative;
	min-width: 0;
	min-height: var(--rpl-map-h);
	background: #eef0ea;
}

.rpl .rpl__map iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* One stop, no tab list */
.rpl.rpl--single .rpl__card {
	grid-template-columns: minmax(0, 1fr);
}

.rpl.rpl--single .rpl__list {
	display: none;
}

/* Phones: smaller type unless the admin sets a mobile size. */
@media (max-width: 600px) {
	.rpl .rpl__heading { font-size: var(--rpl-fs-heading-m, var(--rpl-fs-heading, clamp(18px, 5vw, 22px))); }
	.rpl .rpl__city { font-size: var(--rpl-fs-city-m, var(--rpl-fs-city, clamp(24px, 7vw, 30px))); }
	.rpl .rpl__time { font-size: var(--rpl-fs-time-m, var(--rpl-fs-time, 18px)); }
	.rpl .rpl__spot,
	.rpl .rpl__extra { font-size: var(--rpl-fs-spot-m, var(--rpl-fs-spot, 14px)); }
	.rpl .rpl__label { font-size: var(--rpl-fs-label-m, var(--rpl-fs-label, 16px)); }
	.rpl .rpl__note { font-size: var(--rpl-fs-note-m, var(--rpl-fs-note, 16px)); }
	.rpl .rpl__text,
	.rpl .rpl__more,
	.rpl .rpl__dates { font-size: var(--rpl-fs-text-m, var(--rpl-fs-text, 14px)); }
	.rpl .rpl__tab { font-size: var(--rpl-fs-list-m, var(--rpl-fs-list, 12px)); }
	.rpl .rpl__cols { grid-template-columns: minmax(0, 1fr); }
}
