/*
 * KA Events: Seasonal Guides
 *
 * Every class starts with "ka-sg-" so nothing here can change the rest
 * of the site. Colors are the brand palette; change them in one place
 * here at the top.
 */

:root {
	--ka-sg-navy: #003E51;
	--ka-sg-teal-navy: #004F71;
	--ka-sg-text: #34515B;
	--ka-sg-line: #DCE8EC;
	--ka-sg-orange: #FF6900;
	--ka-sg-sky: #5BC2E7;
	--ka-sg-gold-soft: #FFF4C9;
	--ka-sg-sponsor-bg: #FFF6EC;
	--ka-sg-sponsor-line: #FFD2B0;
	--ka-sg-sponsor-text: #A3410A;
}


/* ---------- Headings the shortcodes print ---------- */

.ka-sg-heading {
	scroll-margin-top: 90px; /* room for the sticky header when a link jumps here */
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 32px 0 6px;
	padding-bottom: 8px;
	border-bottom: 3px solid var(--ka-sg-navy);
	color: var(--ka-sg-navy);
}

.ka-sg-count {
	font-size: 14px;
	font-weight: 800;
	color: var(--ka-sg-text);
	white-space: nowrap;
}

/* Day headings in "All Halloween Events by Date" */
.ka-sg-day {
	margin: 26px 0 0;
	padding: 6px 0;
	border-bottom: 2px solid var(--ka-sg-navy);
	font-size: 15px;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ka-sg-navy);
}


/* ---------- One event row ---------- */

.ka-sg-row {
	display: grid;
	grid-template-columns: 78px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: start;
	padding: 14px; /* same side space as the ongoing box, so Save buttons line up */
	border-bottom: 1px solid var(--ka-sg-line);
	scroll-margin-top: 90px; /* room for the sticky header when a link jumps here */
}

/* Sponsored rows: soft orange box, so they stand out in any list */
.ka-sg-row--sponsor {
	margin: 10px 0;
	padding: 14px;
	border: 2px solid var(--ka-sg-sponsor-line);
	border-radius: 14px;
	background: var(--ka-sg-sponsor-bg);
}

/* Briefly highlights the row a link jumped to */
.ka-sg-row:target {
	box-shadow: 0 0 0 3px var(--ka-sg-sky);
	border-radius: 14px;
}

/* The date block */
.ka-sg-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	padding: 8px 4px;
	border-radius: 10px;
	background: var(--ka-sg-gold-soft);
	text-align: center;
	line-height: 1.15;
}
.ka-sg-row--sponsor .ka-sg-date {
	background: #FFE3C2;
}
.ka-sg-date-top {
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6B5300;
}
.ka-sg-date-main {
	font-size: 15px;
	font-weight: 900;
	color: var(--ka-sg-navy);
}
.ka-sg-date-sub {
	font-size: 12px;
	font-weight: 800;
	color: var(--ka-sg-teal-navy);
}

/* Name, place, labels, details */
.ka-sg-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.ka-sg-badge {
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ka-sg-sponsor-text);
}
body .ka-sg-title.ka-sg-title {
	font-size: 17px;
	line-height: 1.3;
	font-weight: 900;
	color: var(--ka-sg-navy);
	text-decoration: none;
}
.ka-sg-title:hover,
.ka-sg-title:focus {
	text-decoration: underline;
}
.ka-sg-meta {
	font-size: 14px;
	line-height: 1.45;
	color: var(--ka-sg-text);
}
.ka-sg-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.ka-sg-tags:empty {
	display: none;
}
.ka-sg-pill {
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
}
.ka-sg-pill--highlight {
	background: #FFE9D6;
	color: #8A3B00;
}
.ka-sg-pill--free {
	background: #DDF1EE;
	color: #1F5F56;
}

