/* 500 Designs — Givebutter Campaigns widget */

.d500-gb {
	--d500-gb-section-gap: 32px;
	--d500-gb-card-bg: #b8002e;
	--d500-gb-card-fg: #ffffff;
	display: block;
	width: 100%;
	box-sizing: border-box;
}

.d500-gb *,
.d500-gb *::before,
.d500-gb *::after {
	box-sizing: border-box;
}

/* ── Editor-only hint chips (admin discoverability) ──────────────── */

.d500-gb__editor-hint {
	background: #fffbeb;
	border: 1px dashed #d4a017;
	border-radius: 6px;
	padding: 10px 12px;
	margin: 0 0 16px;
	font-size: 12px;
	line-height: 1.6;
	color: #5b3f00;
}

.d500-gb__editor-hint code {
	background: #fde68a;
	color: #7c2d12;
	padding: 1px 6px;
	border-radius: 3px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 11px;
	font-weight: 700;
}

.d500-gb__editor-hint-tip {
	display: inline-block;
	margin-top: 4px;
	color: #78350f;
}

.d500-gb__editor-warn {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	border-left: 4px solid #dc2626;
	border-radius: 6px;
	padding: 10px 12px;
	margin: 0 0 16px;
	font-size: 12px;
	line-height: 1.6;
	color: #7f1d1d;
}

.d500-gb__editor-warn strong {
	color: #991b1b;
	margin-right: 4px;
}

.d500-gb__admin-id {
	display: inline-block;
	background: #fffbeb;
	border: 1px dashed #d4a017;
	color: #78350f;
	font-size: 0.6875rem;
	padding: 1px 6px;
	border-radius: 3px;
	margin-top: 2px;
	letter-spacing: 0.02em;
	font-weight: 500;
}

.d500-gb__admin-id code {
	background: transparent;
	color: #7c2d12;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-weight: 700;
	font-size: 11px;
}

/* ── Anchor Navigation (sticky bar with region links) ────────────── */

.d500-gb__tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 24px;
	border-bottom: 1px solid #e5e7eb;
	margin: 0 0 var(--d500-gb-section-gap);
	padding: 0;
	background: #ffffff;
}

.d500-gb--sticky-nav .d500-gb__tabs {
	position: sticky;
	top: var(--d500-gb-sticky-offset, 0px);
	z-index: 5;
}

.d500-gb .d500-gb__tab-button,
.d500-gb .d500-gb__tab-button:link,
.d500-gb .d500-gb__tab-button:visited,
.d500-gb .d500-gb__tab-button:hover,
.d500-gb .d500-gb__tab-button:focus,
.d500-gb .d500-gb__tab-button:active {
	position: relative;
	background: transparent;
	border: 0;
	margin: 0;
	padding: 12px;
	font: inherit;
	color: inherit;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: none;
	text-decoration: none;
	text-shadow: none;
	transition: color 0.2s ease;
}

.d500-gb .d500-gb__tab-button::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 3px;
	background: transparent;
	transition: background 0.2s ease;
	pointer-events: none;
}

.d500-gb .d500-gb__tab-button[aria-current="true"]::after {
	background: #0e2d4f;
}

.d500-gb .d500-gb__tab-button:focus-visible {
	outline: 2px solid #1d4ed8;
	outline-offset: 4px;
	border-radius: 2px;
}

/* ── Region sections (all visible, stacked) ──────────────────────── */

.d500-gb__panels {
	display: block;
}

.d500-gb__panel {
	display: block;
	scroll-margin-top: calc(var(--d500-gb-sticky-offset, 0px) + 16px);
	outline: none;
}

.d500-gb__panel + .d500-gb__panel {
	margin-top: calc(var(--d500-gb-section-gap) * 2);
}

/* ── Region hero ─────────────────────────────────────────────────── */

.d500-gb__region {
	display: flex;
	flex-direction: column;
	gap: var(--d500-gb-section-gap);
	margin-bottom: var(--d500-gb-section-gap);
}

.d500-gb__region-main-content {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: var(--d500-gb-section-gap);
	align-items: start;
}

.d500-gb__region-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.d500-gb__region-title {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3.5rem);
	line-height: 1.1;
	color: #111827;
}

.d500-gb__region-desc {
	color: #374151;
	line-height: 1.6;
}

.d500-gb__region-desc figure,
.d500-gb__region-desc iframe {
	max-width: 100%;
}

