/*
 Theme Name:   Prairie Outdoor Living Theme by Grizzly Media
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Grizzly Media
 Author URI:   https://grizzlymedia.ca
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* =============================================================================
   Plain text links
   Links inside rich text and text elements (not buttons, nav or cards).
   Colour comes from Bricks Theme Style > Links (var(--secondary)); this adds the underline
   which sits close to the text and drops slightly lower on hover.
   ============================================================================= */
:where(.brxe-text, .brxe-text-basic, .brxe-post-content, .brxe-product-content, .brxe-product-short-description, .brxe-product-additional-information) a:not(.btn, .bricks-button, .button, .wc-block-components-button) {
	color: var(--secondary);
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.12em;
	transition: text-underline-offset 0.2s ease, color 0.2s ease;
}

:where(.brxe-text, .brxe-text-basic, .brxe-post-content, .brxe-product-content, .brxe-product-short-description, .brxe-product-additional-information) a:not(.btn, .bricks-button, .button, .wc-block-components-button):is(:hover, :focus-visible) {
	color: var(--secondary-d-1);
	text-underline-offset: 0.3em;
}

@media (prefers-reduced-motion: reduce) {
	:where(.brxe-text, .brxe-text-basic, .brxe-post-content, .brxe-product-content, .brxe-product-short-description, .brxe-product-additional-information) a {
		transition: none;
	}
}
/* ==========================================================================
   WooCommerce Cart & Checkout blocks (pages 194/195, rendered by the
   "Single Page Fallback" Bricks template). Kept close to stock: brand colours,
   fonts and buttons only.
   ========================================================================== */
:is(.woocommerce-cart, .woocommerce-checkout) .page-content .wp-block-woocommerce-cart,
:is(.woocommerce-cart, .woocommerce-checkout) .page-content .wp-block-woocommerce-checkout {
	width: 100%;
	max-width: none;
	margin: 0;
	font-family: inherit;
	color: var(--text-body);
}
/* Light grey page behind the white cards */
:is(.woocommerce-cart, .woocommerce-checkout) .page-content {
	background: var(--base-5);
}
/* White cards for the main column and the sidebar (order summary / totals) */
:is(.woocommerce-cart, .woocommerce-checkout) .page-content :is(.wc-block-cart__main, .wc-block-checkout__main, .wc-block-cart .wc-block-components-sidebar) {
	background: var(--light);
	border-radius: var(--radius-m);
	padding: var(--space-m);
}
:is(.woocommerce-cart, .woocommerce-checkout) .page-content :is(.wc-block-components-title, .wc-block-components-checkout-step__title, .wc-block-cart__totals-title) {
	color: var(--primary-d-1);
	font-weight: 600;
}
/* Primary buttons (Proceed to checkout, Place order, Apply) match the gold .btn */
:is(.woocommerce-cart, .woocommerce-checkout) .page-content .wc-block-components-button:not(.is-link) {
	background: var(--primary);
	color: var(--primary-d-4);
	border: none;
	border-radius: var(--radius-m);
	font-weight: 600;
	box-shadow: var(--shadow-m);
	transition: background 0.25s ease-in-out;
}
:is(.woocommerce-cart, .woocommerce-checkout) .page-content .wc-block-components-button:not(.is-link):is(:hover, :focus-visible) {
	background: var(--primary-d-1);
	color: var(--primary-d-4);
}
/* Inputs and selects: softer corners */
:is(.woocommerce-cart, .woocommerce-checkout) .page-content :is(.wc-block-components-text-input input, .wc-block-components-combobox .components-combobox-control__input, .wc-blocks-components-select__select, .wc-block-components-textarea) {
	border-radius: var(--radius-s);
}
/* Product names and text links */
:is(.woocommerce-cart, .woocommerce-checkout) .page-content .wc-block-components-product-name {
	color: var(--primary-d-1);
	font-weight: 600;
	text-decoration: none;
}
:is(.woocommerce-cart, .woocommerce-checkout) .page-content :is(.wc-block-checkout, .wc-block-cart) a:not(.wc-block-components-button, .wc-block-components-product-name) {
	color: var(--secondary);
}
@media (max-width: 767px) {
	:is(.woocommerce-cart, .woocommerce-checkout) .page-content :is(.wc-block-cart__main, .wc-block-checkout__main, .wc-block-cart .wc-block-components-sidebar) {
		padding: var(--space-s);
	}
}
/* Readable text sizes (WooCommerce blocks use small rem values; Core Framework's root is 10px) */
body .page-content .page-content__body .wc-block-cart-items .wc-block-components-product-name { font-size: var(--text-m); }
body .page-content .page-content__body :is(.wc-block-components-product-metadata, .wc-block-components-product-price, .wc-block-cart-item__total, .wc-block-components-totals-item, .wc-block-components-panel__button, .wc-block-components-checkout-step__description, .wc-block-components-order-summary-item) { font-size: var(--text-s); }
body .page-content .page-content__body .wc-block-components-totals-footer-item { font-size: var(--text-l); }
body .page-content .page-content__body :is(.wc-block-cart-items__header, .wc-block-cart__totals-title) { font-size: var(--text-xs); letter-spacing: 0.04em; }

