/*
Theme Name: Hello Child - OMI
Theme URI: https://example.com
Description: A child theme for Hello Elementor, customized for the OMI project
Author: Your Name
Author URI: https://example.com
Template: hello-elementor
Version: 1.1.6
Text Domain: hello-child-omi
Domain Path: /languages
Requires at least: 6.0
Requires PHP: 7.4
*/

/* =============================================================================
   PRODUCT TABLE: Action Buttons (Figma)
   Targets the [raq_smart_button] shortcode output rendered in WC Product Table.

   Layout (Figma):
   - “View in cart / View in quote” sits to the RIGHT of each button (same row).
   - Reserve horizontal space (~128px) for that success area; widen the Actions
     column in WCPT and trim Description (or another column) so total table width
     stays similar — done in WC Product Table → Edit table → Columns, not here.
   - Buttons stay clickable after success (add more qty); “View in cart / quote”
     is the success affordance (Woo’s .added::after checkmark is hidden in this block).

   HTML structure (per row):
     .raq-actions-wrapper — vertical stack: cart row, then quote row
       .raq-action-row--cart — flex row: [ Add to cart ] [ ✓ View in cart ]
       .raq-quote-action-row — flex row: [ YITH block ] [ .raq-success-slot--quote reserved ]
         JS moves “View in cart” / browse message into slots after add (no layout jump).

   The YITH inline <style> block has been suppressed via template override at:
     woocommerce/add-to-quote-button.php
   ============================================================================= */

:root {
	--raq-coral: #E1523C;
	--raq-coral-hover: #B44231;
	--raq-success-badge: #24A148;
	--raq-success-link: #CC3366;
	/* Match visual height: solid button vs 2px outline quote button */
	--raq-action-btn-min-height: 30px;
	--raq-action-btn-max-width: 123px;
	/* Figma: space beside button for check + “View in …” link */
	--raq-success-column-width: 94px;
	/* [quote_count] / [cart_count] — digit circle (matches former Elementor widget CSS) */
	--raq-count-badge-size: 18px;
}

/* =============================================================================
   [quote_count] / [cart_count] (Commerce_Count_Badges) — coral circles
   Former Elementor scoped rules folded here. Background stays on .commerce-count-number
   (not .quote-count-widget) because the link wraps label + count when show_label=yes.
   ============================================================================= */

.commerce-count-badge {
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
}

/* Coral circle = the number only (quote + cart share these classes) */
.commerce-count-number,
.quote-count-widget .quote-count-number,
.cart-count-widget .cart-count-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: var(--raq-count-badge-size);
	height: var(--raq-count-badge-size);
	padding: 0 3px;
	border-radius: 1000px;
	background-color: var(--raq-coral);
	color: #fff;
	text-align: center;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	margin-left: 5px;
	vertical-align: middle;
}

.commerce-count-badge:hover .commerce-count-number,
.quote-count-widget:hover .quote-count-number,
.cart-count-widget:hover .cart-count-number {
	background-color: var(--raq-coral-hover);
}

/* -- Add to cart (solid) ---------------------------------------------------- */

a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
	display: inline-flex;
	flex: 1 1 auto;
	min-width: 121px;
	width: auto;
	max-width: var(--raq-action-btn-max-width);
	min-height: var(--raq-action-btn-min-height);
	background: var(--raq-coral);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	fill: #fff;
	border: none;
	border-radius: 28px;
	box-sizing: border-box;
	padding: 6px 20px 8px 22px;
	white-space: nowrap;
	text-align: center;
	justify-content: center;
	align-items: center;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart:hover {
	background: var(--raq-coral-hover);
	box-shadow: 0 2px 8px rgba(225, 82, 60, 0.18);
}

/*
 * WooCommerce adds a checkmark via .added::after (WooCommerce icon font).
 * Hide it here so cart matches quote (no checkmark) — success is shown by
 * “View in cart” / “View in quote” in the reserved slots.
 */
