/* Cart, checkout and account pages (inc/assets.php). Buttons, form fields and the classic
   notices come from base.css; this file lays out WooCommerce's markup (its own CSS is off)
   and brings the Cart and Checkout blocks to the design tokens. */

/* Tables: cart, order review, orders, order details */

.shop_table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: var(--space-4);
}

.shop_table th,
.shop_table td {
	padding: var(--space-3) var(--space-2);
	border-bottom: 1px solid var(--line);
	text-align: start;
	vertical-align: middle;
}

.shop_table thead th {
	padding-top: 0;
	font-weight: 600;
}

.shop_table tfoot th {
	font-weight: 400;
}

.shop_table .order-total th,
.shop_table .order-total td {
	border-bottom: 0;
	font-size: 16px;
	font-weight: 600;
}

.shop_table img {
	width: 64px;
	height: auto;
}

.shop_table .product-remove {
	width: 32px;
}

.shop_table a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: var(--radius-pill);
	color: var(--ink-muted);
	font-size: 20px;
	line-height: 1;
	text-decoration: none;
}

.shop_table a.remove:hover {
	background: var(--surface-alt);
	color: var(--ink);
}

.shop_table td.actions {
	padding-top: var(--space-4);
	border-bottom: 0;
}

.shop_table .coupon {
	display: inline-flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.shop_table .coupon label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.shop_table td.actions > .button {
	float: inline-end;
}

.woocommerce-shipping-methods,
.wc_payment_methods {
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-shipping-methods li + li {
	margin-top: var(--space-1);
}

/* Narrow screens: rows become cards with WooCommerce's data-title labels. */
@media (max-width: 767px) {
	.shop_table_responsive thead {
		display: none;
	}

	.shop_table_responsive tr {
		display: block;
		border-bottom: 1px solid var(--line);
	}

	.shop_table_responsive tr td {
		display: block;
		padding: var(--space-2) 0;
		border-bottom: 0;
		text-align: end;
	}

	.shop_table_responsive tr td::before {
		content: attr(data-title);
		float: inline-start;
		font-weight: 600;
	}

	.shop_table_responsive tr td.product-remove,
	.shop_table_responsive tr td.product-thumbnail,
	.shop_table_responsive tr td.actions {
		text-align: start;
	}

	.shop_table_responsive tr td.product-remove::before,
	.shop_table_responsive tr td.product-thumbnail::before,
	.shop_table_responsive tr td.actions::before {
		content: none;
	}

	/* The totals table stays label | value. */
	.cart_totals .shop_table_responsive tr {
		display: table-row;
		border-bottom: 0;
	}

	.cart_totals .shop_table_responsive tr th,
	.cart_totals .shop_table_responsive tr td {
		display: table-cell;
		padding: var(--space-3) 0;
		border-bottom: 1px solid var(--line);
	}

	.shop_table .coupon {
		display: flex;
		margin-bottom: var(--space-2);
	}

	.shop_table .coupon .input-text {
		flex: 1 1 0;
		min-width: 0;
	}

	.shop_table td.actions > .button {
		float: none;
		width: 100%;
	}
}

/* Totals boxes: classic cart and checkout, Cart and Checkout blocks */

.cart_totals,
.woocommerce-checkout-review-order,
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
	padding: var(--space-4);
	background: var(--surface-soft);
	border-radius: var(--radius-md);
}

.cart_totals h2,
#order_review_heading {
	margin: 0 0 var(--space-3);
	font-size: 20px;
	line-height: 28px;
	font-weight: 600;
}

.cart_totals .shop_table,
.woocommerce-checkout-review-order .shop_table {
	margin-bottom: var(--space-3);
}

.cart_totals .shop_table th,
.woocommerce-checkout-review-order .shop_table th {
	padding-inline-start: 0;
}

.cart_totals .shop_table td,
.woocommerce-checkout-review-order .shop_table td {
	padding-inline-end: 0;
	text-align: end;
}

.woocommerce-checkout-review-order .shop_table thead th:first-child,
.woocommerce-checkout-review-order .shop_table tbody td:first-child {
	padding-inline-start: 0;
	text-align: start;
}

