/* 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: #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;
}
.cd-listing-card.cd-listing-featured {
	border-color: #f5a623;
	box-shadow: 0 0 0 1px #f5a623;
}

.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;
}
.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;
	padding-bottom: 4px;
}
.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%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #ccc;
	background: #fff;
	color: #222;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	z-index: 2;
}
.cd-carousel-arrow[disabled] {
	opacity: 0.4;
	cursor: default;
}
.cd-carousel-prev { left: 6px; }
.cd-carousel-next { right: 6px; }
.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;
}
.cd-calendar-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.cd-calendar-title {
	margin: 0;
}
.cd-calendar-grid {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}
.cd-calendar-grid th {
	padding: 6px;
	text-align: center;
	background: #f7f7f7;
	font-size: 12px;
}
.cd-calendar-grid td {
	border: 1px solid #e2e2e2;
	vertical-align: top;
	height: 90px;
	padding: 4px;
	font-size: 12px;
}
.cd-calendar-empty {
	background: #fafafa;
}
.cd-calendar-today {
	background: #f0f6fc;
}
.cd-calendar-day-number {
	font-weight: 600;
	margin-bottom: 4px;
}
.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-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;
	border-top: 3px solid var(--cd-category-color, #e2e2e2);
	border-radius: 8px;
	text-align: center;
	text-decoration: none;
	color: inherit;
}
.cd-category-item a:hover,
.cd-category-item a:focus {
	border-color: var(--cd-category-color, var(--cd-primary-color, #185fa5));
}
.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; }
