/* Carry Forward Financial — custom styles
   Everything expressible in theme.json lives there. This file covers the rest:
   block style variations, table styling, and the FAQ accordion. */

/* ---------- Buttons ---------- */

.wp-block-button.is-style-cf-teal .wp-block-button__link {
	background-color: var(--wp--preset--color--teal);
	color: #fff;
}
.wp-block-button.is-style-cf-teal .wp-block-button__link:hover,
.wp-block-button.is-style-cf-teal .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--teal-dark);
}

.wp-block-button.is-style-cf-ghost .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--teal-dark);
	padding: 0 0 3px;
	border-radius: 0;
	border-bottom: 2.5px solid var(--wp--preset--color--teal);
}
.wp-block-button.is-style-cf-ghost .wp-block-button__link:hover,
.wp-block-button.is-style-cf-ghost .wp-block-button__link:focus {
	background-color: transparent;
	color: var(--wp--preset--color--navy);
	border-bottom-color: var(--wp--preset--color--navy);
}

.wp-block-button.is-style-cf-on-dark .wp-block-button__link {
	background-color: #fff;
	color: var(--wp--preset--color--navy-deep);
}
.wp-block-button.is-style-cf-on-dark .wp-block-button__link:hover,
.wp-block-button.is-style-cf-on-dark .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--teal-bright);
	color: var(--wp--preset--color--navy-deep);
}

/* ---------- Cards ---------- */

.is-style-cf-card-teal,
.is-style-cf-card-amber,
.is-style-cf-card-blue,
.is-style-cf-card-navy,
.is-style-cf-card-plain {
	border-radius: 10px;
	padding: 1.35rem;
	height: 100%;
}

