/* Travel Times module — baseline layout + style.
   Decorative defaults are wrapped in :where() so per-item Divi controls
   (background, border, padding) always override them. */

.mw-travel-times {
	list-style: none;
	margin: 0;
	padding: 0;
	--mw-tt-gap: 16px;
	--mw-tt-cols: 2;
}

/* Reset theme list styling (Divi content rules target the <ul>/<li> directly,
   out-specifying the plain-class rules above). The left padding is what pushes
   the centred text off-axis from the heading + icon, so it must go. */
.mw-travel-times__section .mw-travel-times {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}
.mw-travel-times__section .mw-travel-times > .mw-travel-times__item {
	list-style: none !important;
}
.mw-travel-times__section .mw-travel-times > .mw-travel-times__item::marker {
	content: "";
}

.mw-travel-times__item {
	margin: 0;
}

/* ---------- Stacked (default) ---------- */
.mw-travel-times--stacked {
	display: flex;
	flex-direction: column;
	gap: var(--mw-tt-gap);
}
.mw-travel-times--stacked.mw-travel-times--sep .mw-travel-times__item:not(:last-child) {
	padding-bottom: var(--mw-tt-gap);
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

/* ---------- Grid ---------- */
.mw-travel-times--grid {
	display: grid;
	gap: var(--mw-tt-gap);
	grid-template-columns: repeat(var(--mw-tt-cols), minmax(0, 1fr));
}

/* ---------- Cards ---------- */
.mw-travel-times--cards {
	display: grid;
	gap: var(--mw-tt-gap);
	grid-template-columns: repeat(var(--mw-tt-cols), minmax(0, 1fr));
}
.mw-travel-times--cards :where(.mw-travel-times__item) {
	background: rgba(0, 0, 0, 0.03);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 10px;
	padding: 1rem 1.25rem;
}

/* Cards + grid collapse responsively */
@media (max-width: 980px) {
	.mw-travel-times--grid,
	.mw-travel-times--cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 600px) {
	.mw-travel-times--grid,
	.mw-travel-times--cards {
		grid-template-columns: 1fr;
	}
}

/* ---------- Inline chips ---------- */
.mw-travel-times--chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mw-tt-gap);
}
.mw-travel-times--chips :where(.mw-travel-times__item) {
	background: rgba(0, 0, 0, 0.05);
	border-radius: 999px;
	padding: 0.4em 0.95em;
}

/* ---------- Time pill ---------- */
.mw-travel-times--pill .mw-travel-times__time {
	display: inline-block;
	background: var(--mw-tt-pill-bg, rgba(0, 0, 0, 0.08));
	padding: 0.15em 0.6em;
	border-radius: 999px;
	line-height: 1.4;
	white-space: nowrap;
}

/* ---------- Travel icons (masked, inherit text colour unless overridden) ---------- */
/* Top icon: a single centred icon above the heading. */
.mw-travel-times__icon {
	display: block;
	width: var(--mw-tt-icon-size, 24px);
	height: var(--mw-tt-icon-size, 24px);
	margin: 0 auto 10px;
	background-color: var(--mw-tt-icon-color, currentColor);
	-webkit-mask: var(--mw-tt-icon) no-repeat center / contain;
	mask: var(--mw-tt-icon) no-repeat center / contain;
}
/* Per-item icon: a small inline marker before each line. */
.mw-travel-times--icon .mw-travel-times__item::before {
	content: "";
	display: inline-block;
	width: 1.05em;
	height: 1.05em;
	margin-right: 0.45em;
	vertical-align: -0.15em;
	background-color: var(--mw-tt-icon-color, currentColor);
	-webkit-mask: var(--mw-tt-icon) no-repeat center / contain;
	mask: var(--mw-tt-icon) no-repeat center / contain;
}
.mw-travel-times--mode-driving {
	--mw-tt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z'/%3E%3C/svg%3E");
}
.mw-travel-times--mode-walking {
	--mw-tt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.8 8.9L7 23h2.1l1.8-8 2.1 2v6h2v-7.5l-2.1-2 .6-3C14.8 12 16.8 13 19 13v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1L6 8.3V13h2V9.6l1.8-.7z'/%3E%3C/svg%3E");
}
.mw-travel-times--mode-cycling {
	--mw-tt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5zm5.8-10l2.4-2.4.8.8c1.3 1.3 3 2.1 5.1 2.1V9c-1.5 0-2.7-.6-3.6-1.5l-1.9-1.9c-.5-.4-1-.6-1.6-.6s-1.1.2-1.4.6L7.8 8.4c-.4.4-.6.9-.6 1.4 0 .6.2 1.1.6 1.4L11 14v5h2v-6.2l-2.2-2.3zM19 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z'/%3E%3C/svg%3E");
}
.mw-travel-times--mode-transit {
	--mw-tt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 16c0 .88.39 1.67 1 2.22V20c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h8v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1.78c.61-.55 1-1.34 1-2.22V6c0-3.5-3.58-4-8-4s-8 .5-8 4v10zm3.5 1c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm9 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6H6V6h12v5z'/%3E%3C/svg%3E");
}
