/* =====================================================================
   SA Club Finder v1.0.0
   The Other Dimension
   ===================================================================== */

.sa-cf {
	--sa-cf-green:      var(--green, #006134);
	--sa-cf-green-dark: #004a27;
	--sa-cf-gold:       var(--gold, #FACE08);
	--sa-cf-black:      var(--black, #232122);
	--sa-cf-grey:       var(--grey, #f5f5f5);
	--sa-cf-line:       #e3e1e2;
	--sa-cf-muted:      #5f5b5c;
	--sa-cf-head:       'Barlow Condensed', 'Barlow', 'Arial Narrow', sans-serif;
	--sa-cf-radius:     16px;
	--sa-cf-ease:       0.2s ease;
	--sa-cf-panel-h:    640px;

	width: 100%;
	color: var(--sa-cf-black);
	font-size: 16px;
	line-height: 1.5;
}

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

/* Divi resets */
.sa-cf p,
.sa-cf h2,
.sa-cf h3 { padding-bottom: 0; }

.sa-cf [hidden] { display: none !important; }

.sa-cf__sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.sa-cf__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 52px;
	padding: 0 28px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-family: var(--sa-cf-head);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: background var(--sa-cf-ease), color var(--sa-cf-ease), border-color var(--sa-cf-ease), transform var(--sa-cf-ease);
}

.sa-cf__btn:focus-visible,
.sa-cf__chip:focus-visible,
.sa-cf__locate:focus-visible,
.sa-cf__link:focus-visible,
.sa-cf__modal-close:focus-visible {
	outline: 3px solid var(--sa-cf-gold);
	outline-offset: 2px;
}

.sa-cf__btn--sm {
	height: 38px;
	padding: 0 18px;
	font-size: 16px;
}

.sa-cf__btn--primary {
	background: var(--sa-cf-green);
	color: #fff;
}

.sa-cf__btn--primary:hover {
	background: var(--sa-cf-gold);
	color: var(--sa-cf-black);
	transform: translateY(-1px);
}

.sa-cf__btn--ghost {
	background: transparent;
	color: var(--sa-cf-green);
	border-color: var(--sa-cf-green);
}

.sa-cf__btn--ghost:hover {
	background: var(--sa-cf-green);
	color: #fff;
}

/* ── Search panel ──────────────────────────────────────────────────── */
.sa-cf__panel {
	background: var(--sa-cf-green);
	border-radius: var(--sa-cf-radius);
	padding: 28px 32px 24px;
	color: #fff;
}

.sa-cf__search {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.sa-cf__field {
	position: relative;
	flex: 1 1 320px;
	min-width: 0;
}

.sa-cf__field-icon {
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--sa-cf-green);
	display: flex;
	pointer-events: none;
}

.sa-cf .sa-cf__input {
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 56px 0 50px !important;
	border: 2px solid transparent;
	border-radius: 999px;
	background: #fff;
	color: var(--sa-cf-black);
	font-family: inherit;
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	transition: border-color var(--sa-cf-ease), box-shadow var(--sa-cf-ease);
}

.sa-cf__input::placeholder { color: #8a8687; }

.sa-cf .sa-cf__input:focus {
	border-color: var(--sa-cf-gold);
	box-shadow: 0 0 0 3px rgba(250, 206, 8, 0.35);
}

.sa-cf__input::-webkit-search-cancel-button { cursor: pointer; }

.sa-cf__locate {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--sa-cf-grey);
	color: var(--sa-cf-green);
	cursor: pointer;
	transition: background var(--sa-cf-ease), color var(--sa-cf-ease);
}

.sa-cf__locate:hover {
	background: var(--sa-cf-green);
	color: #fff;
}

.sa-cf__locate.is-busy svg { animation: sa-cf-pulse 1s ease-in-out infinite; }

@keyframes sa-cf-pulse { 50% { opacity: 0.3; } }

.sa-cf .sa-cf__select {
	height: 52px;
	margin: 0;
	padding: 0 40px 0 20px;
	border: 2px solid transparent;
	border-radius: 999px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23006134' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 18px center;
	color: var(--sa-cf-black);
	font-family: inherit;
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	outline: none;
}

.sa-cf .sa-cf__select:focus {
	border-color: var(--sa-cf-gold);
	box-shadow: 0 0 0 3px rgba(250, 206, 8, 0.35);
}

.sa-cf__btn--search {
	position: relative;
	background: var(--sa-cf-gold);
	color: var(--sa-cf-black);
}

.sa-cf__btn--search:hover {
	background: #fff;
	transform: translateY(-1px);
}

.sa-cf__btn--search:disabled { cursor: progress; transform: none; }

.sa-cf__btn-text {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.sa-cf__btn--search.is-loading .sa-cf__btn-text { visibility: hidden; }

.sa-cf__spinner {
	display: none;
	position: absolute;
	left: 50%;
	top: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid rgba(35, 33, 34, 0.25);
	border-top-color: var(--sa-cf-black);
	border-radius: 50%;
	animation: sa-cf-spin 0.7s linear infinite;
}

.sa-cf__btn--search.is-loading .sa-cf__spinner { display: block; }

@keyframes sa-cf-spin { to { transform: rotate(360deg); } }

/* ── Filter chips ──────────────────────────────────────────────────── */
.sa-cf__filter {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 18px;
}

.sa-cf__filter-label {
	flex: 0 0 84px;
	padding-top: 7px;
	font-family: var(--sa-cf-head);
	font-size: 17px;
	font-weight: 600;
	color: var(--sa-cf-gold);
}

.sa-cf__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
}

.sa-cf__chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 36px;
	margin: 0;
	padding: 0 16px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font-family: var(--sa-cf-head);
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: background var(--sa-cf-ease), border-color var(--sa-cf-ease), color var(--sa-cf-ease);
}

.sa-cf__chip:hover { border-color: #fff; }

.sa-cf__chip.is-active {
	background: var(--sa-cf-gold);
	border-color: var(--sa-cf-gold);
	color: var(--sa-cf-black);
}

.sa-cf__chip--disc .sa-cf__dot {
	background: var(--sa-cf-chip, #fff);
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.sa-cf__chip--disc.is-active {
	background: var(--sa-cf-chip);
	border-color: #fff;
	color: var(--sa-cf-chip-text, #fff);
}

.sa-cf__dot {
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

/* ── Status ────────────────────────────────────────────────────────── */
.sa-cf__status {
	min-height: 24px;
	margin: 20px 4px 14px;
	font-size: 17px;
	color: var(--sa-cf-muted);
}

.sa-cf__status strong {
	color: var(--sa-cf-green);
	font-weight: 700;
}

.sa-cf__status em {
	font-style: normal;
	font-weight: 600;
	color: var(--sa-cf-black);
}

.sa-cf__status.is-error { color: #b32d2e; }

/* ── Results layout: list left, map right ──────────────────────────── */
.sa-cf__results {
	display: grid;
	grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

.sa-cf--no-map .sa-cf__results { grid-template-columns: minmax(0, 1fr); }
.sa-cf--no-map .sa-cf__map-wrap { display: none; }

.sa-cf--no-map .sa-cf__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	max-height: none;
	overflow: visible;
}

.sa-cf__map-wrap {
	position: sticky;
	top: 110px;
}

.sa-cf__map {
	width: 100%;
	height: var(--sa-cf-panel-h);
	border-radius: var(--sa-cf-radius);
	overflow: hidden;
	background: var(--sa-cf-grey);
}

.sa-cf__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-height: var(--sa-cf-panel-h);
	overflow-y: auto;
	padding: 2px 8px 2px 2px;
	scrollbar-width: thin;
	scrollbar-color: var(--sa-cf-green) transparent;
}

.sa-cf__list::-webkit-scrollbar { width: 5px; }
.sa-cf__list::-webkit-scrollbar-thumb { background: var(--sa-cf-green); border-radius: 3px; }

/* ── Club card ─────────────────────────────────────────────────────── */
.sa-cf__card {
	--sa-cf-accent: var(--sa-cf-green);
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px 20px 18px 22px;
	background: #fff;
	border: 1px solid var(--sa-cf-line);
	border-left: 6px solid var(--sa-cf-accent);
	border-radius: 12px;
	cursor: pointer;
	transition: box-shadow var(--sa-cf-ease), border-color var(--sa-cf-ease);
}

.sa-cf__card:hover { box-shadow: 0 6px 20px rgba(35, 33, 34, 0.1); }

.sa-cf__card.is-active {
	border-color: var(--sa-cf-green);
	border-left-color: var(--sa-cf-accent);
	box-shadow: 0 0 0 2px var(--sa-cf-green);
}

.sa-cf__card:focus-visible {
	outline: 3px solid var(--sa-cf-gold);
	outline-offset: 2px;
}

.sa-cf__card-head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.sa-cf__logo {
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--sa-cf-grey);
	display: flex;
	align-items: center;
	justify-content: center;
}

.sa-cf__logo-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.sa-cf__initials {
	font-family: var(--sa-cf-head);
	font-size: 20px;
	font-weight: 700;
	color: var(--sa-cf-green);
}

.sa-cf__card-titles {
	flex: 1;
	min-width: 0;
}

.sa-cf .sa-cf__card-title,
#page-container .sa-cf .sa-cf__card-title {
	margin: 0 0 2px;
	padding: 0;
	font-family: var(--sa-cf-head);
	font-size: 23px;
	font-weight: 700;
	line-height: 1.15;
	color: var(--sa-cf-black);
}

.sa-cf .sa-cf__card-address {
	margin: 0;
	font-size: 15px;
	line-height: 1.4;
	color: var(--sa-cf-muted);
}

.sa-cf__distance {
	flex: 0 0 auto;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--sa-cf-gold);
	color: var(--sa-cf-black);
	font-family: var(--sa-cf-head);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.sa-cf .sa-cf__tags,
#page-container .sa-cf .sa-cf__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	line-height: 1.3;
}

.sa-cf__tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--sa-cf-grey);
	font-size: 13px;
	font-weight: 600;
	color: var(--sa-cf-black);
}

.sa-cf__tag .sa-cf__dot { width: 8px; height: 8px; }

.sa-cf__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sa-cf__links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
}

.sa-cf__actions:empty,
.sa-cf__links:empty { display: none; }

.sa-cf__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 600;
	color: var(--sa-cf-green);
	text-decoration: none;
}

