/* Woo specific styles */

/*Improve normal checkout */
.woocommerce-checkout-review-order-table .product-name, .bundled_table_item .bundled-product-name {
	font-size:var(--pl-font-product-name);;
}

ul#shipping_method .woocommerce-Price-amount, ul#shipping_method li label {
	font-size:var(--pl-font-detail);
}

/* Style child products in a bundle for woo layouts. Improve parent child relationship and use consistent fonts,not 4 different one. */
/* Bundle parent row */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundle_table_item {
    background: #f0f3f7;
}

:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundle_table_item > td {
    border-bottom: 0;
    padding-top: 16px;
    padding-bottom: 16px;
}

:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundle_table_item .product-name {
    font-weight: 700;
    color: #163257;
}

/* Child product rows */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundled_table_item {
    background: #fafbfd;
}

:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundled_table_item > td {
    border-top: 0;
}

/* Child indentation and tree connector */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) .bundled_table_item_indent {
    position: relative;
    padding-left: 36px;
}

/* Non-cart connector (My account, checkout, etc) */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) .bundled_table_item_indent::before {
    content: "";
    position: absolute;
    left: 14px;
    top: -10px;
    height: 28px;
    border-left: 2px solid #c9a05c;
}

/* Hide WooCommerce's bundle arrows beside prices */
.bundled_table_item_subtotal::after,
.bundled_table_item_price::after {
    content: none !important;
    display: none !important;
}

/*
 * Cart: gold connectors for bundled products.
 * Matches the treatment already used in order and subscription tables.
 */

.shop_table.cart tr.bundle_table_item {
    background: #f0f3f7;
}

/* Cart: simple, responsive bundle child styling */
.shop_table.cart tr.bundled_table_item .bundled_table_item_indent {
    position: static;
    padding-left: 16px;
    border-left: 3px solid var(--pl-gold, #c9a05c);
    background: none;
}

/* Remove previous tree connectors */
.shop_table.cart tr.bundled_table_item .bundled_table_item_indent::before,
.shop_table.cart tr.bundled_table_item .bundled_table_item_indent::after {
    content: none !important;
    display: none !important;
}
/* Hide woo's little grey connector */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) .bundled_table_item_indent::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 16px;
    width: 14px;
    border-top: 2px solid #c9a05c;
}

/* Bundle title: */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundle_table_item .product-name,
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundle_table_item .product-name > a:not(.button)


	:is(.woocommerce-table,
    .shop_table.order_details,
    body.woocommerce-cart table.shop_table.woocommerce-cart-form__contents) tr.bundle_table_item .product-name,
:is(.woocommerce-table,
    .shop_table.order_details,
    body.woocommerce-cart table.shop_table.woocommerce-cart-form__contents) tr.bundle_table_item .product-name > a:not(.button)


	{
    font-size: var(--pl-font-bundle); /
    font-weight: 700;
}

/* Coffee/child titles: 16px */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundled_table_item .bundled-product-name > a {
    font-size: var(--pl-font-product); /* 16px */;
    font-weight: 600;
}

/* Variations and prices: 14px */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundled_table_item .wc-item-meta,
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundled_table_item .wc-item-meta *,
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundle_table_item .product-total,
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundle_table_item .product-total *,
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundled_table_item .product-total,
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundled_table_item .product-total * {
    font-size: var(--pl-font-detail); /* 14px */;
    font-weight: 400;
}

/* Variation spacing */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table) tr.bundled_table_item .wc-item-meta {
    margin-top: 6px;
    line-height: 1.5;
}

/* Change your coffee button */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table)
.bundle_table_item .wcs-switch-link.button {
    display: inline-block;
    margin-left: 20px;
    padding: 9px 18px;
    background: #163257;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: var(--pl-font-detail); /* 14px */;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    vertical-align: middle;
}

/* Hover and keyboard focus on change your coffee */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table)
.bundle_table_item .wcs-switch-link.button:hover,
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table)
.bundle_table_item .wcs-switch-link.button:focus-visible {
    background: #a02b43;
    color: #fff;
}

/* we don't want Divi's > pointer symbol on hover */
:is(.woocommerce-table,
    .shop_table.order_details,
    .woocommerce-checkout-review-order-table)
.bundle_table_item .wcs-switch-link.button::after {
    content: none !important;
    display: none !important;
}

/* Cart: variation labels and values */
.shop_table tr.cart_item dl.variation,
.shop_table tr.cart_item dl.variation dt,
.shop_table tr.cart_item dl.variation dd,
.shop_table tr.cart_item dl.variation dd p

{
    font-size: var(--pl-font-detail); /* 14px */;
    font-weight: 400;
    line-height: 1.5;
}

/* Cart: consistent prices, including currency symbols */
.shop_table tr.cart_item .woocommerce-Price-amount,
.shop_table tr.cart_item .woocommerce-Price-amount,
.shop_table tr.cart_item .woocommerce-Price-amount *,
.shop_table tr.cart_item .woocommerce-Price-amount * {
    font-size: var(--pl-font-detail); /* 14px */;
    font-weight: 400;
}

