/*
 * Runeveil - WooCommerce surfaces (shop, product, cart, checkout, account).
 * Loaded only on WooCommerce pages.
 */

/* ---------- Single product ---------- */
.wp-block-woocommerce-product-image-gallery,
.woocommerce-product-gallery {
	background: var(--wp--preset--color--panel);
	border: 1px solid var(--wp--preset--color--line);
	padding: 6px;
}

.woocommerce-product-gallery .flex-control-thumbs li img {
	opacity: .6;
	transition: opacity .2s ease;
}

.woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
.woocommerce-product-gallery .flex-control-thumbs li img:hover {
	opacity: 1;
}

/* Product details tabs (Description / Reviews / Additional information). */
.wp-block-woocommerce-product-details .woocommerce-tabs ul.tabs,
.woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem 2rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Tabs use WooCommerce's "minimal" style; tint it to match. */
html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li a {
	font-family: var(--wp--preset--font-family--barlow);
	font-size: .9rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: .75em 1.1em;
}

html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li.active,
html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li:hover {
	border-color: var(--wp--preset--color--lilac);
	color: var(--wp--preset--color--lilac);
}

html body .wp-block-woocommerce-product-details .woocommerce-Tabs-panel > h2:first-child {
	font-size: var(--wp--preset--font-size--large);
}

/* Variation selectors and quantity. */
.variations select,
.quantity .qty,
.wc-block-components-quantity-selector {
	background: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--chalk) !important;
	border: 1px solid var(--wp--preset--color--line) !important;
}

.wc-block-components-quantity-selector input,
.wc-block-components-quantity-selector button {
	color: var(--wp--preset--color--chalk) !important;
}

.variations th.label,
.variations td.label {
	font-family: var(--wp--preset--font-family--barlow);
	letter-spacing: .1em;
	text-transform: uppercase;
	font-size: .85rem;
}

.reset_variations {
	font-size: .85rem;
}

.single_add_to_cart_button,
.wc-block-components-product-button__button,
.wp-block-button__link.add_to_cart_button {
	font-family: var(--wp--preset--font-family--barlow) !important;
	letter-spacing: .14em !important;
	text-transform: uppercase;
	font-weight: 700 !important;
	border-radius: 0 !important;
}

.wc-block-components-product-button__button:not(.is-style-outline),
.single_add_to_cart_button {
	background: var(--wp--preset--color--lilac) !important;
	color: var(--wp--preset--color--ink) !important;
	border: 1px solid var(--wp--preset--color--lilac) !important;
}

.wc-block-components-product-button__button:hover,
.single_add_to_cart_button:hover {
	background: var(--wp--preset--color--lilac-light) !important;
}

/* Stock */
.stock.in-stock,
.wc-block-components-product-stock-indicator--in-stock {
	color: #8fbf8f;
}

.stock.out-of-stock,
.wc-block-components-product-stock-indicator--out-of-stock {
	color: #d98b8b;
}

/* ---------- Reviews ---------- */
#reviews .commentlist {
	list-style: none;
	margin: 0;
	padding: 0;
}

#reviews .commentlist li {
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

#reviews .commentlist .avatar {
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--lilac);
	float: left;
	margin-right: 1rem;
}

#reviews .comment-text .meta {
	color: var(--wp--preset--color--smoke);
	font-size: .95rem;
}

#reviews .woocommerce-review__verified {
	color: var(--wp--preset--color--lilac);
	font-style: italic;
}

#review_form_wrapper {
	margin-top: 2rem;
	padding: 1.5rem;
	background: var(--wp--preset--color--panel);
	border: 1px solid var(--wp--preset--color--line);
}

.comment-form-rating .stars a {
	color: var(--wp--preset--color--lilac);
}

/* ---------- Cart & checkout (blocks) ---------- */
.wc-block-cart,
.wc-block-checkout {
	--rv-panel: var(--wp--preset--color--panel);
}

.wc-block-components-sidebar-layout .wc-block-components-sidebar .wc-block-components-panel,
.wc-block-components-sidebar-layout .wc-block-components-sidebar .wc-block-components-totals-wrapper,
.wp-block-woocommerce-checkout-order-summary-block {
	border-color: var(--wp--preset--color--line) !important;
}

.wp-block-woocommerce-checkout-order-summary-block,
.wc-block-cart__sidebar {
	background: var(--rv-panel);
	padding: 1rem;
}

.wc-block-components-radio-control--highlight-checked,
.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option {
	background: transparent;
}

.wc-block-components-radio-control--highlight-checked::after,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--lilac) !important;
}

.wc-block-components-radio-control__input,
.wc-block-components-checkbox__input[type="checkbox"] {
	background: var(--wp--preset--color--ink) !important;
	border-color: var(--wp--preset--color--smoke) !important;
}

.wc-block-components-radio-control__input:checked::before {
	background: var(--wp--preset--color--lilac) !important;
}

.wc-block-components-checkbox__mark {
	fill: var(--wp--preset--color--lilac) !important;
}

.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button,
.wc-block-mini-cart__footer-checkout {
	background: var(--wp--preset--color--lilac) !important;
	color: var(--wp--preset--color--ink) !important;
	border-radius: 0 !important;
	font-family: var(--wp--preset--font-family--barlow) !important;
	letter-spacing: .12em;
	text-transform: uppercase;
	font-weight: 700 !important;
}

