/* Star rating: read-only display badge (search cards, single header, review rows) */
.cd-rating {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	font-size: 13px;
	color: #666;
}
.cd-rating-stars {
	color: #f5a623;
	letter-spacing: 1px;
}
.cd-rating-empty {
	color: #999;
	font-style: italic;
}

/* Star rating: interactive input widget on the review form */
.cd-star-input {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	border: none;
	padding: 0;
	margin: 0;
	width: fit-content;
}
.cd-star-input input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.cd-star-input label {
	font-size: 28px;
	line-height: 1;
	color: #ccc;
	cursor: pointer;
	padding: 0 2px;
}
.cd-star-input input:checked ~ label,
.cd-star-input label:hover,
.cd-star-input label:hover ~ label {
	color: #f5a623;
}

.cd-reviews {
	margin-top: 32px;
	border-top: 1px solid #e2e2e2;
	padding-top: 24px;
}
.cd-review-list {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}
.cd-review {
	padding: 16px 0;
	border-bottom: 1px solid #eee;
}
.cd-review-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}
.cd-review-header img {
	border-radius: 50%;
}
.cd-review-author {
	font-weight: 600;
	margin-right: 8px;
}
.cd-review-stars {
	color: #f5a623;
	margin-right: 8px;
}
.cd-review-date {
	color: #999;
	font-size: 12px;
}
.cd-review-pending {
	font-size: 13px;
	color: #b26a00;
	background: #fff8e6;
	padding: 6px 10px;
	border-radius: 4px;
	display: inline-block;
}

.cd-featured-badge {
	display: inline-block;
	background: var(--cd-featured-color, #f5a623);
	color: #1a1a1a;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 3px 8px;
	border-radius: 3px;
	margin-bottom: 6px;
}
/* A featured card has no border of its own (Phase 85): its Featured badge is the only sign. */

.cd-package-picker {
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 12px;
	margin-bottom: 16px;
}
.cd-package-option {
	display: block;
	padding: 10px;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	margin-bottom: 8px;
	cursor: pointer;
}
.cd-package-option:has(input:checked) {
	border-color: var(--cd-primary-color, #185fa5);
	background: #f0f6fc;
}
.cd-package-option .description {
	margin: 4px 0 0;
	font-size: 13px;
	color: #666;
}

.cd-checkout {
	max-width: 480px;
}
.cd-checkout-summary {
	background: #f7f7f7;
	border-radius: 6px;
	padding: 10px 14px;
	margin-bottom: 16px;
}
#cd-payment-element {
	margin-bottom: 12px;
}
.cd-checkout-error {
	color: #b32d2e;
	font-size: 13px;
	margin-bottom: 10px;
	min-height: 1em;
}
#cd-checkout-submit {
	padding: 10px 20px;
	border-radius: 4px;
	border: none;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
	cursor: pointer;
}
#cd-checkout-submit:disabled {
	opacity: 0.5;
	cursor: default;
}
#cd-checkout-success {
	background: #edfaef;
	border-radius: 6px;
	padding: 14px;
}

.cd-subscription-card {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 16px;
}
.cd-subscription-alert {
	background: #fdeded;
	color: #b32d2e;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 13px;
}
.cd-subscription-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}
.cd-subscription-actions button {
	padding: 6px 14px;
	border-radius: 4px;
	border: 1px solid #ccc;
	background: #fff;
	cursor: pointer;
}
.cd-subscription-actions .cd-cancel-subscription {
	color: #b32d2e;
	border-color: #b32d2e;
}
.cd-complete-upgrade-link {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 4px;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
	text-decoration: none;
}
.cd-subscription-payment-method {
	margin-top: 12px;
	max-width: 400px;
}
.cd-subscription-message {
	margin-top: 10px;
	font-size: 13px;
	min-height: 1em;
}

.cd-search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}
.cd-search-form input,
.cd-search-form select {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
}
.cd-search-form button {
	padding: 8px 16px;
	border-radius: 4px;
	border: 1px solid var(--cd-primary-color, #185fa5);
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
	cursor: pointer;
}
.cd-search-form button.cd-use-location {
	background: #fff;
	color: var(--cd-primary-color, #185fa5);
}
.cd-search-field {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
}
.cd-search-field label {
	white-space: nowrap;
}

.cd-listings-wrap {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: start;
}
.cd-map {
	width: 100%;
	height: 480px;
	border-radius: 8px;
	background: #eee;
}
.cd-single-map {
	height: 260px;
	margin-bottom: 16px;
}

.cd-listings-wrap.cd-listings-no-map {
	display: block;
}
/* On the directory archive pages the listings come first and the map second (Phase 80): the map on the
   right on a wide screen, under the listings on a narrow one. Embedded listings blocks keep their own order. */
.cd-archive .cd-listings-wrap > .cd-map {
	order: 2;
}
.cd-listings-main {
	min-width: 0;
}

/* Results bar (Phase 45): count, sort dropdown and layout buttons above the listings. */
.cd-results-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-bottom: 12px;
}
.cd-results-count {
	margin: 0;
	font-size: 14px;
	color: #555;
}
.cd-results-sort {
	margin: 0;
}
.cd-results-sort label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
}
.cd-results-bar .cd-view-toggle {
	margin: 0 0 0 auto;
}
.cd-pagination-top {
	margin-bottom: 12px;
}
.cd-view-all {
	margin: 12px 0 0;
	text-align: right;
}