/* "Details": opens in the browser, no JavaScript needed */
.ka-sg-details summary {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 800;
	color: var(--ka-sg-teal-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
	list-style: none;
}
.ka-sg-details summary::-webkit-details-marker {
	display: none;
}
.ka-sg-details[open] summary {
	margin-bottom: 6px;
}
.ka-sg-notes {
	padding: 10px 12px;
	border-radius: 8px;
	background: #F2FAFD;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ka-sg-text);
}
.ka-sg-notes p:last-child,
.ka-sg-notes ul:last-child {
	margin-bottom: 0;
}

/* Photo (sponsored rows) and the save heart */
.ka-sg-side {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}
.ka-sg-photo {
	width: 132px;
	height: auto;
	aspect-ratio: 740 / 400;
	object-fit: cover;
	border-radius: 8px;
}

/* Compact rows in the county lists: a little tighter than the main list */
.ka-sg-row--compact {
	padding-top: 12px;
	padding-bottom: 12px;
}
.ka-sg-row--compact.ka-sg-row--sponsor {
	padding: 12px;
	margin: 8px 0;
}
body .ka-sg-more {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	font-size: 13px;
	font-weight: 800;
	color: var(--ka-sg-teal-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* The save heart: hidden until My Plan switches it on */
.ka-sg-side .ka-save[hidden] {
	display: none;
}
/* The Save pill, matching the calendar's. My Plan fills each button
   with a heart and the word "Save" (or "Saved"); these rules give it
   the calendar's look on guide pages too. The repeated class names
   and !important beat the theme's own button styles. */
.ka-sg-side button.ka-save.ka-save--card.ka-save--card {
	position: relative;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	width: auto;
	height: 32px;
	min-height: 0;
	margin: 0;
	padding: 0 12px;
	background: #FFFFFF !important;
	border: 1.5px solid #CBD6DA !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	color: #003E51 !important;
	font-family: inherit;
	font-size: 13px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	white-space: nowrap;
	cursor: pointer;
}
/* An invisible edge makes the tap area about 44px tall on phones */
.ka-sg-side button.ka-save.ka-save--card.ka-save--card::before {
	content: "";
	position: absolute;
	inset: -6px -4px;
}
.ka-sg-side button.ka-save.ka-save--card.ka-save--card .ka-heart {
	display: block;
	width: 15px;
	height: 15px;
}
.ka-sg-side button.ka-save.ka-save--card.ka-save--card:hover {
	border-color: #FF6900 !important;
}
/* Saved: peach with an orange heart and the word "Saved" */
.ka-sg-side button.ka-save.ka-save--card.ka-save--card.is-saved {
	background: #FFF1E8 !important;
	border-color: #FF6900 !important;
	color: #C43A00 !important;
}

/* Phones: photo moves under the text so the name has room */
@media (max-width: 560px) {
	.ka-sg-row {
		grid-template-columns: 66px minmax(0, 1fr);
	}
	.ka-sg-side {
		grid-column: 2;
	}
	.ka-sg-photo {
		width: 100%;
		max-width: 260px;
	}
}


/* ---------- Featured strip ---------- */

.ka-sg-featured {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	gap: 14px;
	margin: 12px 0 24px;
}
.ka-sg-feature {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 12px;
	border: 2px solid var(--ka-sg-sponsor-line);
	border-radius: 14px;
	background: var(--ka-sg-sponsor-bg);
	color: var(--ka-sg-navy);
	text-decoration: none;
}
.ka-sg-feature-photo {
	flex-shrink: 0;
	width: 128px;
	height: auto;
	aspect-ratio: 740 / 400;
	object-fit: cover;
	border-radius: 8px;
}
.ka-sg-feature-photo--none {
	display: block;
	background: #F6E7B8;
}
.ka-sg-feature-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}
.ka-sg-feature-title {
	font-size: 16px;
	line-height: 1.25;
	font-weight: 900;
}
.ka-sg-feature-when {
	font-size: 13px;
	font-weight: 700;
	color: var(--ka-sg-text);
}


/* ---------- Counties ---------- */

/* "Jump to your county": a light box with an even grid of buttons */
.ka-sg-jump {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 16px 0 8px;
	padding: 16px 18px;
	border-radius: 14px;
	background: #F2FAFD;
	scroll-margin-top: 90px;
}
.ka-sg-jump-label {
	font-size: 15px;
	font-weight: 900;
	color: var(--ka-sg-navy);
}
.ka-sg-jump-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
	gap: 8px;
}
body .ka-sg-jump-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 48px;
	padding: 0 12px;
	border: 2px solid var(--ka-accent, var(--ka-sg-sky));
	border-radius: 10px;
	background: #FFFFFF;
	color: var(--ka-sg-navy);
	font-size: 16px;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
}
body .ka-sg-jump-link:hover,
body .ka-sg-jump-link:focus {
	background: var(--ka-sg-navy);
	border-color: var(--ka-sg-navy);
	color: #FFFFFF;
}
.ka-sg-jump-n {
	font-weight: 700;
	opacity: 0.8;
}

