/* @override 
	https://cbc.pressme.dev/wp-content/themes/cbc/style.css?* */

/* 
Theme Name:		 Cessnock Business Chamber
Description:	 A child theme of dustin.com.au.
Author:			 dustin.com.au
Author URI:		 https://dustin.com.au/
Template:		 dustin-neue
Version:		 1.0.0
Text Domain:	 cbc
*/


.mp-business-type-links,
.mp-business-type-links a.mp-business-type-link {
	color: #fff;
}

.mp-business-type-links a.mp-business-type-link {
	padding: 4px;
}

a.mp-field {
	color: #016e83;
}

.member-grid .member-item {
	min-height: 300px!important;
}

/* Trailing price bits — "incl. GST" (tax suffix) and "/ year" (period):
   20% smaller than the amount, 4px offset from it. */
.woocommerce-price-suffix,
.subscription-details {
	padding-left: 4px;
	font-size: 80%;
}

.woocommerce-page h2 {
	font-size: 180%!important;
}

.woocommerce-page h3 {
	font-size: 135%!important;
	font-weight: bold!important;
}

.woocommerce-page .wp-element-button {
	border: 2px solid #05447c;
	transition: all .2s;
}

.woocommerce-page .wp-element-button:hover {
	background-color: #05447c;
	transition: all .2s;
}

.woocommerce-page button .wc-block-components-button__text {
	font-weight: bold!important;
	color: #05447c!important;
	transition: all .2s;
}

.woocommerce-page .wp-element-button:hover .wc-block-components-button__text {
	color: #fff!important;
}


.woocommerce-page .wc-block-cart-item__wrap .wc-block-components-product-name {
	font-size: 125%!important;
	font-weight: bold;
}

.woocommerce-page .wc-block-components-product-metadata__description p {
	font-size: 90%!important;
}

.woocommerce-page .wc-block-components-product-details__renews {
	font-style: italic;
	font-size: 90%!important;

}

/* Constrain images placed in page content (Classic-editor draft pages) so they
   don't overflow the Brizy post-content container or the theme content area. */
.brz-wp-post-content img,
.entry-content img {
	max-width: 100%;
	height: auto;
}

/* Committee member grid (Your Committee page — Classic-editor draft).
   auto-fit collapses 3 cols -> 2 -> 1 as the viewport narrows. */
.committee-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 32px;
	margin: 36px 0;
}
.committee-card {
	border: 1px solid #e4e7ec;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	padding-bottom: 28px;
}
.committee-card img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	display: block;
	margin: 0 0 22px;
}
/* The headshot is wrapped in a <p> that only carries the 28px side margins, so
   it sits flush to the card top. Add matching top spacing so the image is inset
   evenly (28px top + sides). The card's top border + overflow:hidden prevent this
   margin from collapsing out of the card. */
.committee-card p:first-child {
	margin-top: 28px;
}
.committee-card h3 {
	margin: 0 28px 6px;
}
.committee-card h3:first-child {
	margin-top: 28px; /* cards without a photo get top spacing */
}
.committee-card .committee-role {
	margin: 0 28px 18px;
	font-weight: 700 !important;
	color: #016e83;
	font-size: 105%;
}
.committee-card p {
	margin: 0 28px 14px;
	font-size: 92%;
	line-height: 1.6;
}

/* Our Projects — lay each project out two-up in a 50% column, in a bordered card
   matching the committee cards. Stacks to a single column on small screens. Each
   column is a flex column so that where there's a "Read more" link it aligns along
   the bottom of the row regardless of blurb length. */
.projects-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px 32px;
	margin: 24px 0;
}
.project-col {
	display: flex;
	flex-direction: column;
	border: 1px solid #e4e7ec;
	border-radius: 8px;
	background: #fff;
	padding: 24px 28px;
}
.project-col > :first-child {
	margin-top: 0;
}
.project-col > :last-child {
	margin-bottom: 0;
}
/* Only push the trailing paragraph down when it's a "Read more" link (Key
   Projects); Other Projects have no link and should sit directly under the text. */
