.hpg-wrapper {
	width: 100%;
	font-family: inherit;
}

/* === REGION PILL === */
.hpg-toggles {
	display: flex;
	justify-content: center;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 36px;
}

.hpg-toggle-group {
	display: flex;
	align-items: center;
	gap: 10px;
}

.hpg-toggle-label {
	font-size: 16px;
	font-weight: 500;
	color: #aaa;
}

.hpg-pill-3 {
	position: relative;
	display: flex;
	background: #fff;
	border-radius: 14px;
	border: 1px solid #e0e0e0;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hpg-pill-3 .hpg-pill-slider {
	position: absolute;
	top: 4px;
	left: 4px;
	width: calc(33.333% - 5px);
	height: calc(100% - 8px);
	background: #f0f0ec;
	border-radius: 11px;
	transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 0;
	pointer-events: none;
}

.hpg-pill-3[data-active="1"] .hpg-pill-slider { transform: translateX(calc(100% + 3px)); }
.hpg-pill-3[data-active="2"] .hpg-pill-slider { transform: translateX(calc(200% + 6px)); }

.hpg-pill-btn {
	position: relative;
	z-index: 1;
	border: 0;
	background: transparent;
	padding: 18px 32px;
	font-size: 16px;
	font-family: inherit;
	cursor: pointer;
	color: #555;
	font-weight: 400;
	transition: color 0.2s;
	white-space: nowrap;
}

.hpg-pill-btn.active {
	color: #1a1a2e;
	font-weight: 600;
}

button.hpg-pill-btn:hover,
button.hpg-pill-btn:focus {
	color: #555;
	background: transparent;
}

button.hpg-pill-btn.active:hover,
button.hpg-pill-btn.active:focus {
	color: #1a1a2e;
	background: transparent;
}

.hpg-pill-btn:hover:not(.active) {
	color: #0053A5;
}

.hpg-pill-btn:focus-visible {
	outline: 2px solid #0e6b66;
	outline-offset: 2px;
	border-radius: 8px;
}

/* === TAB PANELS === */
.hpg-tab-panel {
	display: none;
}

.hpg-tab-panel.is-active {
	display: block;
}

.hpg-region-subtitle {
	padding: 12px 18px;
	font-style: italic;
	color: #555;
}

/* === ACCORDION === */
.hpg-accordion {
	background: #0e6b66;
}

.hpg-country + .hpg-country .hpg-country-header {
	border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.hpg-country-header {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 22px;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.hpg-country-header:hover {
	background: rgba(255, 255, 255, 0.05);
}

.hpg-country-header:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -2px;
}

.hpg-country-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	flex-shrink: 0;
}

.hpg-country-header[aria-expanded="true"] .hpg-country-icon::before {
	content: "\2212"; /* − */
}

.hpg-country-header:not([aria-expanded="true"]) .hpg-country-icon::before {
	content: "+";
}

.hpg-country-header .hpg-country-icon {
	font-size: 0;
}

.hpg-country-header .hpg-country-icon::before {
	font-size: 22px;
}

/* === CLUB PANEL === */
.hpg-country-panel {
	background: #fff;
}

.hpg-country-panel[hidden] {
	display: none;
}

.hpg-club-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hpg-state-list {
	padding: 4px 0;
}

.hpg-state-group + .hpg-state-group {
	border-top: 1px solid #eee;
}

.hpg-state-header {
	padding: 14px 22px 6px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #0e6b66;
}

/* Indent on each club instead of the ul (avoids theme ul resets) */
.hpg-state-group .hpg-club {
	padding-left: 44px;
}

.hpg-state-group--no-state .hpg-club {
	padding-left: 22px;
}

.hpg-club {
	padding: 12px 22px;
	border-bottom: 1px solid #e2e2e2;
	font-size: 15px;
	line-height: 1.55;
	color: #222;
}

.hpg-club:last-child {
	border-bottom: 0;
}