/* Each county's heading, with its Golly */
.ka-sg-county {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	margin-top: 28px;
	padding-bottom: 8px;
	border-bottom: 3px solid var(--ka-accent, var(--ka-sg-orange));
	scroll-margin-top: 90px;
}
.ka-sg-golly {
	flex-shrink: 0;
	width: 46px;
	height: auto;
}
.ka-sg-county-name {
	flex: 1;
	margin: 0;
	color: var(--ka-sg-navy);
}

/* The one-line county entries */
.ka-sg-line {
	display: grid;
	grid-template-columns: 170px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: baseline;
	min-height: 44px;
	padding: 9px 0;
	border-bottom: 1px solid #E1F2F9;
	color: var(--ka-sg-navy);
	text-decoration: none;
}
.ka-sg-line:hover .ka-sg-line-name,
.ka-sg-line:focus .ka-sg-line-name {
	text-decoration: underline;
}
.ka-sg-line--sponsor {
	padding-left: 10px;
	padding-right: 10px;
	border-radius: 8px;
	background: var(--ka-sg-sponsor-bg);
}
.ka-sg-line-when {
	white-space: nowrap; /* keeps "Fri, Oct 23 · 5:30 PM" on one line */
	font-size: 14px;
	font-weight: 800;
	color: var(--ka-sg-teal-navy);
}
.ka-sg-line-name {
	font-size: 16px;
	font-weight: 800;
}
.ka-sg-line-town {
	font-size: 14px;
	font-weight: 400;
	color: var(--ka-sg-text);
}
.ka-sg-line-tag {
	font-size: 12px;
	font-weight: 800;
	color: #1F5F56;
}
.ka-sg-line-tag--sponsor {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ka-sg-sponsor-text);
}
@media (max-width: 560px) {
	.ka-sg-line {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 2px 10px;
	}
	.ka-sg-line-when {
		grid-column: 1 / -1;
	}
}

.ka-sg-back {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	margin-top: 8px;
	font-size: 14px;
	font-weight: 800;
	color: var(--ka-sg-teal-navy);
	text-underline-offset: 3px;
}


/* ---------- Pinned event card ---------- */

.ka-sg-pin {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-start;
	margin: 20px 0;
	padding: 16px;
	border: 2px solid #E1F2F9;
	border-radius: 14px;
}
.ka-sg-pin--sponsor {
	border-color: var(--ka-sg-sponsor-line);
	background: var(--ka-sg-sponsor-bg);
}
.ka-sg-pin-photo {
	flex: 0 0 auto;
	width: min(100%, 260px);
	height: auto;
	aspect-ratio: 740 / 400;
	object-fit: cover;
	border-radius: 10px;
}
.ka-sg-pin-body {
	flex: 1 1 260px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.ka-sg-pin-title {
	font-size: 20px;
	line-height: 1.25;
	font-weight: 900;
	color: var(--ka-sg-navy);
	text-decoration: none;
}
.ka-sg-pin-when {
	font-size: 15px;
	font-weight: 800;
	color: var(--ka-sg-teal-navy);
}
.ka-sg-pin-text {
	margin: 4px 0 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ka-sg-text);
}
.ka-sg-pin-more {
	font-size: 14px;
	font-weight: 800;
	color: var(--ka-sg-teal-navy);
}


/* ---------- Search ---------- */