.project-col p:last-child:has(a) {
	margin-top: auto;
}
/* Project card image sits flush across the top of the card. wpautop wraps each
   image in its own <p>, which is the card's first child — zero its margins and
   use it only to space the image from the heading. A fixed aspect ratio + cover
   keeps every thumbnail the same height so the cards stay in a tidy grid. */
.project-col > p:first-child {
	margin: 0 0 18px;
}
.project-col .project-thumb {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	border-radius: 6px;
}
/* The parent theme gives project headings a full 1em (34px) margin top and bottom,
   which leaves too much air around each card title. Tighten it within the cards. */
.project-col h3 {
	margin: 2px 0 10px;
	line-height: 1.2;
}
@media (max-width: 600px) {
	.projects-grid {
		grid-template-columns: 1fr;
	}
}

/* Checkout "Place order" button: the generic .wp-element-button rules give it a
   navy outline + navy hover fill, which looks wrong on the inactive grey button.
   Keep it neutral — no navy border, and no navy background on hover. */
.woocommerce-page .wc-block-components-checkout-place-order-button {
	border-color: #d0d5dd;
}
.woocommerce-page .wc-block-components-checkout-place-order-button:hover {
	background-color: #e4e4e4;
}

/* In-content links: differentiate prose links from body text, on-brand.
   The parent theme (dustin-neue) hides them, and Brizy injects a high-specificity
   rule that forces `text-decoration` on paragraph content — so a normal underline
   can't win. Instead we draw the underline ourselves with a bottom border (which
   Brizy doesn't touch) offset from the text via padding-bottom. Brand teal, and the
   underline fades out on hover. Scoped to content wrappers only — nav
   (.brz-menu/.brz-a) is unaffected, and WooCommerce/WP button links that happen to sit inside a
   content wrapper (.button / .wp-element-button / .wc-block-components-button — e.g. the block
   cart/checkout "Proceed to Checkout" button) are EXCLUDED, so their own button border isn't
   clobbered to a 1px teal bottom border.

   SCOPE — this rule is deliberately narrowed so it only ever hits genuine *inline prose*
   links, never UI chrome that happens to render bare (class-less) anchors inside the content
   wrapper. Two structural boundaries (not per-widget exceptions):
   - :not(:has(img))  — never underline a link that wraps an image (e.g. the block-cart product
     thumbnail; any image-link in page content). A teal bottom border under an image looks broken.
   - :not(.woocommerce a)  — leave the entire WooCommerce / My Account UI subtree to its own
     styling (the account nav is class-less <li> block links; the dashboard "Member Profile"
     buttons come from the member-profiles plugin). The plugin/theme own that surface — we don't
     retint it. (The only casualty is the standard dashboard-intro paragraph's links, which fall
     back to the theme colour; those same destinations are in the account nav, so it's negligible.)
   .brz-rich-text is Brizy-native prose and never inside .woocommerce, so it only needs the
   image guard.
   - :not(.cbc-event-list a)  — same reasoning as .woocommerce above, added 2026-08-07. The event
     LISTING is chrome rendered by cbc-event-tickets: card titles and "Event details & tickets"
     buttons, not prose. Without this the button rendered teal-on-navy (unreadable) and every card
     title picked up the prose underline. Note the event DETAIL view (.cbc-event) is deliberately
     NOT excluded — its body copy is the product description, which is genuine prose and should
     keep the teal treatment. */
.brz-rich-text a:not(.button):not(.wp-element-button):not(.wc-block-components-button):not(:has(img)):not(.cbc-event-list a),
.brz-wp-post-content a:not(.button):not(.wp-element-button):not(.wc-block-components-button):not(:has(img)):not(.woocommerce a):not(.cbc-event-list a) {
	color: #016e83 !important;
	text-decoration: none !important;
	border-bottom: 1px solid #016e83 !important;
	padding-bottom: 2px;
	opacity: 1 !important;
	transition: border-color .25s ease;
}
.brz-rich-text a:not(.button):not(.wp-element-button):not(.wc-block-components-button):not(:has(img)):not(.cbc-event-list a):hover,
.brz-wp-post-content a:not(.button):not(.wp-element-button):not(.wc-block-components-button):not(:has(img)):not(.woocommerce a):not(.cbc-event-list a):hover {
	border-bottom-color: transparent !important;
}