/* Cart: subscription frequency */
.shop_table.cart tr.bundle_table_item .subscription-details,
.shop_table.cart tr.bundled_table_item .subscription-details {
    display: inline;
    margin-left: 5px;
    font-size: var(--pl-font-detail); /* 14px */;;
    font-weight: 400;
    white-space: nowrap;
}

/*Coupons don't make sense for pure switches*/
body.ak-switch-zero-payment .coupon {
    display:none;
}

/* Mobile: remove connectors and retain indentation */
@media (max-width: 767px) {
    .shop_table.cart tr.bundled_table_item .bundled_table_item_indent {
        padding-left: 12px;
    }

    .shop_table.cart tr.bundled_table_item .bundled_table_item_indent::before,
    .shop_table.cart tr.bundled_table_item .bundled_table_item_indent::after {
        content: none !important;
        display: none !important;
    }

    .shop_table.cart tr.bundled_table_item .bundled_table_item_indent {
        border-left:0px;
    }

    /* Cart: variation labels and values */
    .shop_table tr.cart_item dl.variation,
    .shop_table tr.cart_item dl.variation dt,
    .shop_table tr.cart_item dl.variation dd,
    .shop_table tr.cart_item dl.variation dd p

    {
        font-size: 12px;;
        font-weight: 400;
        line-height: 1.3;
    }

    .shop_table tr.cart_item dl.variation {
        margin-top:20px;
    }

    body.ak-subscription-switch table.woocommerce-cart-form__contents td.product-quantity {
        display:none;
    }

    .bundled_table_item .product-name {
        font-size:1.2em;
    }

}

/* /end bundle styling in woo layouts*/
/*
 * Zero-payment subscription switches.
 *
 * WooCommerce displays immediate payment totals alongside recurring totals.
 * For switches where nothing is payable today, hide the redundant £0.00
 * subtotal and total while preserving the recurring subscription totals.
 */

/* Checkout: hide the immediate subtotal and total. */
.woocommerce-checkout-review-order-table:has(tr.ak-switch-payment)
tr.order-total:not(.recurring-total) {
	display: none;
}

.woocommerce-checkout-review-order-table:has(tr.ak-switch-payment)
tr.cart-subtotal:not(.recurring-total) {
	display: none;
}

/* Checkout: style the explanatory note beneath "Nothing to pay today". */
.woocommerce-checkout-review-order-table
.ak-switch-payment .ak-switch-payment-note {
	font-weight: 400;
	margin-top: 4px;
}

/* Basket: hide the immediate subtotal and total, retaining recurring totals. */
.cart_totals table.shop_table:has(tr.ak-switch-payment)
tr.cart-subtotal:not(.recurring-total),
.cart_totals table.shop_table:has(tr.ak-switch-payment)
tr.order-total:not(.recurring-total) {
	display: none;
}

/* Basket: style the explanatory note beneath "Nothing to pay today". */
.cart_totals .ak-switch-payment-note {
	font-weight: 400;
	margin-top: 4px;
}

/*
 * Checkout presentation for zero-payment subscription switches.
 *
 * The ak-switch-zero-payment body class is added only when the basket
 * contains a qualifying switch with no immediate payment.
 */

/* Hide the standard Divi checkout heading for this journey. */
body.ak-switch-zero-payment
.et_pb_row_0_tb_body .et_pb_text_0_tb_body h1, body.ak-switch-zero-payment #order_review_heading, body.ak-switch-thankyou .et_pb_text_inner h1
 {
	display: none;
}

/*
 * Initially collapse the billing and delivery fields.
 * Customers can expand them if they need to update their details.
 */
body.ak-switch-zero-payment .ak-address-collapsed {
	display: none;
}