.raq-actions-wrapper .woocommerce a.button.added::after,
.raq-actions-wrapper .woocommerce button.button.added::after,
.raq-actions-wrapper .woocommerce input.button.added::after,
.raq-actions-wrapper .woocommerce #respond input#submit.added::after {
	content: none !important;
	display: none !important;
}

/* Cart row: primary (button) + reserved success slot */
.raq-action-row--cart {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	width: 100%;
	min-height: var(--raq-action-btn-min-height);
	box-sizing: border-box;
}

.raq-action-primary {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	gap: 8px;
}

/* After add — badge + "View in cart" (Inter 500 / 10px, Figma; Inter from Elementor/theme) */
.raq-success-slot--cart .added_to_cart,
.raq-action-row--cart .added_to_cart,
.raq-cart-button-wrapper .added_to_cart {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 4px;
	padding: 0;
	margin: 0;
	min-height: auto;
	font-family: 'Inter', system-ui, sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 10px;
	line-height: 12px;
	color: var(--raq-success-link) !important;
	text-decoration: none !important;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
}

.raq-success-slot--cart .added_to_cart::before,
.raq-action-row--cart .added_to_cart::before,
.raq-cart-button-wrapper .added_to_cart::before {
	content: '';
	display: block;
	width: 8px;
	height: 8px;
	flex-shrink: 0;
	background: url('assets/img/raq-check-badge.svg') center / contain no-repeat;
}

.raq-success-slot--cart .added_to_cart:hover,
.raq-action-row--cart .added_to_cart:hover,
.raq-cart-button-wrapper .added_to_cart:hover {
	color: var(--raq-success-link) !important;
	text-decoration: underline !important;
}

/* Reserved success column (~128px): invisible until filled (see .is-filled) */
.raq-success-slot {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	flex: 0 0 var(--raq-success-column-width);
	min-width: var(--raq-success-column-width);
	box-sizing: border-box;
	position: relative;
}