.ka-sg-search {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 20px 0;
	padding: 18px 20px;
	border: 2px solid var(--ka-sg-sky);
	border-radius: 14px;
}
.ka-sg-search-label {
	font-size: 17px;
	font-weight: 900;
	color: var(--ka-sg-navy);
}
.ka-sg-search-fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 210px);
	gap: 10px;
}
.ka-sg-search-input,
.ka-sg-search-county {
	min-width: 0;
	min-height: 48px;
	padding: 0 12px;
	border: 2px solid #9FC9D6;
	border-radius: 10px;
	background: #FFFFFF;
	color: var(--ka-sg-navy);
	font: inherit;
	font-size: 16px; /* 16px stops iPhones from zooming in */
}
@media (max-width: 560px) {
	.ka-sg-search-fields {
		grid-template-columns: 1fr;
	}
}
.ka-sg-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ka-sg-chip {
	min-height: 40px;
	padding: 0 14px;
	border: 2px solid #9FC9D6;
	border-radius: 999px;
	background: #FFFFFF;
	color: var(--ka-sg-navy);
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
}
.ka-sg-chip[aria-pressed="true"] {
	border-color: var(--ka-sg-navy);
	background: var(--ka-sg-navy);
	color: #FFFFFF;
}
.ka-sg-clear {
	min-height: 40px;
	padding: 0 8px;
	border: 0;
	background: transparent;
	color: var(--ka-sg-teal-navy);
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	text-decoration: underline;
	cursor: pointer;
}
.ka-sg-results-count {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 800;
	color: var(--ka-sg-navy);
}
.ka-sg-result {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 12px;
	align-items: baseline;
	min-height: 44px;
	padding: 9px 0;
	border-top: 1px solid #E1F2F9;
	color: var(--ka-sg-navy);
	text-decoration: none;
}
.ka-sg-result-when {
	font-size: 14px;
	font-weight: 800;
	color: var(--ka-sg-teal-navy);
}
.ka-sg-result-name {
	font-size: 16px;
	font-weight: 800;
}
.ka-sg-result-place {
	font-size: 14px;
	font-weight: 400;
	color: var(--ka-sg-text);
}

.ka-sg-empty {
	margin: 10px 0;
	padding: 12px 14px;
	border: 2px dashed #9FC9D6;
	border-radius: 10px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ka-sg-text);
}

/* Anything the script hides because its date has passed */
.ka-sg-past {
	display: none !important;
}


/* ---------- Classes for the editorial parts of the post ----------
 * Your theme styles headings and links its own way. These classes give
 * the guide's editorial pieces a fixed look instead. They're added in
 * the block editor under Block → Advanced → Additional CSS class(es).
 * "body" at the front of each rule makes it win over the theme's styles.
 */

/* Deep Navy section header: a Heading block with class ka-sg-band */
body h2.ka-sg-band,
body h3.ka-sg-band {
	margin: 40px 0 16px;
	padding: 18px 22px;
	background: var(--ka-sg-navy);
	color: #FFFFFF;
	font-size: clamp(22px, 3vw, 28px);
	line-height: 1.2;
	scroll-margin-top: 90px;
}

/* Optional title colors for a band, added after ka-sg-band:
   ka-sg-band--orange, ka-sg-band--gold, ka-sg-band--sky */