.d500-gb .d500-gb__cta-region,
.d500-gb .d500-gb__cta-region:link,
.d500-gb .d500-gb__cta-region:visited {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	background: #a31d3f;
	color: #ffffff;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	box-shadow: none;
	transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.d500-gb .d500-gb__cta-region:hover,
.d500-gb .d500-gb__cta-region:focus {
	background: #7d1631;
	color: #ffffff;
	text-decoration: none;
}

.d500-gb .d500-gb__cta-region:focus-visible {
	outline: 2px solid #1d4ed8;
	outline-offset: 3px;
}

/* ── Raised card (per-region colors via CSS vars) ────────────────── */

.d500-gb__raised-card {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	gap: 12px;
	padding: 32px;
	background: var(--d500-gb-card-bg);
	color: var(--d500-gb-card-fg);
	border-radius: 0;
	min-height: 220px;
}

.d500-gb__raised-label {
	font-size: 0.875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 600;
	opacity: 0.95;
}

.d500-gb__raised-amount {
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 400;
	line-height: 1;
	font-family: Georgia, "Times New Roman", serif;
}

.d500-gb__donors {
	display: block;
	margin-top: 6px;
	font-size: 0.875rem;
	letter-spacing: 0.04em;
	opacity: 0.9;
}

/* ── Teams ───────────────────────────────────────────────────────── */

.d500-gb__teams-header {
	margin: 0 0 8px;
	padding: 0 0 16px;
	border-bottom: 1px solid #e5e7eb;
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	color: #111827;
}

.d500-gb__teams {
	display: block;
}

.d500-gb__team {
	border-bottom: 1px solid #e5e7eb;
	padding: 20px 0;
	background: #ffffff;
	transition: background 0.15s ease;
}

.d500-gb__team:hover {
	background: #fafafa;
}

.d500-gb .d500-gb__team-summary,
.d500-gb .d500-gb__team-summary:hover,
.d500-gb .d500-gb__team-summary:focus,
.d500-gb .d500-gb__team-summary:active {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: 16px;
	width: 100%;
	background: transparent;
	border: 0;
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-align: left;
	box-shadow: none;
	text-decoration: none;
	text-shadow: none;
}

.d500-gb .d500-gb__team-summary:focus-visible {
	outline: 2px solid #1d4ed8;
	outline-offset: 3px;
	border-radius: 4px;
}

.d500-gb__team-logo {
	width: 64px;
	height: 64px;
	object-fit: contain;
	flex-shrink: 0;
}

.d500-gb__team-name-wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.d500-gb__team-name {
	font-size: 1.25rem;
	font-weight: 500;
	color: #111827;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.d500-gb__supporters {
	font-size: 0.8125rem;
	color: #6b7280;
	font-weight: 400;
}

.d500-gb__team-stats {
	display: inline-flex;
	gap: 12px;
	flex-shrink: 0;
}

.d500-gb__stat {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 20px;
	border-radius: 4px;
	min-width: 110px;
}

.d500-gb__stat--mitts {
	background: #f5b46a;
	color: #1f2937;
}

.d500-gb__stat--dollar {
	background: #a8c69a;
	color: #1f2937;
}

.d500-gb__stat-label {
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-weight: 700;
}

.d500-gb__stat-value {
	font-size: 1.125rem;
	font-weight: 600;
}

.d500-gb__chevron {
	display: inline-block;
	width: 18px;
	height: 18px;
	color: #374151;
	transition: transform 250ms ease;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	flex-shrink: 0;
}

.d500-gb__team-summary[aria-expanded="true"] .d500-gb__chevron {
	transform: rotate(180deg);
}

/* ── Team details (expanded view) ────────────────────────────────── */
/* All rules below are written with `.d500-gb` parent specificity to
   override Elementor's default list / link / image styles cleanly. */

.d500-gb .d500-gb__team-details {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 32px;
	align-items: start;
	margin-top: 20px;
}

.d500-gb .d500-gb__team-details--no-photo {
	grid-template-columns: minmax(0, 1fr);
}

.d500-gb .d500-gb__team-details[hidden] {
	display: none;
}

.d500-gb .d500-gb__team-photo {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	object-fit: cover;
}

.d500-gb .d500-gb__team-right {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
}

.d500-gb .d500-gb__lodges {
	display: block;
	min-width: 0;
}

.d500-gb .d500-gb__lodges-title {
	margin: 0 0 16px;
	font-size: clamp(1.5rem, 3vw, 2rem);
	color: #111827;
	line-height: 1.2;
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 400;
}

.d500-gb .d500-gb__lodges-cols {
	column-count: 2;
	column-gap: 32px;
	margin: 0;
	padding: 0 0 0 1.5em;
	list-style: disc outside;
}

.d500-gb .d500-gb__lodges-cols li {
	display: list-item;
	list-style: disc outside;
	break-inside: avoid;
	margin: 0 0 12px;
	padding: 0;
	color: #374151;
	line-height: 1.5;
}

.d500-gb .d500-gb__lodges-cols li:last-child {
	margin-bottom: 0;
}

/* ── CTA Team ────────────────────────────────────────────────────── */

.d500-gb .d500-gb__cta-team,
.d500-gb .d500-gb__cta-team:link,
.d500-gb .d500-gb__cta-team:visited {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	background: #a31d3f;
	color: #ffffff;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	box-shadow: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.d500-gb .d500-gb__cta-team:hover,
.d500-gb .d500-gb__cta-team:focus {
	background: #7d1631;
	color: #ffffff;
	text-decoration: none;
}

.d500-gb .d500-gb__cta-team:focus-visible {
	outline: 2px solid #1d4ed8;
	outline-offset: 3px;
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.d500-gb__region-main-content {
		grid-template-columns: 1fr;
	}

	.d500-gb .d500-gb__team-summary {
		grid-template-columns: auto 1fr auto;
		grid-template-areas:
			"logo name chevron"
			"stats stats stats";
		row-gap: 12px;
	}

	.d500-gb__team-logo      { grid-area: logo; }
	.d500-gb__team-name-wrap { grid-area: name; }
	.d500-gb__chevron        { grid-area: chevron; }
	.d500-gb__team-stats     { grid-area: stats; }

	.d500-gb .d500-gb__team-details {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.d500-gb__tabs {
		gap: 12px;
		overflow-x: auto;
		flex-wrap: nowrap;
	}

	.d500-gb .d500-gb__tab-button {
		white-space: nowrap;
	}

	.d500-gb .d500-gb__lodges-cols {
		column-count: 1;
	}

	.d500-gb__team-stats {
		flex-wrap: wrap;
	}

	.d500-gb__stat {
		flex: 1 1 calc(50% - 6px);
		min-width: 0;
	}
}