.wc-block-components-checkout-place-order-button:hover,
.wc-block-cart__submit-button:hover {
	background: var(--wp--preset--color--lilac-light) !important;
}

.wc-block-components-totals-item__label,
.wc-block-components-totals-item__description {
	color: var(--wp--preset--color--smoke);
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-product-price,
.wc-block-components-order-summary-item__total-price {
	color: var(--wp--preset--color--lilac);
}

.wc-block-components-order-summary-item__quantity {
	background: var(--wp--preset--color--lilac) !important;
	color: var(--wp--preset--color--ink) !important;
	border-color: var(--wp--preset--color--ink) !important;
	box-shadow: none !important;
}

.wc-block-components-formatted-money-amount {
	font-variant-numeric: tabular-nums;
}

/* Address autocomplete / select dropdowns that default to white. */
.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list,
.components-form-token-field__suggestions-list {
	background: var(--wp--preset--color--panel) !important;
	color: var(--wp--preset--color--chalk) !important;
}

/* ---------- My Account ---------- */
.woocommerce-account .woocommerce {
	display: grid;
	gap: 2rem;
}

@media (min-width: 782px) {
	.woocommerce-account .woocommerce {
		grid-template-columns: 240px 1fr;
	}
	.woocommerce-account .woocommerce > .woocommerce-notices-wrapper {
		grid-column: 1 / -1;
	}
}

.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--panel);
}

.woocommerce-MyAccount-navigation li a {
	display: block;
	padding: .75rem 1rem;
	color: var(--wp--preset--color--chalk);
	font-family: var(--wp--preset--font-family--barlow);
	font-size: .85rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-decoration: none;
}

.woocommerce-MyAccount-navigation li:last-child a {
	border-bottom: 0;
}

.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
	color: var(--wp--preset--color--lilac);
	background: var(--wp--preset--color--ink);
}

.woocommerce table.shop_table,
.woocommerce-orders-table,
.woocommerce-table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--wp--preset--font-family--system);
	font-size: 1rem;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: .75rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-align: left;
}

.woocommerce table.shop_table th {
	font-family: var(--wp--preset--font-family--barlow);
	font-size: .8rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--smoke);
}

.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button {
	display: inline-block;
	background: var(--wp--preset--color--lilac);
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--lilac);
	padding: .6em 1.2em;
	font-family: var(--wp--preset--font-family--barlow);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
}

.woocommerce .button:hover {
	background: var(--wp--preset--color--lilac-light);
	text-decoration: none;
}

.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
	list-style: none;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	background: var(--wp--preset--color--panel);
	border-left: 3px solid var(--wp--preset--color--lilac);
	font-family: var(--wp--preset--font-family--system);
	font-size: 1rem;
}

.woocommerce-error {
	border-left-color: var(--wp--preset--color--lilac);
}

.woocommerce form .form-row {
	margin: 0 0 1rem;
}

.woocommerce form .form-row label {
	display: block;
	margin-bottom: .35rem;
	color: var(--wp--preset--color--smoke);
	font-family: var(--wp--preset--font-family--system);
	font-size: .9rem;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
	width: 100%;
	box-sizing: border-box;
}

/* Order status badges (used by Runeveil Store Kit). */
mark.order-status {
	background: transparent;
	color: var(--wp--preset--color--lilac);
	font-weight: 600;
}

/* ---------- Block checkout fields on torn panels ---------- */
.is-style-torn .wc-block-components-text-input input,
.is-style-torn .wc-block-components-text-input textarea,
.is-style-torn .wc-block-components-textarea,
.is-style-torn .wc-blocks-components-select .wc-blocks-components-select__select,
.is-style-torn .wc-block-components-combobox .wc-block-components-combobox-control input,
.is-style-torn .wc-block-components-form .wc-block-components-text-input input:-webkit-autofill {
	background: rgba(236, 235, 232, .05) !important;
	color: var(--wp--preset--color--chalk) !important;
	border: 1px solid rgba(236, 235, 232, .32) !important;
	border-radius: 0 !important;
	-webkit-text-fill-color: var(--wp--preset--color--chalk);
	box-shadow: none !important;
}

.is-style-torn .wc-block-components-text-input input:focus,
.is-style-torn .wc-blocks-components-select .wc-blocks-components-select__select:focus {
	border-color: var(--wp--preset--color--lilac) !important;
	box-shadow: 0 0 0 1px var(--wp--preset--color--lilac) !important;
}

.is-style-torn .wc-block-components-text-input label,
.is-style-torn .wc-blocks-components-select .wc-blocks-components-select__label,
.is-style-torn .wc-block-components-combobox label {
	color: var(--wp--preset--color--smoke) !important;
}

.is-style-torn .wc-blocks-components-select__select option {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--chalk);
}

.is-style-torn .wc-blocks-components-select__expand {
	fill: var(--wp--preset--color--chalk);
}

.is-style-torn .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	background: transparent !important;
	border: 1px solid rgba(236, 235, 232, .5) !important;
}

.is-style-torn .wc-block-components-order-summary-item__image img {
	border: 1px solid var(--wp--preset--color--line);
}

.is-style-torn .wc-blocks-components-select .wc-blocks-components-select__container {
	background: transparent !important;
	color: var(--wp--preset--color--chalk);
	border-radius: 0;
}

.is-style-torn .wc-blocks-components-select .wc-blocks-components-select__select {
	color: var(--wp--preset--color--chalk) !important;
}
