.gbcc-fp-portal,
.gbcc-fp-access-message {
	--gbcc-fp-primary: #252a62;
	--gbcc-fp-secondary: #d7192d;
	--gbcc-fp-cream: #f7f3ec;
	--gbcc-fp-ink: #1e234f;
	--gbcc-fp-muted: #626574;
	--gbcc-fp-line: #ddd8cf;
	box-sizing: border-box;
	color: var(--gbcc-fp-ink);
	font-family: inherit;
}

/* Hide the theme's duplicated WordPress page title only on the portal page. */
body.gbcc-franchise-portal-page h1.entry-title,
body.gbcc-franchise-portal-page h1.page-title,
body.gbcc-franchise-portal-page .entry-header > .entry-title,
body.gbcc-franchise-portal-page .page-header > .page-title,
body.gbcc-franchise-portal-page .wp-block-post-title {
	display: none !important;
}

.gbcc-fp-portal *,
.gbcc-fp-access-message * {
	box-sizing: border-box;
}

.gbcc-fp-portal {
	max-width: 1180px;
	margin: 28px auto;
	background: var(--gbcc-fp-cream);
	border: 1px solid #e2ddd4;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 20px 55px rgba(21, 27, 67, .10);
}

.gbcc-fp-hero {
	position: relative;
	padding: clamp(30px, 6vw, 64px);
	background: var(--gbcc-fp-primary);
	color: #fff;
	border-left: 8px solid var(--gbcc-fp-secondary);
}

.gbcc-fp-hero::after {
	content: "";
	position: absolute;
	right: -80px;
	top: -115px;
	width: 300px;
	height: 300px;
	border: 42px solid rgba(255, 255, 255, .06);
	border-radius: 50%;
	pointer-events: none;
}

.gbcc-fp-hero h1,
.gbcc-fp-section-heading h2,
.gbcc-fp-event-card h3,
.gbcc-fp-event-card h4,
.gbcc-fp-empty h3,
.gbcc-fp-access-message h2 {
	margin-top: 0;
	color: inherit;
	font-family: inherit;
}

.gbcc-fp-hero h1 {
	max-width: 760px;
	margin-bottom: 12px;
	font-size: clamp(34px, 5vw, 58px);
	line-height: 1.05;
}

.gbcc-fp-hero > p:last-child {
	max-width: 680px;
	margin: 0;
	font-size: 17px;
	line-height: 1.6;
	opacity: .92;
}

.gbcc-fp-eyebrow {
	margin: 0 0 8px;
	color: var(--gbcc-fp-secondary);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .11em;
	line-height: 1.4;
	text-transform: uppercase;
}

.gbcc-fp-hero .gbcc-fp-eyebrow {
	color: #ffd55a;
}

.gbcc-fp-filters {
	display: grid;
	grid-template-columns: minmax(220px, 1.7fr) repeat(2, minmax(150px, .75fr)) auto;
	gap: 14px;
	align-items: end;
	margin: 0;
	padding: 24px clamp(20px, 4vw, 42px);
	background: #fff;
	border-bottom: 1px solid var(--gbcc-fp-line);
}

.gbcc-fp-filter-field label {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 700;
}

.gbcc-fp-filter-field input {
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 9px 12px;
	color: var(--gbcc-fp-ink);
	background: #fff;
	border: 1px solid #bfc1ca;
	border-radius: 7px;
	box-shadow: none;
	font: inherit;
}

.gbcc-fp-filter-field input:focus {
	border-color: var(--gbcc-fp-primary);
	box-shadow: 0 0 0 3px rgba(37, 42, 98, .14);
	outline: none;
}

.gbcc-fp-filter-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.gbcc-fp-filter-actions > a,
.gbcc-fp-admin-link,
.gbcc-fp-support a {
	color: var(--gbcc-fp-primary);
	font-weight: 700;
}

.gbcc-fp-button,
.gbcc-fp-access-message .gbcc-fp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	color: #fff !important;
	background: var(--gbcc-fp-secondary);
	border: 0;
	border-radius: 7px;
	box-shadow: none;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	transition: transform .15s ease, filter .15s ease;
}

.gbcc-fp-button:hover,
.gbcc-fp-button:focus {
	filter: brightness(.92);
	transform: translateY(-1px);
}

.gbcc-fp-button--small {
	min-height: 38px;
	padding: 8px 13px;
	font-size: 13px;
}

.gbcc-fp-section {
	padding: clamp(28px, 5vw, 52px) clamp(20px, 4vw, 42px) 0;
}

.gbcc-fp-section--past {
	padding-bottom: 18px;
}

.gbcc-fp-section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 20px;
}

.gbcc-fp-section-heading h2 {
	margin-bottom: 0;
	font-size: clamp(25px, 3vw, 34px);
}

.gbcc-fp-count {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 10px;
	color: #fff;
	background: var(--gbcc-fp-primary);
	border-radius: 50px;
	font-size: 15px;
	font-weight: 800;
}

.gbcc-fp-event-list {
	display: grid;
	gap: 22px;
}

.gbcc-fp-event-card {
	background: #fff;
	border: 1px solid var(--gbcc-fp-line);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(25, 30, 72, .06);
}

.gbcc-fp-event-card__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	padding: 24px 26px 20px;
	border-top: 5px solid var(--gbcc-fp-primary);
}