body .ka-sg-band--orange { color: #FF6900; }
body .ka-sg-band--gold { color: #FBD872; }
body .ka-sg-band--sky { color: #5BC2E7; }

/* The Driving Tour box: a Group block with class ka-sg-tour.
   Padding, navy text that the theme can't recolor, white route cards. */
body .ka-sg-tour {
	position: relative;
	margin: 40px 0;
	padding: 30px 28px 28px;
	border: 2px solid #BFE6F5;
	border-radius: 18px;
	background: #E8F6FC; /* a light sky blue: easier to read than the bright one */
	color: var(--ka-sg-navy);
	scroll-margin-top: 90px;
}
/* Two columns: the writing on the left, the route cards on the right.
   On phones they stack (the Columns block does that on its own). */
body .ka-sg-tour .wp-block-columns {
	gap: 28px;
	margin: 0;
}
body .ka-sg-tour .wp-block-column > *:last-child {
	margin-bottom: 0;
}
/* A little Golly peeking over the top corner */
body .ka-sg-tour::before {
	content: "";
	position: absolute;
	top: -30px;
	right: 22px;
	width: 62px;
	height: 74px;
	background: url("../img/golly-orange.png") no-repeat center / contain;
	transform: rotate(8deg);
}
body .ka-sg-tour h2,
body .ka-sg-tour h3,
body .ka-sg-tour p {
	color: var(--ka-sg-navy);
}
body .ka-sg-tour h2 {
	margin: 0 0 12px;
	padding-right: 70px; /* room for Golly */
}
body .ka-sg-tour p {
	margin: 0 0 16px;
	font-size: 17px;
	line-height: 1.65;
}
body .ka-sg-tour p a {
	color: var(--ka-sg-navy);
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 3px;
}
/* The route photos (a Gallery block) as white cards, name under the photo */
body .ka-sg-tour .wp-block-gallery {
	gap: 12px;
	margin: 0;
}
body .ka-sg-tour .wp-block-gallery figure.wp-block-image {
	flex-direction: column;
	overflow: hidden;
	border-radius: 12px;
	background: #FFFFFF;
}
body .ka-sg-tour .wp-block-gallery figure.wp-block-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
body .ka-sg-tour .wp-block-gallery figure.wp-block-image figcaption {
	position: static;
	max-height: none;
	margin: 0;
	padding: 12px 14px;
	background: #FFFFFF;
	color: var(--ka-sg-navy);
	font-size: 15px;
	font-weight: 900;
	text-align: left;
	text-shadow: none;
}
body .ka-sg-tour .wp-block-gallery figure.wp-block-image {
	border: 2px solid #BFE6F5;
}
body .ka-sg-tour .wp-block-gallery figure.wp-block-image figcaption::after {
	content: " ›";
}
body .ka-sg-tour .wp-block-buttons {
	justify-content: flex-start;
}
body .ka-sg-tour .wp-block-button__link {
	background: var(--ka-sg-navy);
	color: #FFFFFF;
	border-radius: 999px;
	font-weight: 900;
}

/* The spirit line band at the top: a Group block with class ka-sg-spirit */
body .ka-sg-spirit {
	padding: 26px 20px 22px;
	background: var(--ka-sg-navy);
	text-align: center;
}
body .ka-sg-spirit p {
	margin: 0;
	line-height: 1.1;
}

/* "This guide is presented by": a Group block with class ka-sg-presenting */
body .ka-sg-presenting {
	margin: 28px 0;
	scroll-margin-top: 90px;
}
body .ka-sg-presenting .ka-sg-presenting-label {
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--ka-sg-gold, #FBD872);
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ka-sg-text);
}
body .ka-sg-presenting img {
	border-radius: 12px;
}
body .ka-sg-presenting .ka-sg-sponsor-name {
	margin: 12px 0 4px;
	font-size: 21px;
	line-height: 1.25;
	font-weight: 900;
	color: var(--ka-sg-navy);
}
body .ka-sg-presenting .ka-sg-sponsor-text {
	margin: 0 0 6px;
	font-size: 16px;
	line-height: 1.55;
	color: var(--ka-sg-text);
}
body .ka-sg-presenting .ka-sg-sponsor-when {
	margin: 0;
	font-size: 14px;
	font-weight: 800;
	color: var(--ka-sg-teal-navy);
}

/* The navigation list: a Group block with class ka-sg-nav */
body .ka-sg-nav {
	margin: 24px 0;
	padding: 18px 22px;
	border-radius: 14px;
	background: #F2FAFD;
}
body .ka-sg-nav .ka-sg-nav-title {
	margin: 0 0 10px;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 900;
	color: var(--ka-sg-navy);
}
/* The links become an even grid of buttons */
body .ka-sg-nav ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
body .ka-sg-nav li {
	margin: 0;
	padding: 0;
}
body .ka-sg-nav li::before,
body .ka-sg-nav li::marker {
	content: none; /* no bullets */
}
body .ka-sg-nav a {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 52px;
	padding: 10px 14px;
	box-sizing: border-box;
	border: 2px solid #BFE6F5;
	border-radius: 10px;
	background: #FFFFFF;
	color: var(--ka-sg-navy);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
}
body .ka-sg-nav a:hover,
body .ka-sg-nav a:focus {
	border-color: var(--ka-sg-navy);
	background: var(--ka-sg-navy);
	color: #FFFFFF;
}
/* The first button (Submit Your Halloween Event) stands out in orange */
body .ka-sg-nav li:first-child a {
	border-color: var(--ka-sg-orange);
	background: var(--ka-sg-orange);
	color: #2B1300;
}
body .ka-sg-nav li:first-child a:hover,
body .ka-sg-nav li:first-child a:focus {
	border-color: var(--ka-sg-navy);
	background: var(--ka-sg-navy);
	color: #FFFFFF;
}

/* The closing box: a Group block with class ka-sg-closing */
body .ka-sg-closing {
	margin: 36px 0 20px;
	padding: 22px 24px;
	border-radius: 14px;
	background: #FFF1E6;
}
body .ka-sg-closing .ka-sg-closing-title {
	margin: 0 0 6px;
	font-size: 21px;
	font-weight: 900;
	color: var(--ka-sg-navy);
}

/* Ongoing (multi-day) events at the top of each day in All Events by
   Date: one light box, quiet one-line entries */
.ka-sg-ongoing-box {
	margin: 12px 0 4px;
	padding: 6px 14px 4px;
	border-radius: 12px;
	background: #F2FAFD;
}
body .ka-sg-ongoing-label {
	margin: 6px 0 2px;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.04em;
	color: var(--ka-sg-navy);
}
.ka-sg-ongoing {
	display: grid;
	grid-template-columns: 78px minmax(0, 1fr) auto; /* 78px: as wide as a row's date block */
	gap: 14px;
	align-items: center;
	padding: 7px 0;
	border-bottom: 1px dashed #CFE3EA;
}
.ka-sg-ongoing:last-child {
	border-bottom: 0;
}
.ka-sg-ongoing-time {
	font-size: 13px;
	font-weight: 800;
	color: var(--ka-sg-text);
	text-align: center;
}
.ka-sg-ongoing-text {
	min-width: 0;
	font-size: 15px;
	line-height: 1.4;
}
body .ka-sg-ongoing-name {
	font-weight: 700;
	color: var(--ka-sg-navy);
	text-decoration: none;
}
body .ka-sg-ongoing-name:hover,
body .ka-sg-ongoing-name:focus {
	text-decoration: underline;
}
.ka-sg-ongoing-meta {
	font-size: 14px;
	color: var(--ka-sg-text);
}
@media (max-width: 560px) {
	.ka-sg-ongoing {
		grid-template-columns: 66px minmax(0, 1fr) auto; /* matches a row's date block on phones */
	}
}


/* ---------- Season-long attractions: small cards ----------
   Built from regular blocks, like the "presented by" section:
     Group  (class ka-sg-season)        the whole section
       Heading (class ka-sg-heading)    "Happening All Season"
       Paragraph (ka-sg-season-intro)   one short line
       Group, Grid layout (ka-sg-season-grid)
         Group (ka-sg-season-card)      one card per attraction
           Image (optional)
           Paragraph ka-sg-season-name  name, linked
           Paragraph ka-sg-season-when  dates and hours
           Paragraph ka-sg-season-town  place
           Paragraph ka-sg-season-more  "See more" link
   The Grid layout on the Group block does the 3-across columns (and
   stacks them on phones), so this file only handles the look.
   "body" at the front of each rule makes it outrank the theme. */

body .ka-sg-season {
	margin: 32px 0;
}

/* The section heading: navy and a steady size, so the theme can't turn
   it into its big sky-blue display heading */
body .ka-sg-season h2.ka-sg-heading {
	font-size: 26px;
	line-height: 1.15;
	color: var(--ka-sg-navy);
}

body .ka-sg-season .ka-sg-season-intro {
	margin: 10px 0 14px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ka-sg-text);
}

/* One card: a white box with a thin border. The lines inside sit
   close together, and "See more" is pushed to the bottom so every
   card in a row lines up. */
body .ka-sg-season-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px;
	border: 1.5px solid var(--ka-sg-line);
	border-radius: 14px;
	background: #FFFFFF;
	scroll-margin-top: 90px; /* room for the sticky header when a link jumps here */
}
body .ka-sg-season-card > * {
	margin: 0; /* WordPress adds space between blocks; the gap above replaces it */
}