.cd-view-toggle {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}
.cd-view-toggle-btn {
	padding: 6px 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
}
.cd-view-toggle-btn.active {
	/* Was a one-off #1a73e8 (Google blue), inconsistent with every other primary-action color in
	   this file (#185fa5) — consolidated onto the same var(--cd-primary-color) so both this and
	   the CSV/submit-button/link blues genuinely move together as one brand color. */
	background: var(--cd-primary-color, #185fa5);
	border-color: var(--cd-primary-color, #185fa5);
	color: #fff;
}

.cd-listing-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}
/* [cd_featured_spotlight] reuses .cd-listing-grid for the actual card layout (same cards, same
   grid) — this wrapper only adds the section's own top/bottom breathing room, so it drops in
   cleanly between other page content without needing its own card styling. */
/* List view — same markup/data, just a single column with a horizontal card layout instead of
   the grid's stacked-card look. No backend/query change; see city-directory-map.js's
   bindViewToggle() for the class-swap this responds to. */
.cd-listing-grid.cd-view-list {
	display: block;
}
.cd-listing-grid.cd-view-list .cd-listing-card {
	display: flex;
	margin-bottom: 12px;
}
.cd-listing-grid.cd-view-list .cd-listing-card img {
	width: 140px;
	height: 100px;
	flex-shrink: 0;
}

/* Chosen layouts (Phase 45). Columns come from the block/shortcode as --cd-cols, dropping to
   --cd-cols-tablet and --cd-cols-mobile on smaller screens. */
.cd-listing-grid {
	column-gap: var(--cd-gap, 16px);
	row-gap: var(--cd-row-gap, var(--cd-gap, 16px));
}
.cd-listing-grid.cd-layout-grid {
	grid-template-columns: repeat(var(--cd-cols, 3), minmax(0, 1fr));
}
@media (max-width: 900px) {
	.cd-listing-grid.cd-layout-grid {
		grid-template-columns: repeat(var(--cd-cols-tablet, 2), minmax(0, 1fr));
	}
}
@media (max-width: 600px) {
	.cd-listing-grid.cd-layout-grid {
		grid-template-columns: repeat(var(--cd-cols-mobile, 1), minmax(0, 1fr));
	}
}
.cd-listing-grid.cd-view-list .cd-listing-card {
	margin-bottom: var(--cd-row-gap, var(--cd-gap, 12px));
}

/* Card options */
.cd-listing-grid.cd-ratio-1-1 .cd-listing-card img { height: auto; aspect-ratio: 1 / 1; }
.cd-listing-grid.cd-ratio-4-3 .cd-listing-card img { height: auto; aspect-ratio: 4 / 3; }
.cd-listing-grid.cd-ratio-3-2 .cd-listing-card img { height: auto; aspect-ratio: 3 / 2; }
.cd-listing-grid.cd-ratio-16-9 .cd-listing-card img { height: auto; aspect-ratio: 16 / 9; }
.cd-listing-grid.cd-view-list[class*="cd-ratio-"] .cd-listing-card img { width: 140px; height: auto; }
.cd-listing-grid.cd-cards-borderless .cd-listing-card { border-color: transparent; }
.cd-listing-grid.cd-cards-shadow-small .cd-listing-card { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.cd-listing-grid.cd-cards-shadow-medium .cd-listing-card { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14); }
.cd-listing-grid.cd-cards-shadow-large .cd-listing-card { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); }
.cd-listing-excerpt {
	margin: 6px 0 0;
	font-size: 13px;
	color: #444;
}
.cd-listing-read-more {
	display: inline-block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--cd-primary-color, #185fa5);
}

/* Carousel: a horizontally scrolling row that snaps to each card. city-directory-listings.js
   adds the arrows, dots and autoplay; without it the row still scrolls by swipe or trackpad. */
.cd-carousel {
	position: relative;
}
.cd-listing-grid.cd-layout-carousel {
	--cd-carousel-cols: var(--cd-cols, 3);
	display: grid;
	grid-auto-flow: column;
	grid-template-columns: none;
	grid-auto-columns: calc((100% - (var(--cd-carousel-cols) - 1) * var(--cd-gap, 16px)) / var(--cd-carousel-cols));
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	/* Room for a focused card's 2px outline (offset 2px), which the scrolling row would otherwise clip at the
	   top and on the first card's left side (Phase 88). The negative margin gives the width back. */
	padding: 6px;
	margin: -6px -6px -2px;
	scroll-padding-inline: 6px;
}
.cd-listing-grid.cd-layout-carousel::-webkit-scrollbar {
	display: none;
}
.cd-listing-grid.cd-layout-carousel > * {
	scroll-snap-align: start;
}
@media (max-width: 900px) {
	.cd-listing-grid.cd-layout-carousel { --cd-carousel-cols: var(--cd-cols-tablet, 2); }
}
@media (max-width: 600px) {
	.cd-listing-grid.cd-layout-carousel { --cd-carousel-cols: var(--cd-cols-mobile, 1); }
}
@media (prefers-reduced-motion: reduce) {
	.cd-listing-grid.cd-layout-carousel { scroll-behavior: auto; }
}
.cd-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid #ccc;
	background: #fff;
	color: #222;
	font-size: 0; /* the chevron is drawn below, not typed, so it is centered and the same on every font */
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	z-index: 2;
}
.cd-carousel-arrow::before {
	content: "";
	width: 10px;
	height: 10px;
	border: solid currentColor;
	border-width: 0 0 3px 3px; /* bottom and left edges, turned 45 degrees: points left */
	transform: translateX(2px) rotate(45deg);
}
.cd-carousel-next::before {
	border-width: 3px 3px 0 0; /* top and right edges: points right */
	transform: translateX(-2px) rotate(45deg);
}
.cd-carousel-arrow[disabled] {
	opacity: 0.4;
	cursor: default;
}
.cd-carousel-arrow[hidden],
.cd-carousel-dots[hidden] { display: none; }
.cd-carousel-prev { left: 6px; }
.cd-carousel-next { right: 6px; }
/* A row of cards (Phase 85): the arrows sit outside it, in side gutters, as a bare chevron with no circle.
   The photo slider on a listing page keeps its round arrows over the photo. */