.cart_totals .shop_table_responsive tr td::before {
	content: none;
}

@media (min-width: 768px) {
	.cart-collaterals .cart_totals {
		width: 48%;
		margin-inline-start: auto;
	}
}

/* Primary actions: "Ödemeye Geç" and "Siparişi Onayla" fill the totals box. */

.wc-proceed-to-checkout .checkout-button,
.place-order .button,
.wc-block-components-button.wc-block-cart__submit-button,
.wc-block-components-button.wc-block-components-checkout-place-order-button {
	width: 100%;
}

/* Checkout payment methods and terms */

#payment {
	padding-top: var(--space-3);
	border-top: 1px solid var(--line);
}

.wc_payment_method + .wc_payment_method {
	margin-top: var(--space-2);
}

.wc_payment_method > label {
	font-weight: 600;
}

.payment_box {
	margin: var(--space-2) 0 0;
	padding: var(--space-3);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink-muted);
}

.payment_box p {
	margin: 0;
}

.place-order {
	margin: var(--space-3) 0 0;
}

.woocommerce-terms-and-conditions-wrapper {
	margin-bottom: var(--space-3);
	color: var(--ink-muted);
}

/* Forms: two-column layouts and half-width rows from 768px, as WooCommerce lays them out */

.col2-set {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-5);
	margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
	.col2-set {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-6);
	}

	.form-row-first,
	.form-row-last {
		width: calc(50% - var(--space-2));
	}

	.form-row-first {
		float: inline-start;
	}

	.form-row-last {
		float: inline-end;
	}
}

.form-row-wide,
.woocommerce-form-row--wide,
form .clear {
	clear: both;
}

.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-address-fields__field-wrapper,
.woocommerce-EditAccountForm,
.checkout_coupon,
.woocommerce-form-login,
.woocommerce-form-register,
.lost_reset_password {
	display: flow-root;
}

.col2-set h2,
.col2-set h3,
.woocommerce-billing-fields h3,
.woocommerce-additional-fields h3 {
	margin: 0 0 var(--space-3);
	font-size: 20px;
	line-height: 28px;
	font-weight: 600;
}

/* Select2 (WooCommerce's country/province selector): the visible span gets the field style. */

.select2-container--default .select2-selection--single {
	height: 44px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0;
	padding-inline: var(--space-3) 44px;
	color: var(--ink);
	line-height: 42px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: var(--ink-muted);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
	top: 1px;
	inset-inline-end: var(--space-2);
	height: 42px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-top-color: var(--ink);
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
	border-bottom-color: var(--ink);
}

.select2-dropdown {
	border-color: var(--line-strong);
	border-radius: var(--radius-sm);
	font-family: var(--font-sans);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
	height: 36px;
	border-color: var(--line-strong);
	border-radius: var(--radius-sm);
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
	background: var(--surface-alt);
	color: var(--ink);
}

.woocommerce-invalid .select2-container--default .select2-selection--single,
.woocommerce-invalid .input-text,
.woocommerce-invalid select {
	border-color: var(--accent);
}

.checkout-inline-error-message {
	margin: var(--space-1) 0 0;
	color: var(--accent);
	font-size: 13px;
	line-height: 20px;
}

#ship-to-different-address label {
	font-size: 16px;
}

.woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	cursor: pointer;
}

.woocommerce-form__label-for-checkbox input {
	margin: 0;
}

/* Account login: one centred card (buntera-core's otp-login lays out its inside) */

.bt-login {
	max-width: 440px;
	margin: var(--space-5) auto var(--space-6);
}

.bt-login .woocommerce-form-login {
	padding: var(--space-5);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	background: var(--surface);
}

@media (max-width: 479px) {
	.bt-login {
		margin-top: var(--space-3);
	}

	.bt-login .woocommerce-form-login {
		padding: var(--space-4) var(--space-3);
	}
}

.woocommerce-form-login__rememberme {
	margin-bottom: var(--space-3);
}

.woocommerce-form-login .woocommerce-form-login__submit,
.woocommerce-form-register .woocommerce-form-register__submit {
	min-width: 160px;
}