/* Club row layout: optional badge | main content | optional logo */
.hpg-club-row {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.hpg-club-badge {
	flex: 0 0 auto;
	position: relative; /* anchor the (?) tooltip to the badge corner */
}

.hpg-club-badge img {
	width: 95px;
	height: auto;
	display: block;
}

/* Pin the tooltip trigger to the top-right corner of the badge. */
.hpg-club-badge .sohg-badge-tooltip {
	position: absolute;
	top: -10px;
	right: -10px;
	margin-left: 0;
}

.hpg-club-main {
	flex: 0 1 auto;
	min-width: 0;
}

/* Badge sits to the left of the field list (not the whole row). */
.hpg-club-body {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

/* Affiliate logo sits to the right of the text block. */
.hpg-club-logo {
	flex: 0 0 auto;
	align-self: flex-start;
	margin-top: 25px;
	margin-left: 25px;
	max-width: 220px;
}

.hpg-club-logo img {
	max-width: 100%;
	height: auto;
	display: block;
}

.hpg-club-name {
	display: inline-block;
	font-size: 17px;
	font-weight: 700;
	color: #1a1a2e;
	margin-bottom: 16px;
	text-decoration: none;
}

a.hpg-club-name:hover,
a.hpg-club-name:focus {
	text-decoration: underline;
}

.hpg-club-fields {
	margin: 0;
}

.hpg-field-row {
	display: flex;
	gap: 10px;
	margin: 2px 0;
}

.hpg-field-label {
	flex: 0 0 auto;
	min-width: 110px;
	color: #777;
	font-weight: 400;
}

.hpg-field-value {
	margin: 0;
	color: #222;
}

.hpg-club a {
	color: #1a6dd6;
	text-decoration: underline;
}

.hpg-club a.hpg-club-name {
	color: #1a1a2e;
	text-decoration: none;
}

.hpg-club a:hover {
	text-decoration: none;
}

/* === VIEW PLAYING GROUP BUTTON === */
.hpg-club-actions {
	margin-top: 10px;
}

.hpg-club .hpg-view-btn {
	display: inline-block;
	padding: 7px 16px;
	background: #000 !important;
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 8px;
	text-decoration: none !important;
	transition: background 0.2s;
}

.hpg-club .hpg-view-btn:hover,
.hpg-club .hpg-view-btn:focus {
	background: #222 !important;
	color: #fff !important;
	text-decoration: none !important;
}

.hpg-club .hpg-view-btn:focus-visible {
	outline: 2px solid #0e6b66;
	outline-offset: 2px;
}

.hpg-empty,
.hpg-empty-clubs {
	padding: 18px 22px;
	color: #555;
	font-style: italic;
}

/* === SINGLE PLAYING GROUP PAGE === */

/* Astra: these pages use a full-width Elementor layout, so undo the theme's
   content/sidebar flex column (and any custom ".ast-container { display:flex }")
   for this CPT only, and drop the sidebar. */
body.single-hpg_playing_group .site-content .ast-container {
	display: block !important;
	max-width: 100% !important;
}

body.single-hpg_playing_group #primary {
	width: 100% !important;
	max-width: 100% !important;
	padding-left: 0;
	padding-right: 0;
}

body.single-hpg_playing_group #secondary {
	display: none !important;
}

.hpg-single {
	max-width: 820px;
	margin: 0 auto;
	padding: 40px 20px;
}

.hpg-single-eyebrow {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: #0e6b66;
	margin: 0 0 8px;
}

.hpg-single-title {
	margin: 0 0 6px;
	line-height: 1.15;
}

.hpg-single-location {
	font-size: 17px;
	color: #555;
	margin: 0 0 28px;
}

.hpg-single-bio {
	font-size: 17px;
	line-height: 1.7;
	color: #222;
}

.hpg-single-section {
	margin-top: 28px;
}

.hpg-single-section h2 {
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #0e6b66;
	margin: 0 0 10px;
}

.hpg-single-meta {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hpg-single-meta li {
	padding: 4px 0;
	font-size: 16px;
}

.hpg-single-links a {
	display: inline-block;
	margin-right: 16px;
	color: #1a6dd6;
}

/* Back to playing groups button (single page + [hpg_back_button]) */
.hpg-back {
	margin-top: 36px;
}

.hpg-back-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: #0e6b66;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.2s;
}

.hpg-back-arrow {
	display: inline-block;
	transition: transform 0.2s;
}

.hpg-back-btn:hover .hpg-back-arrow,
.hpg-back-btn:focus .hpg-back-arrow {
	transform: translateX(-3px);
}

.hpg-back-btn:hover,
.hpg-back-btn:focus {
	background: #0a524e;
	color: #fff;
	text-decoration: none;
}

.hpg-back-btn:focus-visible {
	outline: 2px solid #0e6b66;
	outline-offset: 2px;
}

/* === MOBILE === */
@media (max-width: 560px) {
	.hpg-toggle-group {
		flex-direction: column;
		align-items: stretch;
	}

	.hpg-pill-3 {
		flex-direction: column;
	}

	.hpg-pill-3 .hpg-pill-slider {
		width: calc(100% - 6px);
		height: calc(33.333% - 4px);
	}

	.hpg-pill-3[data-active="1"] .hpg-pill-slider { transform: translateY(calc(100% + 2px)); }
	.hpg-pill-3[data-active="2"] .hpg-pill-slider { transform: translateY(calc(200% + 4px)); }

	.hpg-pill-btn {
		text-align: center;
		padding: 10px 24px;
	}

	.hpg-club {
		padding: 14px 16px;
	}

	.hpg-country-header {
		padding: 14px 16px;
	}

	.hpg-club-row {
		flex-wrap: wrap;
	}

	.hpg-club-body {
		gap: 12px;
	}

	.hpg-club-logo {
		margin-left: 0;
		margin-top: 12px;
		max-width: 200px;
	}

	.hpg-field-row {
		flex-direction: column;
		gap: 0;
	}

	.hpg-field-label {
		min-width: 0;
	}
}