/* Style the control used to expand or collapse address details. */
body.ak-switch-zero-payment .ak-address-toggle {
	display: block;
	width: 100%;
	padding: 16px 20px;
	margin-bottom: 24px;
	border: 1px solid #d5d5d5;
	border-radius: 8px;
	background: #fff;
	color: #163257;
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

/* Show a downward indicator when address details are collapsed. */
body.ak-switch-zero-payment .ak-address-toggle::after {
	content: "⌄";
	float: right;
}

/* Show an upward indicator when address details are expanded. */
body.ak-switch-zero-payment .ak-address-toggle[aria-expanded="true"]::after {
	content: "⌃";
}
/* Hide WooCommerce's zero-value order overview for switch confirmations. */
body.ak-switch-thankyou .woocommerce-order-overview {
	display: none;
}

/* Custom confirmation. */
.ak-switch-confirmation {
	padding: 28px;
	border: 1px solid #ddd;
	border-radius: 12px;
}

.ak-switch-confirmation h2 {
	color: #163257;
	margin-bottom: 12px;
}

.ak-switch-confirmation h3 {
	color: #163257;
	margin-top: 16px;
}

.ak-switch-confirmation-total {
	display: flex;
	gap: 20px;
	padding: 16px 0;
	border-bottom: 1px solid #ddd;
}

.ak-switch-confirmation ul.ak-switch-confirmation-items {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ak-switch-confirmation-items li {
        padding-bottom: 10px;
}


.ak-switch-confirmation-items .wc-item-meta {
	margin-top: 6px;
	font-size: 0.9em;
}

.ak-switch-confirmation-total {
	margin-top: 0px;
	border-top: 1px solid #ddd;
	border-bottom: 0;
}

/* Space out buttons in the subscription Actions row. */
.woocommerce-view-subscription tr:has(a.subscription_faq) td a.woocommerce-button {
	margin: 0 12px 10px 0;
}

/* Display FAQ on a separate line as a normal text link. */
.woocommerce-view-subscription a.woocommerce-button.button.subscription_faq {
	display: table;
	margin: 12px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: #163257;
	font-size: 0.9em;
	font-weight: 500;
	text-decoration: underline;
}

.woocommerce-view-subscription a.woocommerce-button.button.subscription_faq:hover {
	background: transparent;
	border: 0;
	color: #a02b43;
}

/*Separate our custom order into text fro the orders table*/
.ak-orders-intro {
	margin-bottom:20px;
}

/*Make the order rows with actual amount stand out*/
.woocommerce-orders-table tbody tr:has(.ak-order-has-charge) > th,
.woocommerce-orders-table tbody tr:has(.ak-order-has-charge) > td {
	background-color: #f5f5f5;
}

.woocommerce-page .recurring-totals th {
	font-size:20px;
}


/* Indent recurring-total labels beneath their section heading. */
.woocommerce-checkout-review-order-table tfoot tr.recurring-total > th, body.woocommerce-cart .cart_totals .shop_table tbody tr.recurring-total > th {
	padding-left: 2rem;
}

.woocommerce-info a.button.wc-forward {
	color:#fff;
}

/*Subs faqs*/
#faqs {
	margin-top:40px;
}
#faqs li {
	margin-top:15px;
	color: var(--ak-blue);
}

#faqs li p {
	color:#666;
}

/* Hide switch direction (up/down/cross grade) */
.subscription-switch-direction {
	display:none;
}

/*Style product bundle page*/

.ak-subscriptions-plan {
	--ak-blue: #163257;
	--ak-gold: #c9a05c;

	display: flex;
	flex-direction: column;
	height: 100%;
}

.ak-subscriptions-intro {
	color: #485465;
	font-size: 1rem;
	line-height: 1.65;
	margin: 0 0 1.5rem;
}

.ak-subscriptions-plan-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.9rem;
}

.ak-subscriptions-quantity {
	color: var(--ak-blue);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}

.ak-subscriptions-price {
	color: #485465;
	font-size: 0.95rem;
	margin: 0;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid #e5e8ec;
}

.ak-subscriptions-price strong {
	color: var(--ak-blue);
	font-weight: 700;
	letter-spacing: -0.03em;
}

.ak-subscriptions-benefits {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.ak-subscriptions-benefits li {
	position: relative;
	padding: 0.4rem 0 0.4rem 2rem;
	margin: 0;
	line-height: 1.5;
	font-size: 0.95rem;
}

.ak-subscriptions-benefits li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0.45rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.3rem;
	height: 1.3rem;
	border-radius: 50%;
	background: var(--ak-gold);
	color: var(--ak-blue);
	font-size: 0.8rem;
	font-weight: 800;
}


/* Configurator: compact circular remove button. */
button.wcbux-remove {
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 24px !important;
	min-width: 24px !important;
	height: 24px !important;
	min-height: 24px !important;
	padding: 0 !important;
	border: 1px solid #a02b43 !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: transparent !important;
	font-size: 0 !important;
	line-height: 0 !important;
	text-decoration: none !important;
	cursor: pointer;
	position: relative;
}

/*TODO move to wpbux plugin */
/* Draw a clean cross instead of the text X on selection slots */
button.wcbux-remove {
        position:absolute;
}
button.wcbux-remove::before,
button.wcbux-remove::after {
	content: "" !important;
	display: block !important;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 11px;
	height: 1.5px;
	padding: 0 !important;
	background: #a02b43;
	border: 0 !important;
	transform: translate(-50%, -50%) rotate(45deg);
}

button.wcbux-remove::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

button.wcbux-remove:hover {
	background: #a02b43 !important;
}

button.wcbux-remove:hover::before,
button.wcbux-remove:hover::after {
	background: #fff;
}

.wcbux-view-grid li.bundled_product.wcbux-selected {
	border: solid 2px #c9a05c;
}

.wcbux-card-controls .button.wcbux-add {
    margin:0 auto;
    width:90%;
}
