/* ============================================================
   23 — AGM / BBQ ANNOUNCEMENT BANNER
   ============================================================
   Purpose:  Slim, persistent, un-dismissible site-wide
             announcement bar shown directly below the header.
   Markup:   inc/agm-banner.php
   Loads:    Site-wide, but ONLY while the announcement is active
             (auto-hides after the event date — see agm-banner.php)
   Depends:  01-core-tokens-base.css, 02-header-nav-hero.css
   Added:    2026-05-15
   ============================================================ */


/* ------------------------------------------------------------
   SPACE RESERVATION
   ------------------------------------------------------------
   The banner is position:fixed, so it is removed from normal
   flow. We pad the body by the banner's height so no page
   content is ever hidden underneath it.

   --agm-banner-height starts at a sensible default and is then
   refined to the banner's true rendered height by the small
   script in inc/agm-banner.php (handles text wrapping on
   narrow screens).
   ------------------------------------------------------------ */
:root {
	--agm-banner-height: 56px;
}

body.has-agm-banner {
	padding-top: var(--agm-banner-height, 56px);
}


/* ------------------------------------------------------------
   THE BANNER BAR
   ------------------------------------------------------------
   An animated, multi-stop blue gradient with a gold top edge.
   The slow gradient drift gives it life without being
   distracting; it freezes automatically for visitors who have
   "reduce motion" turned on (global rule in 01-core).
   ------------------------------------------------------------ */
.gprs-agm-banner {
	position: fixed;
	top: var(--header-height, 72px);   /* sits directly below the header */
	left: 0;
	right: 0;
	z-index: 900;                      /* above page content, below header dropdowns */
	color: #ffffff;
	background: linear-gradient(100deg,
		#062c5e 0%,
		#0a4f9e 22%,
		#0066cc 42%,
		#2a86da 50%,
		#0066cc 58%,
		#0a4f9e 78%,
		#062c5e 100%);
	background-size: 220% 100%;
	animation: gprs-agm-shift 16s ease-in-out infinite;
	border-top: 2px solid #ffc436;
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.32);
}

@keyframes gprs-agm-shift {
	0%   { background-position:   0% 50%; }
	50%  { background-position: 100% 50%; }
	100% { background-position:   0% 50%; }
}

/* Shift below the WordPress admin bar for logged-in users. */
.admin-bar .gprs-agm-banner {
	top: calc(32px + var(--header-height, 72px));
}
@media (max-width: 782px) {
	.admin-bar .gprs-agm-banner {
		top: calc(46px + var(--header-height, 72px));
	}
}


/* ------------------------------------------------------------
   INNER LAYOUT — gold icon chip + message
   ------------------------------------------------------------ */
.gprs-agm-banner__inner {
	max-width: var(--max-content-width, 1400px);
	margin-inline: auto;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 8px 20px;
}

/* Gold circular icon chip */
.gprs-agm-banner__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	background: linear-gradient(150deg, #ffd877 0%, #ffc436 60%, #f0ad1c 100%);
	color: #0a3a72;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.gprs-agm-banner__text {
	flex: 1 1 auto;
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.45;
	text-align: center;
}

.gprs-agm-banner__text strong {
	font-weight: 800;
}

/* The date pops in warm gold */
.gprs-agm-banner__date {
	color: #ffd877;
	font-weight: 800;
	white-space: nowrap;
}


/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */
@media (max-width: 600px) {
	:root {
		--agm-banner-height: 104px;   /* better pre-JS fallback when text wraps */
	}
	.gprs-agm-banner__inner {
		gap: 10px;
		padding: 8px 14px;
		align-items: flex-start;
	}
	.gprs-agm-banner__icon {
		width: 32px;
		height: 32px;
	}
	.gprs-agm-banner__text {
		font-size: 0.85rem;
		text-align: left;
	}
}
