/* ==========================================================================
   Software Codes – checkout conversion styles
   ========================================================================== */

/* ---------- Removed parts (fallbacks; the blocks are also removed in PHP) ---------- */
.wp-block-woocommerce-checkout-order-note-block,
.wc-block-checkout__add-note,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block,
.wp-block-woocommerce-cart-order-summary-coupon-form-block,
.wc-block-components-totals-coupon,
.wc-block-components-address-form__phone,
.woocommerce-form-coupon-toggle,
.checkout_coupon {
	display: none !important;
}

/* ---------- Order button: larger, with lock ---------- */
.wc-block-components-checkout-place-order-button,
.wc-block-checkout__actions .wc-block-components-button.contained {
	min-height: 62px !important;
	padding: 0 24px !important;
	border-radius: 8px !important;
	background: #133c96 !important;
	color: #fff !important;
	font-size: 19px !important;
	font-weight: 600 !important;
	box-shadow: 0 6px 18px rgba(19, 60, 150, 0.28);
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-checkout-place-order-button:focus-visible {
	background: #2658c5 !important;
	box-shadow: 0 8px 22px rgba(38, 88, 197, 0.35);
}

.wc-block-components-checkout-place-order-button .wc-block-components-button__text {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.wc-block-components-checkout-place-order-button .wc-block-components-button__text > * {
	display: inline !important;
}

.wc-block-components-checkout-place-order-button .wc-block-components-button__text::before {
	content: "";
	display: inline-block;
	flex: 0 0 20px;
	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='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 11V8a5 5 0 0 1 10 0v3'/%3E%3Crect x='4.5' y='11' width='15' height='10' rx='2'/%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='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 11V8a5 5 0 0 1 10 0v3'/%3E%3Crect x='4.5' y='11' width='15' height='10' rx='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Button full width on small screens */
@media (max-width: 767.98px) {
	.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
		width: 100% !important;
	}
}

.wc-block-checkout__actions {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

/* ---------- Trust line under the button ---------- */
.sc-checkout-trust {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 18px;
	margin: 14px 0 0;
	padding: 14px 16px;
	list-style: none;
	background: #f5f7fb;
	border: 1px solid #e6e9f0;
	border-radius: 8px;
}

.sc-checkout-trust li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sc-checkout-trust li,
.sc-checkout-trust a {
	display: flex;
	align-items: center;
	gap: 9px;
	color: #374151;
	font-size: 14px;
	line-height: 1.3;
	text-decoration: none;
}

.sc-checkout-trust a:hover span {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sc-checkout-trust svg {
	flex: 0 0 18px;
	color: #047857;
}

@media (max-width: 479.98px) {
	.sc-checkout-trust {
		grid-template-columns: 1fr;
	}
}

/* ---------- Slim checkout footer ---------- */
.sc-checkout-footer {
	margin-top: 3rem;
	border-top: 1px solid #e6e9f0;
	background: #f7f8fb;
}

.sc-checkout-footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 24px;
	padding-top: 18px;
	padding-bottom: 18px;
	font-size: 14px;
	color: #6b7280;
}

.sc-checkout-footer nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
}

.sc-checkout-footer a {
	color: #4b5563;
	text-decoration: none;
}

.sc-checkout-footer a:hover {
	color: #133c96;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sc-checkout-footer p {
	margin: 0;
}

/* ==========================================================================
   Cart page (block cart)
   ========================================================================== */
.sc-cart-count {
	color: #6b7280;
	font-size: 0.75em;
	font-weight: 400;
}

/* table head */
.wc-block-cart .wc-block-cart-items__header th,
.wc-block-cart .wc-block-cart__totals-title {
	color: #6b7280 !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* rows */
.wc-block-cart .wc-block-cart-items__row {
	border-color: #e6e9f0 !important;
}

.wc-block-cart .wc-block-cart-items__row td {
	padding-top: 22px !important;
	padding-bottom: 22px !important;
}

.wc-block-cart .wc-block-cart-item__image img {
	width: 88px !important;
	height: 88px !important;
	object-fit: contain;
	padding: 6px;
	background: #fff;
	border: 1px solid #e6e9f0;
	border-radius: 8px;
	box-sizing: border-box;
}

.wc-block-cart .wc-block-components-product-name {
	color: #111 !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	line-height: 1.35;
	text-decoration: none !important;
}

.wc-block-cart .wc-block-components-product-name:hover {
	color: #133c96 !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

.wc-block-cart .wc-block-cart-item__prices {
	margin-top: 4px;
	color: #6b7280;
	font-size: 14px;
}

.wc-block-cart .wc-block-cart-item__total .wc-block-components-product-price__value {
	color: #111;
	font-size: 18px;
	font-weight: 800;
}

/* quantity selector (same look as on the product page) */
.wc-block-cart .wc-block-components-quantity-selector {
	width: auto !important;
	height: 42px;
	border: 1px solid #d5dbe7 !important;
	border-radius: 8px !important;
	overflow: hidden;
	background: #fff;
}

.wc-block-cart .wc-block-components-quantity-selector::after {
	display: none !important;
}

.wc-block-cart .wc-block-components-quantity-selector__input {
	width: 48px !important;
	min-width: 0 !important;
	color: #111 !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	border: 0 !important;
	box-shadow: none !important;
}

.wc-block-cart .wc-block-components-quantity-selector__button {
	min-width: 38px !important;
	background: #f4f6fa !important;
	color: #133c96 !important;
	font-size: 20px !important;
	opacity: 1 !important;
}

.wc-block-cart .wc-block-components-quantity-selector__button:hover:not(:disabled) {
	background: #133c96 !important;
	color: #fff !important;
}

.wc-block-cart .wc-block-components-quantity-selector__button:disabled {
	color: #b8c0d0 !important;
	background: #f8f9fb !important;
}

/* remove link */
.wc-block-cart .wc-block-cart-item__remove-link {
	color: #6b7280 !important;
	font-size: 13px !important;
	text-decoration: none !important;
	margin-top: 8px !important;
}

.wc-block-cart .wc-block-cart-item__remove-link:hover {
	color: #b91c1c !important;
	text-decoration: underline !important;
}

.wc-block-cart .wc-block-cart-item__quantity {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}

/* "Zurück zum Shop" (top right of the cart page) */
.sc-back-shop {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid #d5dbe7;
	border-radius: 8px;
	background: #fff;
	color: #133c96;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sc-back-shop:hover,
.sc-back-shop:focus-visible {
	border-color: #133c96;
	background: #eef1f8;
	color: #133c96;
}

/* totals box */
.wc-block-cart .wc-block-cart__sidebar {
	align-self: flex-start;
}

.wc-block-cart .wc-block-cart__sidebar {
	padding: 4px 20px 20px !important;
	background: #fff;
	border: 1px solid #e6e9f0;
	border-radius: 8px;
}

.wc-block-cart .wp-block-woocommerce-cart-order-summary-block,
.wc-block-cart .wp-block-woocommerce-cart-totals-block {
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
}

.wc-block-components-sidebar-layout.is-large .wc-block-cart__sidebar {
	position: sticky;
	top: 24px;
}

.wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: #111;
	font-size: 20px !important;
	font-weight: 800 !important;
}

/* "Weiter zur Kasse": same as the order button */
.wc-block-cart__submit-button {
	min-height: 60px !important;
	border-radius: 8px !important;
	background: #133c96 !important;
	color: #fff !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	box-shadow: 0 6px 18px rgba(19, 60, 150, 0.28);
}

.wc-block-cart__submit-button:hover,
.wc-block-cart__submit-button:focus-visible {
	background: #2658c5 !important;
}

.wc-block-cart__submit-button .wc-block-components-button__text {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	text-decoration: none !important;
}

.wc-block-cart__submit-button .wc-block-components-button__text::before {
	content: "";
	display: inline-block;
	flex: 0 0 20px;
	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='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 11V8a5 5 0 0 1 10 0v3'/%3E%3Crect x='4.5' y='11' width='15' height='10' rx='2'/%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='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 11V8a5 5 0 0 1 10 0v3'/%3E%3Crect x='4.5' y='11' width='15' height='10' rx='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wc-block-cart .sc-checkout-trust {
	grid-template-columns: 1fr;
	gap: 8px;
}

.wc-block-cart .wc-block-cart__payment-options {
	padding-top: 6px;
}

/* empty cart: cart icon instead of the sad face */
.wc-block-cart__empty-cart__title.with-empty-cart-icon::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.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='19.5' r='1.6'/%3E%3Ccircle cx='17' cy='19.5' r='1.6'/%3E%3Cpath d='M2.5 3.5h2.6l2.4 11.5h10.7l2.3-8H6.3'/%3E%3C/svg%3E") !important;
	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.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='19.5' r='1.6'/%3E%3Ccircle cx='17' cy='19.5' r='1.6'/%3E%3Cpath d='M2.5 3.5h2.6l2.4 11.5h10.7l2.3-8H6.3'/%3E%3C/svg%3E") !important;
	background: #133c96 !important;
}

.wc-block-cart__empty-cart__title {
	color: #111;
	font-size: 22px !important;
	font-weight: 700;
}

/* Less space between the header and the checkout */
.sc-checkout-focus .site-content {
	padding-top: 16px !important;
}

.sc-checkout-focus .wp-block-woocommerce-checkout {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

@media (max-width: 767.98px) {
	.wc-block-cart .wc-block-cart-items__row {
		grid-template-rows: auto !important;
		align-items: start;
		row-gap: 0 !important;
		padding: 16px 0 !important;
	}

	.wc-block-cart .wc-block-cart-items__row td {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
		margin-bottom: 0 !important;
	}

	.wc-block-cart .wc-block-cart-item__image img {
		width: 72px !important;
		height: 72px !important;
	}

	.wc-block-cart .wc-block-components-product-name {
		font-size: 16px !important;
	}

	.wc-block-cart .wc-block-cart__sidebar {
		padding: 4px 14px 14px !important;
	}
}

/* Payment options: names and logos a bit larger */
label[for^="radio-control-wc-payment-method-options-"] .wc-block-components-radio-control__label,
label[for^="radio-control-wc-payment-method-options-"] .wc-block-components-radio-control__label > span {
	font-size: 16.5px !important;
}

label[for^="radio-control-wc-payment-method-options-"] .wc-stripe-payment-method-icon img,
label[for^="radio-control-wc-payment-method-options-"] .wc-block-components-payment-method-icons img {
	height: 28px !important;
	width: auto !important;
	max-height: none !important;
}

/* ---------- Legal checkboxes ---------- */
.wp-block-woocommerce-checkout-additional-information-block .wc-block-components-checkout-step__heading,
.wc-block-checkout__additional-information-fields .wc-block-components-checkout-step__heading {
	display: none;
}

.wc-block-checkout__terms,
.wc-block-checkout__additional-information-fields .wc-block-components-checkbox,
.wp-block-woocommerce-checkout-additional-information-block .wc-block-components-checkbox {
	margin: 0 0 12px !important;
	padding: 0 !important;
	border: 0 !important;
}

.wc-block-checkout__terms .wc-block-components-checkbox__label,
.wp-block-woocommerce-checkout-additional-information-block .wc-block-components-checkbox__label {
	color: #4b5563;
	font-size: 14px;
	line-height: 1.45;
}

.wc-block-checkout__terms,
.wc-block-checkout__order-fields .wc-block-components-checkbox {
	margin-bottom: 6px !important;
}

.wc-block-checkout__terms a {
	color: #133c96;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sc-terms-privacy .wc-block-components-checkbox__label,
.wc-block-checkout__terms:not(:has(input)) .wc-block-components-checkbox__label {
	display: block;
	margin-top: 0;
	color: #6b7280;
	font-size: 13px;
}

.wc-block-checkout__order-fields.wp-block-woocommerce-checkout-additional-information-block {
	margin-bottom: 8px !important;
}

/* Mobile: no collapsible "Bestellübersicht" at the top – the complete
   summary is shown right above the "Bestellung aufgeben" button. */
.wc-block-checkout:not(.is-large) .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block,
.wc-block-checkout:not(.is-large) .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title {
    display: none !important;
}

.wc-block-checkout:not(.is-large) .wc-block-checkout__sidebar {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}