/* Checkout: the order summary already has its own border, so just give it a white background */
:is(.woocommerce-cart, .woocommerce-checkout) .page-content .wp-block-woocommerce-checkout-order-summary-block {
	background: var(--light);
	border-radius: var(--radius-m);
}

/* ==========================================================================
   WooCommerce My Account (page 196, classic shortcode inside the
   "Single Page Fallback" template): white cards on grey, gold buttons,
   tab-style navigation with icons.
   ========================================================================== */
.woocommerce-account .page-content {
	background: var(--base-5);
}
/* Two-column layout: navigation | content (replaces WooCommerce's floats) */
.woocommerce-account .page-content__body > .woocommerce {
	display: grid;
	grid-template-columns: 26rem minmax(0, 1fr);
	gap: var(--space-m);
	align-items: start;
}
.woocommerce-account .page-content__body > .woocommerce::before,
.woocommerce-account .page-content__body > .woocommerce::after { display: none; }
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
	float: none;
	width: auto;
	background: var(--light);
	border-radius: var(--radius-m);
}
.woocommerce-account .woocommerce-MyAccount-content {
	padding: var(--space-m);
}
/* Navigation tabs */
.woocommerce-account .woocommerce-MyAccount-navigation {
	padding: var(--space-xs);
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}
.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	padding: 1.2rem var(--space-s);
	border-radius: var(--radius-s);
	color: var(--text-body);
	font-size: var(--text-s);
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.woocommerce-account .woocommerce-MyAccount-navigation a:is(:hover, :focus-visible) {
	background: var(--base-5);
	color: var(--primary-d-2);
}
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
	background: var(--primary);
	color: var(--primary-d-4);
	font-weight: 600;
}
/* Tab icons (Font Awesome 6, already loaded by Bricks) */
.woocommerce-account .woocommerce-MyAccount-navigation a::before {
	font-family: "Font Awesome 6 Solid", "Font Awesome 6 Free";
	font-weight: 900;
	line-height: 1;
	width: 1.25em;
	text-align: center;
	content: "\f111";
}
.woocommerce-MyAccount-navigation-link--dashboard a::before { content: "\f015" !important; }
.woocommerce-MyAccount-navigation-link--orders a::before { content: "\f290" !important; }
.woocommerce-MyAccount-navigation-link--downloads a::before { content: "\f019" !important; }
.woocommerce-MyAccount-navigation-link--edit-address a::before { content: "\f3c5" !important; }
.woocommerce-MyAccount-navigation-link--payment-methods a::before { content: "\f09d" !important; }
.woocommerce-MyAccount-navigation-link--edit-account a::before { content: "\f007" !important; }
.woocommerce-MyAccount-navigation-link--customer-logout a::before { content: "\f2f5" !important; }
.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
	margin-top: 0.4rem;
	padding-top: 0.4rem;
	border-top: 1px solid var(--base-l-3);
}
/* Content: headings, links, forms */
.woocommerce-account .woocommerce-MyAccount-content :is(h2, h3, legend) {
	color: var(--primary-d-1);
	font-size: var(--text-l);
	margin-top: 0;
}
.woocommerce-account .woocommerce-MyAccount-content p:last-child { margin-bottom: 0; }
.woocommerce-account .woocommerce-MyAccount-content a:not(.button, .woocommerce-button) {
	color: var(--secondary);
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.12em;
}
.woocommerce-account :is(input.input-text, select, textarea) {
	width: 100%;
	padding: 1rem var(--space-xs);
	border: 1px solid var(--base-l-2);
	border-radius: var(--radius-s);
	background: var(--light);
	font-size: var(--text-s);
	line-height: 1.4;
}
.woocommerce-account :is(input.input-text, select, textarea):focus {
	outline: 2px solid var(--primary);
	outline-offset: 1px;
	border-color: var(--primary);
}
.woocommerce-account .woocommerce form .form-row label {
	font-size: var(--text-s);
	font-weight: 500;
}
.woocommerce-account fieldset {
	border: 1px solid var(--base-l-3);
	border-radius: var(--radius-s);
	padding: var(--space-s);
	margin-top: var(--space-m);
}
/* Buttons: match the gold .btn */
.woocommerce-account :is(.button, .woocommerce-Button, .woocommerce-button, button[type="submit"]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-xs) var(--space-m);
	background: var(--primary);
	color: var(--primary-d-4);
	font-size: var(--text-s);
	font-weight: 600;
	border: none;
	border-radius: var(--radius-m);
	box-shadow: var(--shadow-m);
	text-decoration: none;
	cursor: pointer;
	transition: background 0.25s ease-in-out;
}
.woocommerce-account :is(.button, .woocommerce-Button, .woocommerce-button, button[type="submit"]):is(:hover, :focus-visible) {
	background: var(--primary-d-1);
	color: var(--primary-d-4);
}
/* Orders / downloads tables */
.woocommerce-account table.shop_table {
	border: 1px solid var(--base-l-3);
	border-radius: var(--radius-s);
	border-collapse: separate;
	border-spacing: 0;
	font-size: var(--text-s);
}
.woocommerce-account table.shop_table th {
	font-weight: 600;
	background: var(--base-5);
}
.woocommerce-account table.shop_table .button {
	padding: 0.6rem var(--space-s);
	box-shadow: none;
}
/* Addresses */
.woocommerce-account .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
	gap: var(--space-m);
}
.woocommerce-account .woocommerce-Addresses::before,
.woocommerce-account .woocommerce-Addresses::after { display: none; }
.woocommerce-account .woocommerce-Address {
	float: none !important;
	width: auto !important;
	padding: var(--space-s);
	border: 1px solid var(--base-l-3);
	border-radius: var(--radius-s);
}
.woocommerce-account .woocommerce-Address-title {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--space-xs);
}
.woocommerce-account .woocommerce-Address-title :is(h2, h3) { margin: 0; }
/* Notices */
.woocommerce-account :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) {
	border-radius: var(--radius-s);
	border-top-color: var(--primary);
	background: var(--base-5);
	color: var(--text-body);
	font-size: var(--text-s);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-xs);
}
.woocommerce-account :is(.woocommerce-info, .woocommerce-message, .woocommerce-error)::after { display: none; }
.woocommerce-account :is(.woocommerce-info, .woocommerce-message) .button { order: 2; padding: 0.8rem var(--space-s); box-shadow: none; }
/* Logged out: login and register side by side as cards */
.woocommerce-account .u-columns.col2-set {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 32rem), 1fr));
	gap: var(--space-m);
	grid-column: 1 / -1;
}
.woocommerce-account .u-columns.col2-set::before,
.woocommerce-account .u-columns.col2-set::after { display: none; }
.woocommerce-account .u-columns .u-column1,
.woocommerce-account .u-columns .u-column2,
.woocommerce-account .page-content__body > .woocommerce > form.woocommerce-form-login {
	float: none;
	width: auto;
	background: var(--light);
	border-radius: var(--radius-m);
	padding: var(--space-m);
	border: none;
	margin: 0;
}
.woocommerce-account .page-content__body > .woocommerce:has(> .u-columns, > form.woocommerce-form-login) {
	display: block;
	max-width: 72rem;
	margin-inline: auto;
}
/* Tablet and below: tabs become a wrapping row of pills above the content */
@media (max-width: 991px) {
	.woocommerce-account .page-content__body > .woocommerce {
		grid-template-columns: minmax(0, 1fr);
	}
	.woocommerce-account .woocommerce-MyAccount-navigation ul {
		flex-direction: row;
		flex-wrap: wrap;
	}
	.woocommerce-account .woocommerce-MyAccount-navigation a {
		padding: 0.8rem var(--space-xs);
	}
	.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
		margin-top: 0;
		padding-top: 0;
		border-top: 0;
	}
}
@media (max-width: 767px) {
	.woocommerce-account .woocommerce-MyAccount-content { padding: var(--space-s); }
}
/* Account/address forms: two-column grid so First/Last name line up; everything else full width */
.woocommerce-account :is(.woocommerce-EditAccountForm, .woocommerce-address-fields__field-wrapper) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--space-s);
}
.woocommerce-account :is(.woocommerce-EditAccountForm, .woocommerce-address-fields__field-wrapper) > :not(.form-row-first, .form-row-last) {
	grid-column: 1 / -1;
}
.woocommerce-account :is(.woocommerce-EditAccountForm, .woocommerce-address-fields__field-wrapper) .form-row {
	float: none;
	width: auto;
	margin: 0 0 var(--space-s);
}
.woocommerce-account .woocommerce-EditAccountForm > .clear { display: none; }
.woocommerce-account .woocommerce-Address { border: 1px solid var(--base-l-3) !important; }
@media (max-width: 478px) {
	.woocommerce-account :is(.woocommerce-EditAccountForm, .woocommerce-address-fields__field-wrapper) { grid-template-columns: minmax(0, 1fr); }
}
