/*
Theme Name: Pickleball Club Theme
Description: Lightweight theme for the members-only pickleball club booking site. Pairs with the Pickleball Club Booking plugin.
Author: Mark Compton
Version: 2.19.6
Text Domain: pb-theme
*/

:root {
	--pb-teal: #0f6e56;
	--pb-teal-dark: #085041;
	--pb-lime: #d9e021;
	--pb-lime-dark: #7a8014;
	--pb-navy: #101826;
	--pb-bg: #fafaf7;
	--pb-text: #2c2c2a;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: var(--pb-bg);
	color: var(--pb-text);
	line-height: 1.6;
}

a {
	color: var(--pb-teal-dark);
}

.pb-site-header {
	background: var(--pb-teal);
	color: #fff;
	padding: 18px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
}

.pb-site-header a {
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	font-size: 1.2em;
}

.pb-site-header nav {
	display: flex;
	align-items: center;
}

.pb-site-header nav a {
	margin-left: 18px;
	font-weight: 400;
	font-size: 0.95em;
	opacity: 0.9;
}

.pb-site-header nav a:hover {
	opacity: 1;
	text-decoration: underline;
	text-decoration-color: var(--pb-lime);
}

.pb-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px;
	height: 32px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}

.pb-hamburger span {
	display: block;
	width: 100%;
	height: 2px;
	background: #fff;
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.pb-hamburger-open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.pb-hamburger-open span:nth-child(2) {
	opacity: 0;
}

.pb-hamburger-open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
	.pb-hamburger {
		display: flex;
	}
}

/* ---------- Logged-in app shell (sidebar layout) ---------- */

.pb-app-shell {
	display: flex;
	min-height: 100vh;
}

.pb-sidebar {
	width: 240px;
	flex-shrink: 0;
	background: var(--pb-navy);
	color: #fff;
	display: flex;
	flex-direction: column;
	padding: 20px 0;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

.pb-sidebar-brand {
	padding: 0 20px 18px;
	font-weight: 700;
	font-size: 1.1em;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	margin-bottom: 12px;
}

.pb-sidebar-brand a {
	color: #fff;
	text-decoration: none;
}

.pb-sidebar-nav {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.pb-sidebar-nav a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	padding: 10px 20px;
	font-size: 0.95em;
	border-left: 3px solid transparent;
}

.pb-sidebar-nav a:hover,
.pb-sidebar-nav a.pb-active {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border-left-color: var(--pb-lime);
}

.pb-sidebar-nav a.pb-nav-warning {
	color: #ff9d9d;
}
.pb-sidebar-nav a.pb-nav-warning:hover,
.pb-sidebar-nav a.pb-nav-warning.pb-active {
	border-left-color: #e5484d;
}
.pb-nav-warning-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #e5484d;
	margin-left: 4px;
	vertical-align: middle;
}

.pb-sidebar-section {
	text-transform: uppercase;
	font-size: 0.7em;
	letter-spacing: 0.05em;
	color: rgba(255, 255, 255, 0.5);
	padding: 16px 20px 6px;
}

.pb-sidebar-about {
	margin: 16px 20px 0;
	padding: 16px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 10px;
}

.pb-sidebar-about h5 {
	margin: 0 0 8px;
	font-size: 0.85em;
	color: #fff;
}

.pb-sidebar-about p {
	margin: 0;
	font-size: 0.8em;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.7);
}

.pb-sidebar-nav a.pb-sidebar-logout {
	margin-top: 12px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	color: rgba(255, 255, 255, 0.85);
}

.pb-app-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.pb-app-footer {
	margin-top: auto;
	text-align: center;
	padding: 20px;
	color: #999;
	font-size: 0.82em;
}

.pb-mobile-topbar {
	display: none;
}

.pb-mobile-brand {
	color: #fff;
	text-decoration: none;
	font-weight: 700;
}

.pb-sidebar-toggle {
	display: none;
}

body.pb-sidebar-backdrop::after {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 30;
}

@media (max-width: 900px) {
	.pb-app-shell {
		flex-direction: column;
	}

	.pb-mobile-topbar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		background: var(--pb-navy);
		padding: 14px 20px;
		height: 60px;
		position: sticky;
		top: 0;
		z-index: 36;
	}

	.pb-sidebar-toggle {
		display: flex;
	}

	/* Starts below the topbar rather than overlapping it — the previous
	   z-index-only fix for the close button made the topbar render on
	   top of the sidebar's own content instead of just being clickable,
	   since both started at the same position (top: 0). Giving each its
	   own non-overlapping region avoids that entirely, and still keeps
	   the topbar (and its close button) above the backdrop via z-index. */
	.pb-sidebar {
		position: fixed;
		top: 60px;
		left: -260px;
		bottom: 0;
		height: auto;
		width: 240px;
		z-index: 35;
		transition: left 0.2s ease;
		overflow-y: auto;
	}

	.pb-sidebar.pb-sidebar-open {
		left: 0;
	}

	/* The topbar already shows the club name when the menu is open — this avoided duplicating it right below, which is what caused the overlapping "bleed" text. */
	.pb-sidebar-brand {
		display: none;
	}
}

.pb-hero {
	width: 100%;
	max-height: 420px;
	overflow: hidden;
	position: relative;
}

.pb-hero-logo {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 180px;
	height: 180px;
	object-fit: cover;
	border-radius: 50%;
	border: 4px solid #fff;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
	z-index: 2;
}

.pb-hero-image {
	width: 100%;
	height: 420px;
	object-fit: cover;
	display: block;
}

@media (max-width: 600px) {
	.pb-hero,
	.pb-hero-image {
		height: 200px;
		max-height: 200px;
	}
	.pb-hero-logo {
		width: 90px;
		height: 90px;
	}
}

.pb-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 32px 60px;
}

@media (max-width: 600px) {
	.pb-content {
		padding: 18px 20px 60px;
	}
}

.pb-content h1 {
	color: var(--pb-teal-dark);
	border-bottom: 3px solid var(--pb-lime);
	padding-bottom: 8px;
	display: inline-block;
}

.pb-video-wrap {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	max-width: 640px;
	margin: 12px 0 24px;
	border-radius: 8px;
}

.pb-video-wrap iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 8px;
}

.pb-resource-list {
	max-width: 640px;
}

.pb-resource-list li {
	margin-bottom: 8px;
}

.pb-site-footer {
	text-align: center;
	padding: 20px;
	color: #777;
	font-size: 0.85em;
}

.pb-home-sections {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin-top: 24px;
}

.pb-home-card {
	flex: 1 1 320px;
	min-width: 280px;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 18px 20px;
	background: #fff;
}

.pb-home-card h3 {
	margin: 0 0 12px;
	color: var(--pb-teal-dark);
	border-bottom: 2px solid var(--pb-lime);
	padding-bottom: 6px;
}

.pb-home-session {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 0.92em;
}

.pb-home-session:last-of-type {
	border-bottom: none;
}

.pb-home-session-main {
	font-weight: 600;
	color: #222;
}

.pb-home-session-meta {
	color: #666;
	white-space: nowrap;
	font-size: 0.9em;
}

.pb-home-notice-excerpt {
	margin: 0 0 4px;
	color: #333;
	line-height: 1.5;
}

.pb-home-notice-date {
	margin: 0;
	color: #888;
	font-size: 0.85em;
}

.pb-home-more {
	margin: 14px 0 0;
	font-size: 0.9em;
}

@media (max-width: 600px) {
	.pb-home-sections {
		flex-direction: column;
	}
	.pb-home-session {
		flex-direction: column;
		gap: 2px;
	}
}