.sa-cf__link:hover {
	color: var(--sa-cf-black);
	text-decoration: underline;
	text-decoration-color: var(--sa-cf-gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* ── Empty state ───────────────────────────────────────────────────── */
.sa-cf__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 56px 24px;
	background: var(--sa-cf-grey);
	border-radius: var(--sa-cf-radius);
	text-align: center;
	color: var(--sa-cf-green);
}

.sa-cf .sa-cf__empty-title {
	margin: 0;
	font-family: var(--sa-cf-head);
	font-size: 30px;
	font-weight: 700;
	color: var(--sa-cf-black);
}

.sa-cf .sa-cf__empty-text {
	max-width: 520px;
	margin: 0 0 8px;
	font-size: 16px;
	color: var(--sa-cf-muted);
}

/* ── Map info window ───────────────────────────────────────────────── */
.sa-cf-info { min-width: 190px; max-width: 260px; padding: 2px; }

.sa-cf-info .sa-cf-info__title {
	margin: 0 0 4px;
	padding: 0;
	font-family: 'Barlow Condensed', 'Barlow', sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: #232122;
}

.sa-cf-info .sa-cf-info__addr {
	margin: 0 0 8px;
	padding: 0;
	font-size: 13px;
	color: #5f5b5c;
}

.sa-cf-info a {
	font-size: 13px;
	font-weight: 700;
	color: #006134;
	text-decoration: underline;
	text-decoration-color: #FACE08;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* ── Enquiry modal ─────────────────────────────────────────────────── */
html.sa-cf-modal-open { overflow: hidden; }

.sa-cf__modal {
	position: fixed;
	inset: 0;
	z-index: 100001; /* above Divi's fixed header */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.sa-cf__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(35, 33, 34, 0.72);
	cursor: pointer;
}

.sa-cf__modal-box {
	position: relative;
	width: 100%;
	max-width: 580px;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: var(--sa-cf-radius);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
	animation: sa-cf-modal-in 0.22s ease;
}

@keyframes sa-cf-modal-in {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}

.sa-cf__modal-head {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	background: var(--sa-cf-green);
	border-bottom: 4px solid var(--sa-cf-gold);
}

.sa-cf .sa-cf__modal-title,
#page-container .sa-cf .sa-cf__modal-title {
	margin: 0;
	padding: 0;
	font-family: var(--sa-cf-head);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
	color: #fff;
}

.sa-cf__modal-close {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--sa-cf-gold);
	color: var(--sa-cf-black);
	cursor: pointer;
	transition: background var(--sa-cf-ease);
}