.cd-carousel-has-arrows:not(.cd-gallery-slider) {
	padding-left: 44px;
	padding-right: 44px;
}
.cd-carousel:not(.cd-gallery-slider) > .cd-carousel-arrow {
	width: 40px;
	height: 56px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--cd-primary-color, #185fa5);
}
.cd-carousel:not(.cd-gallery-slider) > .cd-carousel-arrow::before {
	width: 14px;
	height: 14px;
}
.cd-carousel:not(.cd-gallery-slider) > .cd-carousel-prev { left: 0; }
.cd-carousel:not(.cd-gallery-slider) > .cd-carousel-next { right: 0; }
.cd-carousel:not(.cd-gallery-slider) > .cd-carousel-arrow:hover:not([disabled]),
.cd-carousel:not(.cd-gallery-slider) > .cd-carousel-arrow:focus-visible { opacity: 0.7; }
@media (max-width: 600px) {
	.cd-carousel-has-arrows:not(.cd-gallery-slider) { padding-left: 30px; padding-right: 30px; }
	.cd-carousel:not(.cd-gallery-slider) > .cd-carousel-arrow { width: 30px; }
}
.cd-carousel-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 10px;
}
.cd-carousel-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border-radius: 50%;
	border: 0;
	background: #ccc;
	cursor: pointer;
}
.cd-carousel-dot[aria-current="true"] {
	background: var(--cd-primary-color, #185fa5);
}
.cd-listing-card {
	position: relative;
	display: block;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}
.cd-listing-card img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	display: block;
}
.cd-listing-card-body {
	padding: 10px 12px;
}
.cd-listing-card-body h3 {
	margin: 0 0 4px;
	font-size: 15px;
}
/* The title link covers the whole card (Phase 46), so the card stays one click target while
   buttons such as "Show on map" sit above it. */
.cd-listing-card-link {
	color: inherit;
	text-decoration: none;
}
.cd-listing-card-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.cd-listing-card:focus-within {
	outline: 2px solid var(--cd-primary-color, #185fa5);
	outline-offset: 2px;
}
.cd-listing-card-link:focus {
	outline: none;
}
.cd-card-action {
	position: relative;
	z-index: 2;
	margin-top: 8px;
	padding: 4px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
	cursor: pointer;
}
.cd-card-category {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 6px 6px 0;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background: var(--cd-category-color, #6b7280);
}
.cd-card-category .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}
.cd-listing-address,
.cd-listing-distance {
	margin: 0;
	font-size: 13px;
	color: #666;
}

.cd-linked-listings {
	margin-top: 24px;
}
.cd-linked-listings-heading {
	margin-bottom: 10px;
}
.cd-linked-listings-grid {
	margin-bottom: 24px;
}

/* Linked Listings manager — the search/link/unlink UI on the front-end edit form */
.cd-listing-links-fields {
	position: relative;
	margin-top: 16px;
}
.cd-listing-links-manager {
	position: relative;
	margin-top: 10px;
	max-width: 480px;
}
.cd-linked-listing-list {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
}
.cd-linked-listing-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 8px;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	margin-bottom: 6px;
}
.cd-link-search-input {
	width: 100%;
}
.cd-link-search-results {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	max-height: 220px;
	overflow-y: auto;
	background: #fff;
	position: absolute;
	z-index: 10;
	width: 100%;
	max-width: 480px;
}
.cd-link-search-result,
.cd-link-search-empty {
	padding: 6px 10px;
}
.cd-link-search-result button {
	width: 100%;
	text-align: left;
}
.cd-link-search-show-more {
	padding: 6px 10px;
	border-top: 1px solid #e2e2e2;
	text-align: center;
}

.cd-listing-layout {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 32px;
	margin-top: 24px;
}
.cd-listing-meta p {
	margin: 4px 0;
}
.cd-hours-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 12px;
}
.cd-hours-table th,
.cd-hours-table td {
	text-align: left;
	padding: 4px 8px;
	border-bottom: 1px solid #eee;
	font-size: 13px;
}

.cd-submission-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 600px;
}
/* The add/edit listing forms use the wider label-left rows of city-directory-listing-form.css. */
.cd-submission-form.cd-listing-form {
	max-width: 1100px;
	gap: 0;
}
.cd-submission-form fieldset {
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 12px;
}
.cd-submission-form input,
.cd-submission-form select,
.cd-submission-form textarea {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	width: 100%;
}
.cd-submission-form button {
	align-self: flex-start;
	padding: 10px 20px;
	border-radius: 4px;
	border: none;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
	cursor: pointer;
}
.cd-form-message {
	padding: 10px 14px;
	background: #edfaef;
	border-radius: 4px;
	margin-bottom: 16px;
}

.cd-submission-gate {
	max-width: 480px;
	padding: 16px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #f9f9f9;
}
.cd-submission-gate h3 {
	margin-top: 0;
}
.cd-edit-listing-link {
	display: inline-block;
	font-size: 13px;
}
.cd-current-photo img {
	max-width: 120px;
	border-radius: 6px;
	display: block;
}