/* Optional photo at the top of a card, cropped to the 740 × 400 shape */
body .ka-sg-season-card .wp-block-image {
	margin-bottom: 6px;
}
body .ka-sg-season-card .wp-block-image img {
	width: 100%;
	aspect-ratio: 740 / 400;
	object-fit: cover;
	border-radius: 10px;
}

body .ka-sg-season-card .ka-sg-season-name {
	font-size: 17px;
	line-height: 1.25;
	font-weight: 900;
}
/* Navy links, not the theme's orange-red */
body .ka-sg-season-card .ka-sg-season-name a {
	color: var(--ka-sg-navy);
	text-decoration: none;
}
body .ka-sg-season-card .ka-sg-season-name a:hover,
body .ka-sg-season-card .ka-sg-season-name a:focus {
	text-decoration: underline;
}

body .ka-sg-season-card .ka-sg-season-when {
	font-size: 13px;
	line-height: 1.45;
	font-weight: 800;
	color: var(--ka-sg-teal-navy);
}

body .ka-sg-season-card .ka-sg-season-town {
	font-size: 14px;
	line-height: 1.4;
	color: var(--ka-sg-text);
}

body .ka-sg-season-card .ka-sg-season-more {
	margin-top: auto; /* pushes the link to the bottom of the card */
	padding-top: 6px;
	font-size: 13px;
	font-weight: 800;
}
body .ka-sg-season-card .ka-sg-season-more a {
	color: var(--ka-sg-teal-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* "See more" jumps can land on a card: a light ring shows which one */
body .ka-sg-season-card:target {
	box-shadow: 0 0 0 3px var(--ka-sg-sky);
}

/* My Plan's Save pill on season cards.
   My Plan puts it in a card's top-right corner, where it covers longer
   names. On these cards it moves to the bottom-right instead, on the
   same line as "See more". That line is made as tall as the pill
   (32px), so the pill never sits on top of the dates or the town.
   The long selector is needed to outrank My Plan's own corner rule. */
body .ka-sg-season-card.ka-plan-block > button.ka-save.ka-save--block:not(.ka-save--inline) {
	top: auto;
	right: 12px;
	bottom: 12px;
}
body .ka-sg-season-card.ka-plan-block > .ka-sg-season-more {
	display: flex;
	align-items: center;
	min-height: 32px;
	padding-right: 100px; /* keeps "See more" clear of the pill */
}

/* ---------- Added in 1.0.12 ---------- */

/* Jump-to box: a button with the class ka-sg-nav-feature (set on the
   List item block, under Advanced → Additional CSS class) gets a sky
   blue fill, so it stands out next to the orange first button.
   Used for "Our Full Holiday Guide". */
body .ka-sg-nav li.ka-sg-nav-feature a {
	border-color: var(--ka-sg-sky);
	background: var(--ka-sg-sky);
	color: var(--ka-sg-navy);
}
body .ka-sg-nav li.ka-sg-nav-feature a:hover,
body .ka-sg-nav li.ka-sg-nav-feature a:focus {
	border-color: var(--ka-sg-navy);
	background: var(--ka-sg-navy);
	color: #FFFFFF;
}

/* Season cards: an optional sentence or two under the town line */
body .ka-sg-season-card .ka-sg-season-text {
	font-size: 14px;
	line-height: 1.5;
	color: var(--ka-sg-text);
}

/* Season cards: an optional small tag above the name, like
   "Reserve ahead" or "Sells out" (peach). Add the class
   ka-sg-season-tag--good as well for good news like "Free photo"
   (green). */
body .ka-sg-season-card .ka-sg-season-tag {
	align-self: flex-start;
	padding: 2px 9px;
	border-radius: 999px;
	background: #FFE9DA;
	color: #A3410A;
	font-size: 12px;
	line-height: 1.5;
	font-weight: 800;
}
body .ka-sg-season-card .ka-sg-season-tag.ka-sg-season-tag--good {
	background: #DDF1EE;
	color: #1F5F56;
}

/* ---------- Added in 1.0.14: layout="cards" ----------
   [ka_seasonal_events layout="cards"] puts each day's events in a grid
   of cards instead of rows. Each card is the same row (class
   ka-sg-row--card added), rearranged here:
     photo (sponsors with an image), full width
     date chip on the left, Save on the right
     badge, name, place, labels, Details: full width
   It uses flex-wrap and "order" so nothing in the PHP had to move. */

body .ka-sg-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	gap: 14px;
	margin: 14px 0 6px;
}

body .ka-sg-row.ka-sg-row--card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	align-content: flex-start;
	gap: 8px;
	margin: 0;
	padding: 12px;
	border: 1.5px solid var(--ka-sg-line);
	border-radius: 14px;
	background: #FFFFFF;
}
/* Sponsored cards keep their soft orange box */
body .ka-sg-row.ka-sg-row--card.ka-sg-row--sponsor {
	border: 2px solid var(--ka-sg-sponsor-line);
	background: var(--ka-sg-sponsor-bg);
}