.sa-cf__modal-close:hover { background: #fff; }

.sa-cf__modal-body { padding: 22px 24px 28px; }

/* Gravity Forms inside the modal */
.sa-cf__modal-body .gform_wrapper { margin: 0 !important; }

.sa-cf__modal-body .gform_wrapper .gfield_label {
	font-weight: 600;
	color: var(--sa-cf-black);
}

.sa-cf__modal-body .gform_wrapper input[type="text"],
.sa-cf__modal-body .gform_wrapper input[type="email"],
.sa-cf__modal-body .gform_wrapper input[type="tel"],
.sa-cf__modal-body .gform_wrapper textarea,
.sa-cf__modal-body .gform_wrapper select {
	width: 100% !important;
	padding: 11px 14px !important;
	border: 2px solid var(--sa-cf-line) !important;
	border-radius: 10px !important;
	font-size: 16px !important;
	color: var(--sa-cf-black) !important;
	outline: none !important;
	transition: border-color var(--sa-cf-ease) !important;
}

.sa-cf__modal-body .gform_wrapper input:focus,
.sa-cf__modal-body .gform_wrapper textarea:focus,
.sa-cf__modal-body .gform_wrapper select:focus {
	border-color: var(--sa-cf-green) !important;
	box-shadow: 0 0 0 3px rgba(0, 97, 52, 0.15) !important;
}

.sa-cf__modal-body .gform_wrapper .gform_footer input[type="submit"],
.sa-cf__modal-body .gform_wrapper .gform_footer button[type="submit"] {
	height: 52px !important;
	padding: 0 32px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--sa-cf-green) !important;
	color: #fff !important;
	font-family: var(--sa-cf-head) !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	transition: background var(--sa-cf-ease), color var(--sa-cf-ease) !important;
}