.cd-claim-box {
	margin-top: 20px;
	padding: 16px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #f9f9f9;
}
.cd-claim-box h3 {
	margin-top: 0;
}
.cd-claim-message {
	padding: 8px 12px;
	border-radius: 4px;
	background: #f0f0f1;
}
.cd-claim-message.cd-claim-success {
	background: #edfaef;
	color: #1a7f37;
}
.cd-claim-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.cd-claim-form input,
.cd-claim-form textarea {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
}
.cd-claim-form button {
	align-self: flex-start;
	padding: 8px 16px;
	border-radius: 4px;
	border: none;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
	cursor: pointer;
}
.cd-claim-login-hint {
	font-size: 13px;
	margin-bottom: 12px;
}

.cd-event-fields {
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 12px;
	margin-bottom: 12px;
}
.cd-event-details {
	font-weight: 600;
	color: var(--cd-primary-color, #185fa5);
}

.cd-events-calendar {
	margin-bottom: 24px;
	overflow: hidden;
	background: #fff;
	border: 2px solid var(--cd-primary-color, #185fa5);
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(30, 40, 60, 0.1);
}
/* The month bar: the primary color with white text, like the site header. */
.cd-calendar-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 12px 18px;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
}
.cd-calendar-nav a,
.cd-calendar-nav a:visited {
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.cd-calendar-nav a:hover,
.cd-calendar-nav a:focus-visible {
	text-decoration: underline;
}
.cd-calendar-title {
	margin: 0;
	color: #fff;
}
.cd-calendar-grid {
	width: 100%;
	margin: 0; /* a theme's own table margin would leave a white strip under the last row */
	border-collapse: collapse;
	table-layout: fixed;
}
/* The weekday row: a pale tint of the primary color, with the primary color's own text and rule under it. */
.cd-calendar-grid th {
	padding: 8px 6px;
	text-align: center;
	background: #e8edf4;
	background: color-mix(in srgb, var(--cd-primary-color, #185fa5) 10%, #fff);
	color: var(--cd-primary-color, #185fa5);
	border-bottom: 2px solid var(--cd-primary-color, #185fa5);
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.cd-calendar-grid td {
	border: 1px solid #cdd5e1;
	border-color: color-mix(in srgb, var(--cd-primary-color, #185fa5) 22%, #fff);
	vertical-align: top;
	height: 90px;
	padding: 4px;
	font-size: 12px;
}
.cd-calendar-grid tr > td:first-child { border-left: 0; }
.cd-calendar-grid tr > td:last-child { border-right: 0; }
.cd-calendar-grid tbody tr:last-child > td { border-bottom: 0; }
.cd-calendar-empty {
	background: #f3f5f8;
}
/* Today: a tinted cell with a navy outline inside it, and its number in a round badge. */
.cd-calendar-today {
	background: #eaf0f7;
	box-shadow: inset 0 0 0 2px var(--cd-primary-color, #185fa5);
}
.cd-calendar-day-number {
	margin-bottom: 4px;
	font-weight: 600;
	color: var(--cd-primary-color, #185fa5);
}
.cd-calendar-today .cd-calendar-day-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 4px;
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
}
.cd-calendar-event {
	display: block;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
	border-radius: 3px;
	padding: 2px 4px;
	margin-bottom: 2px;
	font-size: 11px;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cd-calendar-event:hover,
.cd-calendar-event:focus-visible {
	background: #bf0a30;
	color: #fff;
}

.cd-hours-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.cd-hours-row {
	display: grid;
	grid-template-columns: 100px 1fr;
	align-items: center;
	gap: 8px;
}
.cd-hours-row label {
	font-weight: 600;
	font-size: 13px;
}

@media (max-width: 782px) {
	.cd-listings-wrap,
	.cd-listing-layout {
		grid-template-columns: 1fr;
	}
}

/* Listing gallery (single-listing.php) + its lightbox (city-directory-gallery.js) */
.cd-listing-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0;
}
.cd-gallery-item img {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}
.cd-gallery-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	align-items: center;
	justify-content: center;
	z-index: 10000;
}
/* Only while open: a plain `display: flex` on the class above beat the `hidden` attribute and kept the
   dark overlay over the whole page (found on jchctx.org, 2026-10-15). */
.cd-gallery-lightbox:not([hidden]) {
	display: flex;
}
.cd-gallery-lightbox-image {
	max-width: 90vw;
	max-height: 90vh;
	object-fit: contain;
}
.cd-gallery-lightbox-close,
.cd-gallery-lightbox-prev,
.cd-gallery-lightbox-next {
	position: absolute;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 32px;
	cursor: pointer;
	line-height: 1;
	padding: 8px 16px;
}
.cd-gallery-lightbox-close {
	top: 12px;
	right: 12px;
}
.cd-gallery-lightbox-prev {
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
}
.cd-gallery-lightbox-next {
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
}

/* Contact This Listing box (CD_Contact) — matches the claim box above. */
.cd-contact-box {
	margin-top: 20px;
	padding: 16px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #f9f9f9;
}
.cd-contact-box h3 {
	margin-top: 0;
}
.cd-contact-form label {
	display: block;
	margin: 10px 0 4px;
	font-weight: 600;
}
.cd-contact-form input,
.cd-contact-form textarea {
	width: 100%;
	box-sizing: border-box;
}
.cd-contact-form button {
	margin-top: 12px;
	padding: 8px 16px;
	border: none;
	border-radius: 4px;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
	cursor: pointer;
}
.cd-contact-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.cd-contact-message {
	padding: 8px 12px;
	border-radius: 4px;
	background: #f0f0f1;
}
.cd-contact-message.cd-contact-success {
	background: #edfaef;
	color: #1a7f37;
}
.cd-contact-privacy {
	margin: 8px 0 0;
	font-size: 12px;
	color: #646970;
}

/* Custom field types (Phase 38): choice groups, help text, section headings, media. */
.cd-choice-group {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 4px 0 8px;
}
.cd-choice {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: normal;
}
.cd-field-help {
	margin: 2px 0 10px;
	font-size: 0.9em;
	color: #646970;
}
.cd-form-section-heading,
.cd-meta-section {
	margin: 18px 0 6px;
	padding-bottom: 4px;
	border-bottom: 1px solid #e2e2e2;
}
.cd-required {
	color: #b32d2e;
}
.cd-upload-current img {
	vertical-align: middle;
	border-radius: 4px;
}
.cd-meta-type-image img.cd-field-image {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}
.cd-field-video {
	position: relative;
	padding-top: 56.25%;
	margin: 6px 0;
}
.cd-field-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Map block (Phase 46) */
.cd-map-block {
	margin: 16px 0;
}
.cd-map-block.cd-map-sticky {
	position: sticky;
	top: 0;
	z-index: 5;
	background: #fff;
}
.cd-map-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-bottom: 8px;
}
.cd-map-type-toggles {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 0;
	padding: 0;
	border: 0;
}
.cd-map-type-toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
}
.cd-map-type-count {
	color: #666;
	font-size: 12px;
}
.cd-map-infowindow {
	max-width: 220px;
	font-size: 13px;
}
.cd-map-infowindow img {
	display: block;
	width: 100%;
	height: 90px;
	object-fit: cover;
	margin-bottom: 6px;
	border-radius: 4px;
}
.cd-map-infowindow a {
	font-weight: 600;
}
.cd-map-infowindow p {
	margin: 4px 0 0;
	color: #555;
}

/* Categories block (Phase 46) */
.cd-categories {
	list-style: none;
	margin: 16px 0;
	padding: 0;
}
.cd-categories-grid {
	display: grid;
	grid-template-columns: repeat(var(--cd-cols, 4), minmax(0, 1fr));
	gap: 12px;
}
@media (max-width: 900px) {
	.cd-categories-grid { grid-template-columns: repeat(min(var(--cd-cols, 4), 3), minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.cd-categories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cd-category-item a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	height: 100%;
	padding: 14px 10px;
	border: 1px solid #e2e2e2; /* thin all round, no thicker top edge (David, 2026-11-29) */
	border-radius: 8px;
	text-align: center;
	text-decoration: none;
	color: inherit;
}
.cd-category-item a:hover {
	border-color: var(--cd-category-color, var(--cd-primary-color, #185fa5));
}
/* A clicked or focused category tile gets the same outline as a listing card (Phase 92): a solid 2px line in the
   primary color, 2px out, in place of the theme's thin dotted one. */
.cd-category-item a:focus {
	outline: 2px solid var(--cd-primary-color, #185fa5);
	outline-offset: 2px;
}
.cd-categories-list .cd-category-item a {
	flex-direction: row;
	text-align: left;
	margin-bottom: 8px;
}
.cd-category-image {
	width: 100%;
	max-height: 110px;
	object-fit: cover;
	border-radius: 4px;
}
.cd-categories-list .cd-category-image {
	width: 48px;
	height: 48px;
}
.cd-category-icon.dashicons {
	width: 32px;
	height: 32px;
	font-size: 32px;
	color: var(--cd-category-color, var(--cd-primary-color, #185fa5));
}
.cd-category-name {
	font-weight: 600;
}
.cd-category-count {
	font-size: 12px;
	color: #666;
}
.cd-category-description {
	font-size: 13px;
	color: #555;
}

/* Tags block (Phase 46) */
.cd-tags {
	list-style: none;
	margin: 16px 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	align-items: baseline;
}
.cd-tags-list {
	display: block;
}
.cd-tags-list .cd-tag-item {
	margin-bottom: 4px;
}
.cd-tags-pills .cd-tag-item a {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid #ccc;
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	font-size: 13px;
}
.cd-tags-pills .cd-tag-item a:hover,
.cd-tags-pills .cd-tag-item a:focus {
	border-color: var(--cd-primary-color, #185fa5);
}
.cd-tag-count {
	color: #666;
	font-size: 0.85em;
}

/* Open now / Closed now (Phase 47) */
.cd-hours-status {
	margin: 2px 0;
	font-size: 13px;
	font-weight: 600;
}
.cd-hours-open { color: #1e7e34; }
.cd-hours-closed { color: #b02a37; }
.cd-hours-temporarily-closed { color: #8a5a00; }
.cd-temporarily-closed-notice {
	padding: 10px 14px;
	border-left: 4px solid #f0ad4e;
	background: #fff8e6;
}
.cd-open-now-filter {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* Badges (Phase 47): look set per badge (CD_Badge_Display). */
.cd-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 3px;
	background: var(--cd-badge-bg, #f5a623);
	color: var(--cd-badge-color, #1a1a1a);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none;
	white-space: nowrap;
	position: relative;
	z-index: 2; /* above a card's stretched link, so a badge's link or tooltip works */
}
a.cd-badge:hover,
a.cd-badge:focus {
	color: var(--cd-badge-color, #1a1a1a);
	filter: brightness(0.95);
}
.cd-badge .dashicons {
	width: 1.2em;
	height: 1.2em;
	font-size: 1.2em;
}
.cd-badge-pill { border-radius: 999px; padding-left: 10px; padding-right: 10px; }
.cd-badge-size-medium { font-size: 13px; padding: 4px 10px; }
.cd-badge-size-large { font-size: 15px; padding: 6px 12px; }
.cd-badge-shadow-small { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.cd-badge-shadow-medium { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25); }
.cd-badge-shadow-large { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); }
.cd-has-tooltip[data-cd-tooltip]:hover::after,
.cd-has-tooltip[data-cd-tooltip]:focus::after {
	content: attr(data-cd-tooltip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 6px);
	transform: translateX(-50%);
	padding: 4px 8px;
	border-radius: 4px;
	background: #222;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	z-index: 10;
}
.cd-card-badges,
.cd-listing-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}
.cd-card-badge-corner {
	position: absolute;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	z-index: 2;
	pointer-events: none;
}
.cd-card-badge-corner .cd-badge {
	pointer-events: auto;
}
.cd-card-badge-corner-top-left { top: 8px; left: 8px; }
.cd-card-badge-corner-top-right { top: 8px; right: 8px; justify-content: flex-end; }
.cd-card-badge-corner-bottom-left { bottom: 8px; left: 8px; }
.cd-card-badge-corner-bottom-right { bottom: 8px; right: 8px; justify-content: flex-end; }
.cd-card-media {
	position: relative;
	overflow: hidden;
}
.cd-listing-grid.cd-view-list .cd-card-media {
	flex-shrink: 0;
}
.cd-card-badge-corner-ribbon-left,
.cd-card-badge-corner-ribbon-right {
	top: 0;
	width: 100%;
	height: 0;
}
.cd-badge-pos-ribbon-left,
.cd-badge-pos-ribbon-right {
	position: absolute;
	top: 18px;
	width: 150px;
	justify-content: center;
	border-radius: 0;
}
.cd-badge-pos-ribbon-left { left: -40px; transform: rotate(-45deg); }
.cd-badge-pos-ribbon-right { right: -40px; transform: rotate(45deg); }
.cd-listing-badges-below-title {
	margin-top: -4px;
}
a.cd-card-action {
	display: inline-block;
	margin-right: 6px;
	color: inherit;
	text-decoration: none;
}
.cd-get-directions .cd-button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	border-radius: 4px;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
	text-decoration: none;
}
/* A corner badge moves aside when a ribbon shares its corner. */
.cd-listing-card :has(> .cd-card-badge-corner-ribbon-left) > .cd-card-badge-corner-top-left,
.cd-listing-card:has(> .cd-card-badge-corner-ribbon-left) > .cd-card-badge-corner-top-left { left: 64px; }
.cd-listing-card :has(> .cd-card-badge-corner-ribbon-right) > .cd-card-badge-corner-top-right,
.cd-listing-card:has(> .cd-card-badge-corner-ribbon-right) > .cd-card-badge-corner-top-right { right: 64px; }

/* Recently Viewed (Phase 49) */
.cd-recently-viewed {
	margin: 24px 0;
}
.cd-recently-viewed-heading {
	margin: 0 0 12px;
}

/* Favourites (Phase 62): a thumbs-up, kept only in the visitor's browser */
.cd-favourite {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #6b6b6b;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.cd-favourite[hidden] { display: none; }
.cd-favourite:hover,
.cd-favourite:focus-visible { color: var(--cd-primary-color, #185fa5); }
.cd-favourite.is-picked {
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
}
/* On a card it sits over the corner of the photo, above the card's stretched title link. */
.cd-favourite-card {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 3;
}
.cd-listing-card > .cd-favourite-card { top: 8px; bottom: auto; }
.cd-favourite-single { margin: 0 0 8px; }
.cd-favourites { margin: 24px 0; }
.cd-favourites-heading { margin: 0 0 12px; }
.cd-favourites-empty { margin: 12px 0; }
.cd-favourites-note { margin: 12px 0 0; font-size: 13px; color: #6b6b6b; }

/* Report this listing (Phase 49) */
.cd-report-box {
	margin-top: 16px;
	font-size: 14px;
}
.cd-report-box summary {
	cursor: pointer;
	color: #666;
}
.cd-report-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}
.cd-report-form fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}
.cd-report-reason {
	display: block;
}
.cd-report-thanks {
	color: #1e7e34;
}

/* Fields shown on cards (Phase 50) */
.cd-card-fields {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
	font-size: 13px;
	color: #444;
}
.cd-card-field {
	position: relative;
	z-index: 2; /* links in a value (phone, website) stay clickable above the card link */
}
.cd-card-field .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
	vertical-align: text-bottom;
}
.cd-card-field-label {
	font-weight: 600;
}
.cd-field-icon.dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	vertical-align: text-bottom;
}

/* Listing page extras (Phase 51, CD_Listing_Page) */
.cd-gallery-figure {
	margin: 0;
	width: 100px;
}
.cd-gallery-figure figcaption,
.cd-gallery-slide figcaption {
	font-size: 12px;
	color: #555;
	margin-top: 4px;
	line-height: 1.35;
}
.cd-listing-gallery.cd-gallery-slider {
	display: block;
	margin: 12px 0 16px;
}
.cd-gallery-slide {
	margin: 0;
}
.cd-gallery-slider .cd-gallery-item img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	max-height: 520px;
	object-fit: cover;
	border-radius: 6px;
}
.cd-gallery-slider .cd-carousel-arrow {
	top: calc(50% - 12px);
}
.cd-listing-features {
	list-style: none;
	margin: 12px 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 6px 16px;
}
.cd-listing-features li {
	display: flex;
	align-items: center;
	gap: 6px;
}
.cd-listing-features .dashicons {
	color: var(--cd-primary-color, #185fa5);
}
.cd-listing-next-prev {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin: 24px 0 8px;
	padding-top: 16px;
	border-top: 1px solid #e2e2e2;
}
.cd-listing-next-prev a {
	display: flex;
	flex-direction: column;
	max-width: 48%;
	text-decoration: none;
}
.cd-listing-next {
	margin-left: auto;
	text-align: right;
}
.cd-next-prev-label {
	font-size: 12px;
	color: #666;
}
.cd-next-prev-title {
	font-weight: 600;
}
.cd-listing-delete-form {
	display: inline;
}
.cd-listing-delete-form button {
	background: none;
	border: 0;
	padding: 0;
	color: #b32d2e;
	cursor: pointer;
	text-decoration: underline;
	font: inherit;
}

/* Font Awesome icons (Phase 55, CD_Icons::html()): the same places and sizes as Dashicons. */
.cd-fa {
	display: inline-block;
	width: 1.25em;
	line-height: 1;
	text-align: center;
}
.cd-card-category .cd-fa {
	font-size: 13px;
}
.cd-category-icon.cd-fa {
	width: 32px;
	font-size: 28px;
	color: var(--cd-category-color, var(--cd-primary-color, #185fa5));
}
.cd-badge .cd-fa {
	font-size: 1em;
}
.cd-card-field .cd-fa {
	font-size: 14px;
}
.cd-field-icon.cd-fa {
	font-size: 16px;
}
.cd-listing-features .cd-fa {
	color: var(--cd-primary-color, #185fa5);
}

/* Featured Listing block (Phase 56, CD_Listing_Display::render_spotlight()): one large featured
   image linked to the listing, cropped to the chosen shape, with the title under it. */
.cd-featured-listing {
	margin: 24px auto;
	--cd-featured-radius: 8px;
}
.cd-featured-image {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	border-radius: var(--cd-featured-radius);
	background: #e8eaed;
}
.cd-featured-image.cd-ratio-21-9 { aspect-ratio: 21 / 9; }
.cd-featured-image.cd-ratio-2-1 { aspect-ratio: 2 / 1; }
.cd-featured-image.cd-ratio-3-2 { aspect-ratio: 3 / 2; }
.cd-featured-image.cd-ratio-4-3 { aspect-ratio: 4 / 3; }
.cd-featured-image .cd-featured-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.3s ease;
}
.cd-featured-image:hover .cd-featured-img,
.cd-featured-image:focus-visible .cd-featured-img {
	transform: scale(1.02);
}
@media (prefers-reduced-motion: reduce) {
	.cd-featured-image .cd-featured-img { transition: none; }
	.cd-featured-image:hover .cd-featured-img { transform: none; }
}
.cd-featured-image:focus-visible {
	outline: 3px solid var(--cd-primary-color, #185fa5);
	outline-offset: 2px;
}
.cd-featured-bordered .cd-featured-image {
	border: 1px solid #d0d4d9;
}
.cd-featured-shadow-small .cd-featured-image { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.cd-featured-shadow-medium .cd-featured-image { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16); }
.cd-featured-shadow-large .cd-featured-image { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22); }
.cd-featured-title {
	margin: 10px 0 0;
	line-height: 1.25;
}
.cd-featured-title a {
	text-decoration: none;
	color: inherit;
}
.cd-featured-title a:hover,
.cd-featured-title a:focus-visible {
	text-decoration: underline;
}
.cd-featured-title-small .cd-featured-title { font-size: 1rem; }
.cd-featured-title-medium .cd-featured-title { font-size: 1.35rem; }
.cd-featured-title-large .cd-featured-title { font-size: 1.85rem; }
.cd-featured-align-center .cd-featured-title { text-align: center; }
.cd-featured-align-right .cd-featured-title { text-align: right; }

/* Featured Listing block, text over the image (Phase 77, CD_Listing_Display::featured_overlay_html()):
   a headline, a line of text and an optional button that slide in over the image. The image itself stays
   a link to the listing; only the button takes clicks. */
.cd-featured-media {
	position: relative;
	overflow: hidden;
	border-radius: var(--cd-featured-radius);
}
.cd-featured-badges .cd-card-badges {
	margin: 0;
}
.cd-featured-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	border-radius: var(--cd-featured-radius);
	background: linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42));
	text-align: center;
}
.cd-featured-overlay-left { justify-content: flex-start; text-align: left; }
.cd-featured-overlay-right { justify-content: flex-end; text-align: right; }
.cd-featured-overlay-inner {
	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	padding: 24px 56px;
	color: #fff;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
	animation: cd-overlay-slide 0.7s ease-out both;
}
@keyframes cd-overlay-slide {
	from { opacity: 0; transform: translateX(-48px); }
	to { opacity: 1; transform: none; }
}
.cd-featured-overlay-headline {
	margin: 0 0 8px;
	color: inherit;
	font-size: clamp(1.5rem, 4vw, 2.6rem);
	line-height: 1.15;
}
.cd-featured-overlay-text {
	margin: 0 0 16px;
	font-size: clamp(1rem, 2vw, 1.25rem);
}
.cd-featured-overlay-button {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 6px;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
	text-decoration: none;
	text-shadow: none;
	font-weight: 600;
	pointer-events: auto;
}
.cd-featured-overlay-button:hover,
.cd-featured-overlay-button:focus-visible {
	filter: brightness(1.1);
	color: #fff;
}
@media (max-width: 600px) {
	.cd-featured-overlay-inner { padding: 16px 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.cd-featured-overlay-inner { animation: none; }
}

/* Listing updates (Phase 71) */
.cd-updates { margin: 2em 0; }
.cd-update-form { margin-bottom: 1.5em; padding: 1em; border: 1px solid rgba(0, 0, 0, .15); border-radius: 6px; }
.cd-update-form input[type="text"], .cd-update-form textarea, .cd-update-form select { width: 100%; max-width: 100%; box-sizing: border-box; }
.cd-update-note { margin-left: .75em; font-size: .9em; opacity: .75; }
.cd-update { padding: 1em 0; border-top: 1px solid rgba(0, 0, 0, .12); }
.cd-update-category { display: inline-block; padding: .1em .6em; border-radius: 1em; background: rgba(0, 0, 0, .07); font-size: .8em; }
.cd-update-date { margin-left: .5em; font-size: .85em; opacity: .75; }
.cd-update-title { margin: .4em 0; }

/* A listings block's own heading (Phase 72): across the whole block, even when a map sits beside the list. */
.cd-listings-heading {
	grid-column: 1 / -1;
}

/* Listing page header (Phase 82, templates/single-listing.php): the photo runs the full width of the page
   with the favourite button in its bottom-right corner; the title, category pills and contact tiles follow.
   The photo breaks out of whatever column the theme gives the page; a theme that already lets the page
   run edge to edge (this plugin's own companion theme) overrides the width. */
.cd-listing-hero {
	position: relative;
	box-sizing: border-box;
	width: 100vw;
	max-width: 100vw;
	margin: 0 0 24px calc(50% - 50vw);
}
.cd-listing-hero-media {
	position: relative;
	width: 100%;
	overflow: hidden;
	aspect-ratio: 21 / 9;
	max-height: 560px;
	background: #e8eaed;
}
.cd-listing-hero-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
.cd-favourite-hero {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 3;
	width: 46px;
	height: 46px;
	margin: 0;
	font-size: 20px;
}
@media (max-width: 600px) {
	.cd-listing-hero-media { aspect-ratio: 4 / 3; }
	.cd-favourite-hero { right: 12px; bottom: 12px; }
}

/* Categories as pills */
.cd-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}
.cd-pills li { margin: 0; }
.cd-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 14px;
	border: 1px solid var(--cd-primary-color, #185fa5);
	border-radius: 999px;
	background: #fff;
	color: var(--cd-primary-color, #185fa5);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}
@supports (background: color-mix(in srgb, red 10%, white)) {
	.cd-pill { background: color-mix(in srgb, var(--cd-primary-color, #185fa5) 9%, #fff); }
}
.cd-pill:hover,
.cd-pill:focus-visible {
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
}

/* Address, hours status, phone, email, website and the other short fields as tiles */
.cd-listing-info {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 22px 0;
	padding: 0;
	list-style: none;
}
.cd-info-tile {
	position: relative;
	display: flex;
	flex: 0 1 auto; /* as wide as its text needs, no wider */
	align-items: center;
	gap: 12px;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 12px 20px 12px 14px;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	background: #fff;
}
.cd-info-icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--cd-primary-color, #185fa5);
	color: #fff;
	font-size: 16px;
}
.cd-info-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.cd-info-label {
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b6b6b;
}
.cd-info-value {
	font-weight: 600;
	overflow-wrap: break-word;
}
.cd-info-value a {
	color: inherit;
	text-decoration: none;
}
/* A tile with a link is clickable all over. */
.cd-info-linked .cd-info-value a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.cd-info-linked:hover,
.cd-info-linked:focus-within {
	border-color: var(--cd-primary-color, #185fa5);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.cd-info-state-open .cd-info-value { color: #1e7e34; }
.cd-info-state-closed .cd-info-value,
.cd-info-state-temporarily-closed .cd-info-value { color: #b02a37; }

/* Link tiles (website, Facebook...) show just their name beside the icon (Phase 83); the address sits under the map. */
.cd-info-name-only .cd-info-body { justify-content: center; }
.cd-listing-address {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 12px 0 16px;
	font-weight: 600;
}
.cd-listing-address a { color: inherit; text-decoration: none; }
.cd-listing-address a:hover,
.cd-listing-address a:focus-visible { text-decoration: underline; }
.cd-address-icon {
	flex: none;
	margin-top: 3px;
	color: var(--cd-primary-color, #185fa5);
}

/* Listing page, Phase 86: the name sits over the photo (the featured block's headline style); the Featured
   badge and the category pills follow on one row, and the pills move up beside the badge when there is one. */
.cd-listing-hero-title .cd-featured-overlay-inner { max-width: 960px; }
.cd-has-hero .cd-listing-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}
.cd-has-hero .cd-listing-header .cd-listing-badges {
	margin: 0;
}
.cd-has-hero .cd-listing-header .cd-pills {
	margin: 0;
}

/* Phone and email tiles (Phase 87): the name and icon open the dialer or mail app; the copy button beside
   them copies the value and shows it in the tile for a few seconds. */
.cd-info-has-copy { padding-right: 8px; }
.cd-info-copy {
	position: relative; /* above the tile's stretched link */
	z-index: 2;
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-left: 6px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--cd-primary-color, #185fa5);
	font-size: 16px;
	cursor: pointer;
}
.cd-info-copy:hover,
.cd-info-copy:focus-visible { background: rgba(0, 0, 0, 0.07); }
.cd-info-tile.is-copied { border-color: var(--cd-primary-color, #185fa5); }
.cd-info-tile.is-copied .cd-info-value { user-select: all; }

/* Event cards (Phase 95): the date and time sit right under the name. */
.cd-card-event-when {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--cd-primary-color, #185fa5);
}
.cd-card-event-icon {
	flex: none;
}

/* A card with no photo has its favourite button in the corner over the card itself, so the title keeps clear of it
   (Phase 97). */
.cd-listing-card:not(:has(.cd-card-media)) .cd-listing-card-body h3 {
	padding-right: 44px;
}