/* Subscription auto-renewal disclosure — shown on the Gold Membership product (by the
   price) and as a notice on the block checkout page. Brand teal callout. */
.cbc-sub-notice {
	margin: 14px 0 0;
	padding: 12px 14px;
	background: #016e830f;
	border-left: 3px solid #016e83;
	border-radius: 4px;
	font-size: 92%;
	line-height: 1.5;
}
/* The same notice when it lives in a Brizy template rather than the product
   long description (moved there 2026-08-12, template 2212 "Membership Product
   Post Template").

   Brizy emits a per-element `.brz .brz-css-xxxxx { padding: … }` for every
   wrapper it renders. That is two classes, so it outspecifies the single-class
   rule above and flattens the callout to `padding: 0` — the copy ends up jammed
   against the teal left border with no breathing room. Everything else in the
   rule above (background, border, radius) survives, which is why the box looks
   right but the text does not.

   Matching Brizy's own two-class specificity is enough to win on its own;
   verified in the live DOM that the plain class computes 0px here while this
   selector computes 12px 14px, so no !important is needed. */
.brz .cbc-sub-notice.brz-wrapper {
	padding: 12px 14px;
}

.cbc-checkout-sub-notice {
	max-width: 100%;
	margin: 0 auto 26px;
	padding: 14px 18px;
	background: #016e830f;
	border-left: 4px solid #016e83;
	border-radius: 6px;
}
.cbc-checkout-sub-notice p {
	margin: 0;
	line-height: 1.55;
}

/* 5 Ways to Wellbeing — the five themes as a single row of columns (heading + poster).
   The five images are uniform 1018x1440 portrait, so equal columns give an even row.
   Collapses to 3 then 2 columns on narrower screens so the posters stay legible. */
.wellbeing-grid {
	display: grid;
	/* minmax(0,1fr) keeps all five tracks exactly equal (plain 1fr lets the portrait
	   images blow the tracks out to unequal widths). width:100% because the Brizy
	   content wrapper is a flex column that otherwise shrink-wraps the grid to content. */
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 18px;
	width: 100%;
	margin: 30px 0;
	text-align: center;
}
.wellbeing-col {
	min-width: 0;
}
.wellbeing-col h3 {
	margin: 0 0 10px;
	font-size: 1.1rem;
	line-height: 1.25;
}
.wellbeing-col p {
	margin: 0; /* wpautop wraps each image in its own <p> */
}
.wellbeing-col img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
}
@media (max-width: 900px) {
	.wellbeing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.wellbeing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ===== Block-editor (Gutenberg) card grids =====
   The content pages that use these grids were moved from the Classic editor to
   Gutenberg (2026-07-17). Blocks render images as figure.wp-block-image rather
   than the classic p>img, so these rules inset/size the figure to reproduce the
   original card layout. They sit AFTER the classic rules so they win. */

/* Committee cards: image is the figure (first child) — inset it 28px top+sides
   like the classic card, and size the image inside it 4/5 cover. */
.committee-card > .wp-block-image:first-child {
	margin: 28px 28px 22px;
}
.committee-card .wp-block-image img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 4px;
}

/* Project cards: the .project-thumb class now sits on the figure, so neutralise
   the classic figure sizing and apply the 16/10 cover thumbnail to the image. */
.project-col .wp-block-image.project-thumb {
	aspect-ratio: auto;
	margin: 0 0 18px;
	border-radius: 0;
}
.project-col .project-thumb img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	border-radius: 6px;
}

/* Wellbeing posters: zero the figure margin so the poster sits directly under
   its heading (the classic p>img spacing rule doesn't apply to figures). */
.wellbeing-col .wp-block-image {
	margin: 0;
}

/* ============================================================================
   Customer Service Awards / content-page DESIGN BLOCKS moved out 2026-08-06.
   The `.cbc-*` design-block rules now live in blocks.css, which is loaded BOTH
   on the front end (handle `cbc-blocks`, after this file) and in the block
   editor via add_editor_style() — so the Gutenberg canvas previews the real
   design. Edit blocks.css, not this file, for those classes.
   ============================================================================ */