/* The photo and the Save pill live in one wrapper in the row; here the
   wrapper steps aside so each can be placed on its own */
body .ka-sg-row--card .ka-sg-side {
	display: contents;
}
body .ka-sg-row--card .ka-sg-photo {
	order: 0;
	width: 100%;
	max-width: none;
	border-radius: 10px;
}

/* The date block becomes a small chip: "SAT  NOV 28  3 PM" */
body .ka-sg-row--card .ka-sg-date {
	order: 1;
	flex-direction: row;
	align-items: baseline;
	gap: 6px;
	margin-right: auto; /* pushes Save to the right */
	padding: 4px 10px;
	border-radius: 999px;
}
body .ka-sg-row--card .ka-sg-date-main {
	font-size: 13px;
}
body .ka-sg-row--card .ka-sg-date-sub {
	font-size: 12px;
}

body .ka-sg-row--card .ka-save {
	order: 2;
}

/* Name, place, labels and Details take the full width below */
body .ka-sg-row--card .ka-sg-body {
	order: 3;
	flex: 1 1 100%;
}

/* ---------- Added in 1.0.16: Happening This Week ---------- */

/* Events the script set aside: after this week, or past the limit */
.ka-sg-later {
	display: none !important;
}

/* The "See all ... events ›" link under the heading */
body .ka-sg-week-more {
	margin: -4px 0 10px;
	text-align: right;
	font-size: 14px;
	font-weight: 800;
}
body .ka-sg-week-more a {
	color: var(--ka-sg-teal-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Guide cards on hub pages: season cards whose photo links to a guide.
   The photo already gets the 740 x 400 crop from the season card rules;
   this just removes the gap a linked image can leave under it. */
body .ka-sg-season-card .wp-block-image a {
	display: block;
}

/* ---------- Added in 1.0.17 ---------- */
/* intro="..." on a list: the paragraph under its heading */
body .ka-sg-list-intro {
	margin: 0 0 14px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--ka-sg-text);
}

/* ---------- Added in 1.0.18, narrowed in 1.0.19 ---------- */
/* Keeps a list's heading together with its first day and first event so
   Raptive can't put an ad between them (see ka_seasonal_sections_html in
   seasonal.php). Day headings are NOT wrapped, so ads still go between days.
   display: contents means the wrapper adds no box of its own, so the
   page looks exactly as it did before. */
.ka-sg-keep {
	display: contents;
}
