/* Birr Series Publications - WooCommerce and B2BKing account polish.
   Loaded by wp-content/novamira-sandbox/birr-woo-account-polish.php on shop, basket,
   checkout, My Account and the registration pages only. Every rule targets markup that
   WooCommerce or B2BKing print and Elementor cannot style: if either plugin renames a
   class, the rule stops matching and that element falls back to its default look.
   Palette: navy #00283C, navy mid #0A3A52, brass #8A6630, brass text #7A5A29,
   paper #FAF7F1, line #E7E1D6, ink #3D4A54, meta #6B7780, alert #8C2F2F. */

/* 1. Notices: the notice button keeps white text (My Account link colour was turning it brass on navy) */
.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-message .button:hover,
.woocommerce-info .button:hover { color: #FFFFFF !important; }

/* On phones the button sits under the message instead of squeezing it into a narrow column */
@media (max-width: 767px) {
	.woocommerce-message,
	.woocommerce-info { display: flex !important; flex-direction: column; align-items: flex-start; gap: 12px; }
	.woocommerce-message .button,
	.woocommerce-info .button { float: none !important; order: 2; margin: 0 !important; width: 100%; text-align: center; }
}

/* 1b. Checkout: the Stripe plugin's invisible style probe input ran 6px past the screen edge on phones,
   giving the whole checkout a sideways scroll. Clip it inside the payment box. */
.woocommerce-checkout #payment { overflow-x: clip; }

/* 2. Required-field markers in brand brass rather than WooCommerce red */
.woocommerce form .required,
.woocommerce-page form .required { color: #8A6630 !important; text-decoration: none; border: 0; }

/* 3. Registration forms: a select still showing its prompt reads as a placeholder */
.birr-register form.register select:invalid { color: #6B7780 !important; }

/* 4. My Account */
/* 4a. Phones: menu as a two-column grid instead of one long list */
@media (max-width: 767px) {
	.woocommerce-account .woocommerce-MyAccount-navigation ul { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
	.woocommerce-account .woocommerce-MyAccount-navigation ul li { margin: 0 !important; }
	.woocommerce-account .woocommerce-MyAccount-navigation ul li a { display: flex !important; align-items: center; height: 100%; min-height: 46px; box-sizing: border-box; font-size: 11px !important; line-height: 1.35 !important; }
}

/* 4b. Phones: paired name fields stack instead of squeezing side by side */
@media (max-width: 767px) {
	.woocommerce-account .woocommerce-MyAccount-content .form-row-first,
	.woocommerce-account .woocommerce-MyAccount-content .form-row-last { float: none !important; width: 100% !important; }
}

/* 4c. Orders list: space between the action buttons */
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button { margin: 3px 6px 3px 0 !important; }

/* 4d. Order details: give the product name the wide column; totals and notes read as values, not labels */
.woocommerce-account .woocommerce-table--order-details .product-name { width: 64%; }
.woocommerce-account .woocommerce-table--order-details tfoot td,
.woocommerce-account .woocommerce-table--order-details tfoot th { padding-right: 14px !important; }
.woocommerce-checkout .woocommerce-table--order-details tfoot td { text-transform: none !important; letter-spacing: 0 !important; font-size: 15px !important; font-weight: 600 !important; line-height: 1.6 !important; color: #00283C; }

/* 4e. Signed-out My Account: the login form keeps a readable card width instead of stretching across the page */
body.woocommerce-account:not(.logged-in) .e-my-account-tab .woocommerce { max-width: 520px; margin-left: auto !important; margin-right: auto !important; }
body.woocommerce-account:not(.logged-in) .e-my-account-tab .woocommerce > h2 { text-align: center; }

/* 4f. Product page on phones: when the wholesale quantity stepper is shown, the Add to basket button
   wraps onto its own line instead of running past the screen edge */
@media (max-width: 767px) {
	.single-product .e-atc-qty-button-holder { flex-wrap: wrap !important; gap: 12px; }
	.single-product .e-atc-qty-button-holder .quantity { flex: 0 0 auto !important; }
	.single-product .e-atc-qty-button-holder .single_add_to_cart_button { margin-left: 0 !important; margin-inline-start: 0 !important; }
}

/* 4g. Wholesale price-tier table on the product page: padded cells and brand rules */
.single-product table.b2bking_tiered_price_table { width: 100%; margin: 16px 0 8px !important; border-collapse: collapse !important; border: 1px solid #E7E1D6 !important; }
.single-product table.b2bking_tiered_price_table th,
.single-product table.b2bking_tiered_price_table td { padding: 11px 14px !important; border: 0 !important; border-top: 1px solid #E7E1D6 !important; text-align: left; font-family: "Open Sans", sans-serif; font-size: 15px; }
.single-product table.b2bking_tiered_price_table thead th,
.single-product table.b2bking_tiered_price_table thead td { border-top: 0 !important; background: #FAF7F1; color: #00283C; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* 5. B2BKing wholesale screens inside My Account */
.woocommerce-account #b2bking_myaccount_conversations_title,
.woocommerce-account #b2bking_myaccount_offers_title,
.woocommerce-account #b2bking_myaccount_bulkorder_title,
.woocommerce-account .b2bking_purchase_lists_top_title,
.woocommerce-account .b2bking_subaccounts_container_top_title {
	font-family: "Merriweather", Georgia, serif !important;
	font-weight: 700 !important;
	font-size: 26px !important;
	line-height: 1.3 !important;
	letter-spacing: 0 !important;
	color: #00283C !important;
}

.woocommerce-account :is(#b2bking_myaccount_conversations_container, #b2bking_myaccount_offers_container, #b2bking_myaccount_bulkorder_container, .b2bking_purchase_list_top_container, .b2bking_subaccounts_container, .dataTables_wrapper) :where(div, span, p, a, td, th, label, button, input, select, textarea, strong):not([class*="dashicons"]):not([class*="fa-"]) {
	font-family: "Open Sans", sans-serif !important;
}

.woocommerce-account #b2bking_myaccount_make_inquiry_button,
.woocommerce-account .b2bking_subaccounts_container_top_button,
.woocommerce-account .b2bking_purchase_list_top_container button {
	background: #00283C !important;
	border: 1px solid #00283C !important;
	border-radius: 0 !important;
	color: #FFFFFF !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: .08em !important;
	text-transform: uppercase !important;
}
.woocommerce-account #b2bking_myaccount_make_inquiry_button:hover,
.woocommerce-account .b2bking_subaccounts_container_top_button:hover,
.woocommerce-account .b2bking_purchase_list_top_container button:hover { background: #0A3A52 !important; border-color: #0A3A52 !important; }

/* 5a. Quick order form: brass primary action, square controls */
body.woocommerce-account #b2bking_myaccount_bulkorder_container button.b2bking_bulkorder_cream_add,
.woocommerce-account .b2bking_bulkorder_cream_add {
	background: #8A6630 !important;
	border-radius: 0 !important;
	color: #FFFFFF !important;
	font-family: "Open Sans", sans-serif !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: .08em !important;
	text-transform: uppercase !important;
}
body.woocommerce-account #b2bking_myaccount_bulkorder_container button.b2bking_bulkorder_cream_add:hover,
.woocommerce-account .b2bking_bulkorder_cream_add:hover { background: #00283C !important; }
.woocommerce-account #b2bking_myaccount_bulkorder_container input,
.woocommerce-account #b2bking_myaccount_bulkorder_container select,
.woocommerce-account #b2bking_myaccount_bulkorder_container button { border-radius: 0 !important; }

/* 5b. Phones: the quick order toolbar wraps instead of running off the edge */
@media (max-width: 767px) {
	.woocommerce-account .b2bking_bulkorder_cream_header_container { flex-wrap: wrap !important; gap: 8px; }
	.woocommerce-account .b2bking_bulkorder_cream_header_container > * { flex: 1 1 auto !important; min-width: 0 !important; max-width: 100% !important; margin: 0 !important; }
	.woocommerce-account .b2bking_bulkorder_cream_header_container > *:nth-child(2) { order: 3; flex-basis: 100% !important; }
	.woocommerce-account #b2bking_myaccount_conversations_title,
	.woocommerce-account #b2bking_myaccount_offers_title,
	.woocommerce-account #b2bking_myaccount_bulkorder_title,
	.woocommerce-account .b2bking_purchase_lists_top_title,
	.woocommerce-account .b2bking_subaccounts_container_top_title { font-size: 22px !important; }
}