.is-style-cf-card-teal  { background-color: var(--wp--preset--color--teal-tint); }
.is-style-cf-card-amber { background-color: var(--wp--preset--color--amber-tint); }
.is-style-cf-card-blue  { background-color: var(--wp--preset--color--blue-tint); }
.is-style-cf-card-plain { background-color: #fff; }
.is-style-cf-card-navy  { background-color: var(--wp--preset--color--navy); }

.is-style-cf-card-teal :where(h1,h2,h3,h4,h5,h6)  { color: var(--wp--preset--color--navy-deep); }
.is-style-cf-card-amber :where(h1,h2,h3,h4,h5,h6) { color: #4A3308; }
.is-style-cf-card-blue :where(h1,h2,h3,h4,h5,h6)  { color: #0C2F53; }

.is-style-cf-card-teal p  { color: #3F6B6B; }
.is-style-cf-card-amber p { color: #7A5A22; }
.is-style-cf-card-blue p  { color: #3A5A7C; }

.is-style-cf-card-navy :where(h1,h2,h3,h4,h5,h6) { color: #fff; }
.is-style-cf-card-navy p { color: #9FBAD2; }
.is-style-cf-card-navy a { color: var(--wp--preset--color--teal-bright); }

/* ---------- Typographic helpers ---------- */

.is-style-cf-eyebrow {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--teal-dark);
	margin-bottom: 0.6rem;
}

.has-navy-background-color .is-style-cf-eyebrow,
.has-navy-deep-background-color .is-style-cf-eyebrow,
.has-teal-dark-background-color .is-style-cf-eyebrow {
	color: var(--wp--preset--color--teal-bright);
}

.is-style-cf-lede {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
}

/* ---------- Dark sections ---------- */

.has-navy-background-color :where(h1,h2,h3,h4,h5,h6),
.has-navy-deep-background-color :where(h1,h2,h3,h4,h5,h6),
.has-teal-dark-background-color :where(h1,h2,h3,h4,h5,h6) {
	color: #fff;
}

.has-navy-background-color p,
.has-navy-deep-background-color p {
	color: #C3D5E4;
}
.has-teal-dark-background-color p {
	color: #C5E6EA;
}

/* ---------- Comparison and pricing tables ---------- */

.wp-block-table.is-style-cf-compare table {
	border-collapse: collapse;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	font-size: var(--wp--preset--font-size--small);
}
.wp-block-table.is-style-cf-compare thead {
	background: var(--wp--preset--color--navy);
}
.wp-block-table.is-style-cf-compare thead th {
	color: #fff;
	font-weight: 800;
	padding: 0.85rem 1rem;
	border: 0;
	text-align: left;
}
.wp-block-table.is-style-cf-compare thead th:not(:first-child) {
	text-align: center;
}
.wp-block-table.is-style-cf-compare td {
	padding: 0.8rem 1rem;
	border: 0;
	border-bottom: 1px solid #F0EBE1;
	font-weight: 700;
	color: #2A3A4A;
}
.wp-block-table.is-style-cf-compare td:not(:first-child) {
	text-align: center;
	width: 120px;
}
.wp-block-table.is-style-cf-compare tr:last-child td {
	border-bottom: 0;
}

/* ---------- FAQ accordion ---------- */

.wp-block-details.is-style-cf-faq {
	background: #fff;
	border-radius: 10px;
	padding: 1rem 1.25rem;
	margin-bottom: 0.6rem;
	border: 1px solid var(--wp--preset--color--rule);
}
.wp-block-details.is-style-cf-faq summary {
	font-weight: 800;
	color: var(--wp--preset--color--navy-deep);
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 1.75rem;
}
.wp-block-details.is-style-cf-faq summary::-webkit-details-marker { display: none; }
.wp-block-details.is-style-cf-faq summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: -2px;
	font-size: 1.35rem;
	font-weight: 500;
	color: var(--wp--preset--color--teal);
	line-height: 1;
}
.wp-block-details.is-style-cf-faq[open] summary::after { content: "\2013"; }
.wp-block-details.is-style-cf-faq summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--teal-dark);
	outline-offset: 3px;
}

/* ---------- Site header (navy) ---------- */

.cf-header {
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.cf-header .wp-block-site-logo img {
	max-height: 56px;
	width: auto;
}

/* Navy header needs light nav links. These override the sitewide navigation
   colour set in theme.json, so the specificity here is deliberate. */
.cf-header .wp-block-navigation,
.cf-header .wp-block-navigation a,
.cf-header .wp-block-navigation .wp-block-navigation-item__content {
	color: #DCE8F2;
}
.cf-header .wp-block-navigation a:hover,
.cf-header .wp-block-navigation a:focus-visible,
.cf-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--teal-bright);
	text-decoration: underline;
	text-underline-offset: 4px;
}
.cf-header .wp-block-navigation__responsive-container-open,
.cf-header .wp-block-navigation__responsive-container-close {
	color: #ffffff;
}
.cf-header a:focus-visible,
.cf-header button:focus-visible {
	outline-color: var(--wp--preset--color--teal-bright);
}

/* Submenus inside the navy header keep a light panel so they stay readable. */
.cf-header .wp-block-navigation__submenu-container {
	background-color: #ffffff;
	border-color: var(--wp--preset--color--rule);
}
.cf-header .wp-block-navigation__submenu-container a {
	color: var(--wp--preset--color--navy);
}

/* ---------- Photo placeholder ---------- */

.cf-photo-slot {
	border: 2px dashed #9FC4C4;
	border-radius: 10px;
	background: #DCEBEB;
	min-height: 240px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #5C8585;
	font-weight: 700;
	font-size: 0.85rem;
}

/* ---------- Notice pages: deliberately quiet ---------- */

.cf-notice .wp-block-post-content {
	font-size: var(--wp--preset--font-size--medium);
}
.cf-notice h2 {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 2px solid var(--wp--preset--color--teal);
}

/* ---------- Accessibility and motion ---------- */

a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--teal-dark);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 781px) {
	.is-style-cf-card-teal,
	.is-style-cf-card-amber,
	.is-style-cf-card-blue,
	.is-style-cf-card-navy,
	.is-style-cf-card-plain {
		padding: 1.15rem;
	}
	.cf-photo-slot { min-height: 190px; }
	.wp-block-table.is-style-cf-compare td:not(:first-child) { width: 72px; }
}

/* ---------- Footer fine print ---------- */

.cf-fineprint {
	font-size: 0.78rem;
	line-height: 1.7;
	color: #7E97AE;
}
.cf-fineprint a {
	color: #7E97AE;
	text-decoration: underline;
}
.cf-fineprint a:hover {
	color: var(--wp--preset--color--teal-bright);
}

/* Header button sits slightly smaller than body buttons. Set here rather than
   as a block attribute — custom typography attributes on core blocks cause
   validation mismatches when hand-authored in template files. */

.cf-header .wp-block-button__link {
	font-size: 0.9rem;
	padding: 0.65rem 1.1rem;
}