.raq-success-placeholder {
	display: block;
	width: 100%;
	min-height: 12px;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

.raq-success-slot.is-filled .raq-success-placeholder {
	display: none;
}

.raq-success-slot.is-filled {
	visibility: visible;
}

/* Controlled by raq-success-slots.js setRaqSuccessUiVisible — flex|none only (no stock show/hide) */
.raq-success-slot .added_to_cart[data-raq-success-display='show'],
.raq-success-slot .yith_ywraq_add_item_browse_message[data-raq-success-display='show'] {
	visibility: visible;
	opacity: 1;
	display: flex !important;
}

.raq-success-slot .added_to_cart[data-raq-success-display='hide'],
.raq-success-slot .yith_ywraq_add_item_browse_message[data-raq-success-display='hide'] {
	display: none !important;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

/* -- Add to quote (outline) ------------------------------------------------- */

a.add-request-quote-button.button {
	display: inline-flex;
	min-width: 121px;
	width: auto;
	max-width: var(--raq-action-btn-max-width);
	min-height: var(--raq-action-btn-min-height);
	box-sizing: border-box;
	background: transparent;
	color: var(--raq-coral);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	fill: var(--raq-coral);
	border: 2px solid var(--raq-coral);
	border-radius: 28px;
	padding: 4px 18px 6px 20px;
	margin-top: 0;
	white-space: nowrap;
	text-align: center;
	justify-content: center;
	align-items: center;
	transition: background-color 0.2s ease, color 0.2s ease, fill 0.2s ease, box-shadow 0.2s ease;
	align-self: flex-start;

}

a.add-request-quote-button.button:hover {
	color: var(--raq-coral-hover);
	fill: var(--raq-coral-hover);
	border-color: var(--raq-coral-hover);
}

/* Quote row: YITH block + optional static preview side-by-side */
.raq-quote-action-row {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-height: var(--raq-action-btn-min-height);
	box-sizing: border-box;
}

.raq-quote-action-row > .yith-ywraq-add-to-quote {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
}

/* Inside YITH: keep Add to quote and post-AJAX “View in quote” on one horizontal line */
.raq-quote-action-row .yith-ywraq-add-button {
	/* flex: 1 1 auto;
	min-width: 121px;
	width: auto !important;
	max-width: 100%; */
}

/*
 * Browse link: only flex when explicitly shown — a bare .raq-quote-button-wrapper .yith_ywraq_add_item_browse_message
 * rule was forcing flex !important and overrode YITH display:none when nothing was in the quote.
 */
.raq-quote-button-wrapper .yith_ywraq_add_item_browse_message[data-raq-success-display='show'],
.raq-success-slot--quote .yith_ywraq_add_item_browse_message[data-raq-success-display='show'] {
	display: flex !important;
	flex-direction: row;
	align-items: center;
	gap: 4px;
	margin: 0;
	flex: 0 0 auto;
	min-width: var(--raq-success-column-width);
}

.raq-quote-button-wrapper .yith_ywraq_add_item_browse_message[data-raq-success-display='hide'] {
	display: none !important;
}

.raq-quote-button-wrapper .yith_ywraq_add_item_browse_message[data-raq-success-display='show']::before,
.raq-success-slot--quote .yith_ywraq_add_item_browse_message[data-raq-success-display='show']::before {
	content: '';
	display: block;
	width: 8px;
	height: 8px;
	flex-shrink: 0;
	background: url('assets/img/raq-check-badge.svg') center / contain no-repeat;
}

.raq-quote-button-wrapper .yith_ywraq_add_item_browse_message[data-raq-success-display='show'] a,
.raq-success-slot--quote .yith_ywraq_add_item_browse_message[data-raq-success-display='show'] a {
	font-family: 'Inter', system-ui, sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 10px;
	line-height: 12px;
	color: var(--raq-success-link) !important;
	text-decoration: none !important;
}

.raq-quote-button-wrapper .yith_ywraq_add_item_browse_message[data-raq-success-display='show'] a:hover,
.raq-success-slot--quote .yith_ywraq_add_item_browse_message[data-raq-success-display='show'] a:hover {
	text-decoration: underline !important;
}

/* Suppress YITH inline “Product added…” success copy; keep buttons + slot links only */
.raq-quote-button-wrapper .yith_ywraq_add_item_product_message {
	display: none !important;
}

/* Optional: AJAX error line in .yith_ywraq_add_item_response_message remains available when YITH .show()s it */
.raq-quote-button-wrapper .yith_ywraq_add_item_response_message {
	font-size: 0.75rem;
	line-height: 1.3;
}

/* -- Layout ----------------------------------------------------------------- */

.wcpt-cell-val .wcpt-shortcode,
.raq-actions-wrapper {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 237px;
	gap: 8px;
}

/* Equal-width column: cart + quote stacks fill the WCPT cell */
.raq-actions-wrapper > .raq-cart-button-wrapper,
.raq-actions-wrapper > .raq-quote-button-wrapper {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Cart Submit Button */
.wc-block-cart__submit-button {
	background-color: var(--raq-coral);
	color: #fff;
	text-decoration: none !important;
	font-weight: 600;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wc-block-cart__submit-button:hover {
	background-color: var(--raq-coral-hover);
	color: #fff;
}

/* =============================================================================
   Checkout (block + classic) — brand primary, spacing, calmer payment UI
   WooCommerce defaults --wc-primary to purple (#720eec); scope coral here only.
   ============================================================================= */

body.woocommerce-checkout {
	--woocommerce: var(--raq-coral);
	--wc-primary: var(--raq-coral);
	--wc-primary-text: #fff;
}

/* Block checkout: primary CTA + actions row (padding fixes flush corner button) */
body.woocommerce-checkout .wc-block-checkout__actions {
	margin-top: 0.5rem;
	margin-bottom: 2rem !important;
	padding: 1.25rem 1.25rem 1.5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
}

body.woocommerce-checkout.wc-block-woocommerce-checkout {
	padding-bottom: 25vh;
}

/* Empty checkout block button */
.wc-block-checkout-empty .wp-block-button__link {
	background-color: var(--raq-coral) !important;
	background-color: var(--raq-coral);
	color: #fff;
	text-decoration: none !important;
	font-weight: 600;
	transition: background-color 0.2s ease, color 0.2s ease;
	font-weight: 600 !important;
	padding: 0.65rem 1.75rem !important;
	min-height: 48px;
	box-shadow: none !important;
	transition: background-color 0.2s ease, color 0.2s ease;
	border-radius: 0 !important;
	max-width: 127px;
	width: 100%;
	text-align: center;
	justify-content: center;
	align-items: center;
	transition: background-color 0.2s ease, color 0.2s ease;
	align-self: flex-start;
	align-items: center;
}


.wc-block-checkout-empty .wp-block-button__link:hover {
	background-color: var(--raq-coral-hover);
	color: #fff;
}


body.woocommerce-checkout .wc-block-checkout__actions .wc-block-checkout__actions_row--justify-flex-end {
	gap: 12px;
	padding-top: 0.25rem;
}

body.woocommerce-checkout button.wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button.wc-block-components-button:not(.is-link) {
	background-color: var(--raq-coral) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 999px !important;
	font-weight: 600 !important;
	padding: 0.65rem 1.75rem !important;
	min-height: 48px;
	box-shadow: none !important;
	transition: background-color 0.2s ease, color 0.2s ease;
}

body.woocommerce-checkout button.wc-block-components-checkout-place-order-button:hover,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button.wc-block-components-button:not(.is-link):hover {
	background-color: var(--raq-coral-hover) !important;
	color: #fff !important;
}

body.woocommerce-checkout button.wc-block-components-checkout-place-order-button:focus,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button.wc-block-components-button:not(.is-link):focus {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--raq-coral) !important;
	outline: none;
}

/* Terms + policy copy: breathing room before the button row */
body.woocommerce-checkout .wc-block-checkout__terms {
	margin-top: 0.75rem;
	margin-bottom: 1rem;
	padding: 0 0.125rem;
	line-height: 1.5;
}

body.woocommerce-checkout .wc-block-checkout__terms a,
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper a {
	color: var(--raq-coral);
	text-decoration: underline;
	text-underline-offset: 2px;
}

body.woocommerce-checkout .wc-block-checkout__terms a:hover,
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper a:hover {
	color: var(--raq-coral-hover);
}

/* Payment methods block: neutral frame so the area feels part of the page */
body.woocommerce-checkout .wc-block-components-checkout-payment-methods {
	margin-bottom: 0.5rem;
}

body.woocommerce-checkout .wc-block-checkout__payment-method {
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	background-color: #fafafa;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.woocommerce-checkout .wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option,
body.woocommerce-checkout .wc-block-checkout__payment-method .wc-block-components-radio-control__option {
	background-color: transparent;
}

body.woocommerce-checkout .wc-block-checkout__payment-method [id$='__content'] {
	padding-left: 1rem;
	padding-right: 1rem;
	padding-bottom: 1rem;
}

/* Sidebar totals: slightly cleaner separation (block checkout) */
body.woocommerce-checkout .wc-block-components-totals-wrapper {
	border-radius: 8px;
}

/* Classic checkout (shortcode) */
body.woocommerce-checkout #place_order {
	background-color: var(--raq-coral) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 999px !important;
	font-weight: 600 !important;
	padding: 0.65rem 2rem !important;
	float: none;
	width: auto;
	min-width: 200px;
	margin: 1.25rem 0 1rem !important;
	transition: background-color 0.2s ease;
}

body.woocommerce-checkout #place_order:hover {
	background-color: var(--raq-coral-hover) !important;
	color: #fff !important;
}

/* Remove button in RAQ table */
.woocommerce a.remove {
	line-height: 0.85em;
}