.woocommerce-LostPassword {
	margin: var(--space-3) 0 0;
}

.woocommerce-LostPassword a {
	color: var(--ink);
}

/* Password field: WooCommerce's show/hide button sits inside the field, drawn as an eye. */

.password-input {
	position: relative;
	display: block;
}

.password-input input {
	width: 100%;
	padding-inline-end: 44px;
}

.password-input .show-password-input {
	position: absolute;
	top: 0;
	inset-inline-end: 0;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ink-muted);
}

.password-input .show-password-input:hover {
	background: transparent;
	color: var(--ink);
}

.password-input .show-password-input::before {
	content: "";
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.password-input .show-password-input.display-password::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M4 4l16 16'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M4 4l16 16'/%3E%3C/svg%3E");
}

/* Account: navigation beside the content from 768px */

.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0 0 var(--space-4);
	padding: 0;
	border-top: 1px solid var(--line);
}

.woocommerce-MyAccount-navigation li {
	border-bottom: 1px solid var(--line);
}

.woocommerce-MyAccount-navigation a {
	display: block;
	padding: var(--space-2) 0;
	color: var(--ink);
	text-decoration: none;
}

.woocommerce-MyAccount-navigation a:hover,
.woocommerce-MyAccount-navigation .is-active a {
	font-weight: 600;
}

@media (min-width: 768px) {
	.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) {
		display: grid;
		grid-template-columns: 240px minmax(0, 1fr);
		gap: var(--space-6);
	}
}

/* Cart and Checkout blocks: theme fonts, colors and buttons instead of the block defaults */

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
	font-family: var(--font-sans);
	color: var(--ink);
}

.wp-block-woocommerce-cart .has-large-font-size,
.wp-block-woocommerce-checkout .has-large-font-size {
	font-size: 20px;
	line-height: 28px;
}

.wc-block-components-button.wp-element-button,
.wc-block-components-button.contained {
	height: 44px;
	padding: 0 var(--space-4);
	border: 1px solid var(--action);
	border-radius: var(--radius-sm);
	background: var(--action);
	color: var(--on-action);
	font: 600 14px/20px var(--font-sans);
	text-decoration: none;
}

.wc-block-components-button.wp-element-button:hover,
.wc-block-components-button.contained:hover {
	border-color: var(--ink-muted);
	background: var(--ink-muted);
	color: var(--on-action);
}

.wc-block-components-button.wp-element-button:focus-visible,
.wc-block-components-button.contained:focus-visible {
	box-shadow: none;
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

.wc-block-components-button.wp-element-button[disabled],
.wc-block-components-button.contained[disabled] {
	border-color: var(--line);
	background: var(--surface-alt);
	color: var(--ink-muted);
	cursor: not-allowed;
}

.wc-block-components-totals-item__value,
.wc-block-components-product-price,
.wc-block-cart-item__total {
	font-weight: 600;
}

.wc-block-components-product-name {
	color: var(--ink);
}

.wc-block-components-quantity-selector {
	border-color: var(--line-strong);
	border-radius: var(--radius-sm);
}

.wc-block-components-quantity-selector::after {
	border-color: var(--line-strong);
	border-radius: var(--radius-sm);
}

.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="number"] {
	border-color: var(--line-strong);
	border-radius: var(--radius-sm);
}

.wc-block-cart-items,
.wc-block-cart-items th,
.wc-block-cart-items td,
.wc-block-cart .wc-block-components-totals-wrapper,
.wc-block-components-totals-wrapper {
	border-color: var(--line);
}

/* Block notices: the same box as the classic notices in base.css. */

.wc-block-components-notice-banner,
.wc-block-components-notice-banner.is-error,
.wc-block-components-notice-banner.is-info,
.wc-block-components-notice-banner.is-success,
.wc-block-components-notice-banner.is-warning {
	margin: 0 0 var(--space-4);
	padding: var(--space-3);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	background: var(--surface-soft);
	color: var(--ink);
	font-size: 14px;
}

.wc-block-components-notice-banner.is-error {
	border-top: 3px solid var(--accent);
}

.wc-block-components-notice-banner > svg {
	display: none;
}