.sa-cf__modal-body .gform_wrapper .gform_footer input[type="submit"]:hover,
.sa-cf__modal-body .gform_wrapper .gform_footer button[type="submit"]:hover {
	background: var(--sa-cf-gold) !important;
	color: var(--sa-cf-black) !important;
}

.sa-cf__modal-body .gform_confirmation_message {
	padding: 20px;
	border-left: 6px solid var(--sa-cf-green);
	border-radius: 10px;
	background: var(--sa-cf-grey);
	font-weight: 600;
	color: var(--sa-cf-black);
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 980px) {
	.sa-cf__results { grid-template-columns: minmax(0, 1fr); }
	.sa-cf__map-wrap { position: static; order: -1; }
	.sa-cf__map { height: 340px; }
	.sa-cf__list { max-height: none; overflow: visible; padding-right: 0; }
}

@media (max-width: 640px) {
	.sa-cf__panel { padding: 20px 16px 18px; border-radius: 12px; }
	.sa-cf__field { flex-basis: 100%; }
	.sa-cf .sa-cf__select { flex: 1 1 0; min-width: 0; }
	.sa-cf__btn--search { flex: 1 1 0; padding: 0 16px; }

	.sa-cf__filter { flex-direction: column; gap: 6px; margin-top: 14px; }
	.sa-cf__filter-label { flex-basis: auto; padding-top: 0; }

	/* One swipeable row per filter instead of a tall wall of chips */
	.sa-cf__chips {
		flex-wrap: nowrap;
		width: calc(100% + 16px);
		margin-right: -16px;
		padding: 2px 16px 4px 2px;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.sa-cf__chips::-webkit-scrollbar { display: none; }

	.sa-cf__card { padding: 16px 16px 16px 18px; }
	.sa-cf .sa-cf__card-title,
	#page-container .sa-cf .sa-cf__card-title { font-size: 21px; }

	.sa-cf--no-map .sa-cf__list { grid-template-columns: minmax(0, 1fr); }

	.sa-cf__modal { padding: 10px; }
	.sa-cf__modal-box { max-height: 95vh; }
	.sa-cf__modal-head { padding: 16px 18px; }
	.sa-cf__modal-body { padding: 18px 18px 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.sa-cf *,
	.sa-cf__modal-box { animation: none !important; transition: none !important; }
}
