/* Franchise Core: location status, hours, maps and finder. Colors come from the child theme tokens, with fallbacks. */

.fc-finder [hidden] { display: none !important; }

.fc-hours .screen-reader-text,
.fc-card .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fc-status {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.25em 0.7em;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	background: #f1e7e1;
	color: #5c3420;
}

.fc-status::before {
	content: "";
	width: 0.5em;
	height: 0.5em;
	border-radius: 50%;
	background: currentColor;
}

.fc-status--open { background: #e2f1e6; color: #1d5a32; }
.fc-status--closing-soon { background: #fdefcc; color: #6e4300; }
.fc-status--closed,
.fc-status--temporarily-closed { background: #f1e7e1; color: #5c3420; }
.fc-status--coming-soon { background: var(--bk-butter, #f2c14e); color: var(--bk-cocoa, #2b1a12); }

/*
 * Hours table. The doubled class outranks Hello Elementor's reset.css table rules
 * (zebra stripes and hover backgrounds), which use element + pseudo-class selectors.
 */
.fc-hours {
	width: 100%;
	max-width: 420px;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.fc-hours.fc-hours th,
.fc-hours.fc-hours td {
	padding: 0.55em 0.75em;
	border: 0;
	border-bottom: 1px solid rgba(43, 26, 18, 0.12);
	text-align: left;
	background: transparent;
}

.fc-hours.fc-hours th { font-weight: 500; }
.fc-hours.fc-hours td { text-align: right; }

.fc-hours.fc-hours tr.is-today th,
.fc-hours.fc-hours tr.is-today td {
	font-weight: 700;
	background: rgba(242, 193, 78, 0.25);
}

.fc-hours tr.is-today th::after {
	content: " · Today";
	font-weight: 500;
	color: var(--bk-crust, #8b4a2b);
}

/* Maps */
.fc-map {
	width: 100%;
	min-height: 320px;
	border-radius: 16px;
	overflow: hidden;
	background: #efe6da;
	z-index: 0;
}

.fc-marker__pin {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 50% 50% 50% 0;
	background: var(--bk-crust, #8b4a2b);
	border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	transform: rotate(-45deg);
}

.fc-marker--soon .fc-marker__pin { background: var(--bk-butter, #f2c14e); }

.fc-origin {
	fill: #2563eb;
	fill-opacity: 0.9;
	stroke: #fff;
	stroke-width: 3;
}

.fc-popup { display: grid; gap: 0.4rem; min-width: 200px; }
.fc-popup__title { font-weight: 700; color: var(--bk-cocoa, #2b1a12); }
.fc-popup__address { margin: 0; }
.fc-popup .fc-status { justify-self: start; }

/* Finder */
.fc-finder { display: grid; gap: 1rem; }

.fc-finder__controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
}

.fc-finder__field { display: grid; gap: 0.3rem; flex: 1 1 200px; }
.fc-finder__field label { font-size: 0.875rem; font-weight: 600; }

.fc-finder__field input,
.fc-finder__field select {
	width: 100%;
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	border: 1px solid rgba(43, 26, 18, 0.3);
	border-radius: 10px;
	background: #fff;
	font: inherit;
}

/* Two-class selectors so these win over Hello Elementor's [type=button] and button:hover reset styles. */
.fc-finder .fc-finder__near {
	min-height: 44px;
	padding: 0.5rem 1.1rem;
	border: 0;
	border-radius: 10px;
	background: var(--bk-crust, #8b4a2b);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.fc-finder .fc-finder__near:hover,
.fc-finder .fc-finder__near:focus { background: #723b21; color: #fff; }
.fc-finder .fc-finder__near:disabled { opacity: 0.7; cursor: progress; }

.fc-finder__count,
.fc-finder__message,
.fc-finder__empty { margin: 0; }
.fc-finder__count { font-size: 0.875rem; color: rgba(43, 26, 18, 0.75); }
.fc-finder__message { padding: 0.6rem 0.9rem; border-radius: 10px; background: #fdefcc; }

.fc-finder__layout { display: grid; gap: 1rem; }

.fc-finder__list {
	display: grid;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fc-card {
	display: grid;
	gap: 0.5rem;
	justify-items: start;
	padding: 1rem 1.1rem;
	border: 1px solid rgba(43, 26, 18, 0.12);
	border-radius: 14px;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.fc-card.is-active {
	border-color: var(--bk-crust, #8b4a2b);
	box-shadow: 0 0 0 2px rgba(139, 74, 43, 0.2);
}

.fc-card__title { margin: 0; font-size: 1.125rem; }
.fc-card__title a { color: inherit; text-decoration: none; }
.fc-card__title a:hover { text-decoration: underline; }
.fc-card__address,
.fc-card__distance { margin: 0; font-size: 0.9375rem; }
.fc-card__distance { font-weight: 600; color: var(--bk-crust, #8b4a2b); }

.fc-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.fc-card .fc-card__show,
.fc-card .fc-card__show:hover,
.fc-card .fc-card__show:focus {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--bk-crust, #8b4a2b);
	font: inherit;
	text-decoration: underline;
	white-space: normal;
	cursor: pointer;
}

.fc-finder .fc-map { min-height: 340px; order: -1; }

@media (min-width: 900px) {
	.fc-finder__layout { grid-template-columns: minmax(320px, 400px) 1fr; align-items: start; }
	.fc-finder__list { max-height: 640px; overflow-y: auto; padding-right: 0.25rem; }
	.fc-finder .fc-map { order: 0; min-height: 640px; position: sticky; top: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
	.fc-card { transition: none; }
}

/* [location_regions] */
.fc-regions {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fc-regions a {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 1rem 1.1rem;
	border: 1px solid rgba(43, 26, 18, 0.12);
	border-radius: 14px;
	background: #fff;
	color: var(--bk-cocoa, #2b1a12);
	text-decoration: none;
	transition: border-color 0.2s;
}

.fc-regions a:hover { border-color: var(--bk-crust, #8b4a2b); }
.fc-regions__name { font-family: var(--bk-font-heading, serif); font-size: 1.125rem; font-weight: 600; }
.fc-regions__count { font-size: 0.875rem; color: rgba(43, 26, 18, 0.75); }

/* Inside an Elementor flex container, the widget wrapper's height is measured
   as if the auto-fill grid had a single column, leaving a large empty gap.
   An explicit width makes the measurement use the real column count. */
.elementor-widget:has(.fc-regions, .fc-directory) { width: 100%; }

/* [location_directory] */
.fc-directory {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 1.5rem 2rem;
}

.fc-directory__group h2,
.fc-directory__group h3,
.fc-directory__group h4 { margin: 0 0 0.5rem; font-size: 1.125rem; }

.fc-directory ul { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }

.fc-directory li {
	display: grid;
	gap: 0.3rem;
	justify-items: start;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid rgba(43, 26, 18, 0.1);
}

.fc-directory li > a:first-child { font-weight: 600; color: var(--bk-cocoa, #2b1a12); }
.fc-directory__phone { font-size: 0.875rem; }

@media (prefers-reduced-motion: reduce) {
	.fc-regions a { transition: none; }
}

/* Finder card thumbnail: image in a left column, card content stacked on the right. */
.fc-card.has-image { grid-template-columns: 88px 1fr; column-gap: 1rem; }
.fc-card.has-image > *:not(.fc-card__image) { grid-column: 2; }
.fc-card__image {
	grid-column: 1;
	grid-row: 1 / span 5;
	width: 88px;
	height: 88px;
	object-fit: cover;
	border-radius: 12px;
}