.gbcc-fp-event-card__header h3 {
	margin-bottom: 5px;
	font-size: clamp(22px, 3vw, 29px);
	line-height: 1.2;
}

.gbcc-fp-venue {
	margin: 0;
	color: var(--gbcc-fp-muted);
	font-size: 15px;
}

.gbcc-fp-card-badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 7px;
}

.gbcc-fp-badge {
	display: inline-block;
	padding: 6px 10px;
	color: #fff;
	background: #686b79;
	border-radius: 50px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .035em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

.gbcc-fp-badge--paid { background: #247647; }
.gbcc-fp-badge--awaiting_payment { background: #a45c00; }
.gbcc-fp-badge--invoice_uploaded { background: #316194; }
.gbcc-fp-badge--cancelled { background: #9d2d38; }
.gbcc-fp-badge--draft { background: #555; }

.gbcc-fp-event-card__body {
	padding: 0 26px 24px;
}

.gbcc-fp-detail-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	background: var(--gbcc-fp-line);
	border: 1px solid var(--gbcc-fp-line);
	border-radius: 8px;
	overflow: hidden;
}

.gbcc-fp-detail {
	padding: 14px 16px;
	background: #fff;
}

.gbcc-fp-detail--wide {
	grid-column: 1 / -1;
}

.gbcc-fp-detail span,
.gbcc-fp-financials span {
	display: block;
	margin-bottom: 3px;
	color: var(--gbcc-fp-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .025em;
	text-transform: uppercase;
}

.gbcc-fp-detail strong {
	display: block;
	font-size: 15px;
	font-weight: 650;
	line-height: 1.55;
}

.gbcc-fp-requirements {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}

.gbcc-fp-requirements > span {
	padding: 7px 10px;
	background: var(--gbcc-fp-cream);
	border: 1px solid #e6e0d5;
	border-radius: 6px;
	font-size: 12px;
}

.gbcc-fp-financials {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin-top: 18px;
	padding: 16px;
	color: #fff;
	background: var(--gbcc-fp-primary);
	border-radius: 8px;
}

.gbcc-fp-financials span { color: rgba(255, 255, 255, .72); }
.gbcc-fp-financials strong { font-size: 18px; }

.gbcc-fp-notes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 18px;
}

.gbcc-fp-notes > div {
	padding: 16px;
	background: #fffaf1;
	border-left: 4px solid var(--gbcc-fp-secondary);
	border-radius: 5px;
}

.gbcc-fp-notes h4 {
	margin-bottom: 5px;
	font-size: 14px;
}

.gbcc-fp-notes p {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
}

.gbcc-fp-event-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 26px;
	background: #f7f8fb;
	border-top: 1px solid var(--gbcc-fp-line);
}

.gbcc-fp-invoice-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.gbcc-fp-invoice-links > strong,
.gbcc-fp-no-invoice {
	font-size: 13px;
}

.gbcc-fp-empty {
	padding: 30px;
	background: rgba(255, 255, 255, .72);
	border: 1px dashed #c5c0b7;
	border-radius: 10px;
	text-align: center;
}

.gbcc-fp-empty h3 { margin-bottom: 5px; }
.gbcc-fp-empty p { margin: 0; }

.gbcc-fp-support {
	padding: 28px 42px 36px;
	text-align: center;
}

.gbcc-fp-support p { margin: 0; }

.gbcc-fp-access-message {
	max-width: 720px;
	margin: 32px auto;
	padding: clamp(24px, 5vw, 44px);
	background: #f7f3ec;
	border: 1px solid #ddd8cf;
	border-left: 7px solid var(--gbcc-fp-secondary);
	border-radius: 12px;
	box-shadow: 0 12px 35px rgba(21, 27, 67, .08);
}

.gbcc-fp-access-message h2 { margin-bottom: 8px; }
.gbcc-fp-access-message p { margin: 0 0 18px; line-height: 1.6; }

@media (max-width: 820px) {
	.gbcc-fp-filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gbcc-fp-filter-field--search,
	.gbcc-fp-filter-actions {
		grid-column: 1 / -1;
	}

	.gbcc-fp-financials {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.gbcc-fp-portal {
		margin: 16px -10px;
		border-radius: 10px;
	}

	.gbcc-fp-hero {
		border-left-width: 5px;
	}

	.gbcc-fp-filters,
	.gbcc-fp-detail-grid,
	.gbcc-fp-notes {
		grid-template-columns: 1fr;
	}

	.gbcc-fp-filter-field--search,
	.gbcc-fp-filter-actions,
	.gbcc-fp-detail--wide {
		grid-column: auto;
	}

	.gbcc-fp-filter-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.gbcc-fp-event-card__header,
	.gbcc-fp-event-card__footer {
		align-items: stretch;
		flex-direction: column;
	}

	.gbcc-fp-card-badges {
		justify-content: flex-start;
	}

	.gbcc-fp-financials {
		grid-template-columns: 1fr 1fr;
	}

	.gbcc-fp-invoice-links {
		align-items: stretch;
		flex-direction: column;
	}

	.gbcc-fp-invoice-links .gbcc-fp-button {
		width: 100%;
	}

	.gbcc-fp-support {
		padding-inline: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gbcc-fp-button { transition: none; }
}
