/* Hide prices for roles with hide_prices enabled */

/* Product pages */
body.se-hide-prices .woocommerce-Price-amount,
body.se-hide-prices .woocommerce-Price-currencySymbol,
body.se-hide-prices .product-price,
body.se-hide-prices .price {
	display: none !important;
}

/* Cart page - hide only price/subtotal columns, not the products */
body.se-hide-prices table.shop_table th.product-price,
body.se-hide-prices table.shop_table td.product-price,
body.se-hide-prices table.shop_table th.product-subtotal,
body.se-hide-prices table.shop_table td.product-subtotal {
	display: none !important;
}

/* Hide subtotal, tax, total, discount rows in cart */
body.se-hide-prices tr.cart-subtotal,
body.se-hide-prices tr.tax-rate,
body.se-hide-prices tr.tax-total,
body.se-hide-prices tr.fee,
body.se-hide-prices tr.order-total {
	display: none !important;
}

/* Hide "Subtotal" text in checkout table header */
body.se-hide-prices .woocommerce-checkout-review-order-table th.product-total {
	display: none !important;
}

/* Checkout page - hide product prices but show products */
body.se-hide-prices .woocommerce-review-order-table .product-total {
	display: none !important;
}

/* Hide product price text in checkout table */
body.se-hide-prices .woocommerce-review-order-table td.product-total,
body.se-hide-prices .woocommerce-review-order-table th.product-total {
	display: none !important;
}

/* Adjust product name column to full width when price is hidden */
body.se-hide-prices .woocommerce-review-order-table .product-name {
	display: block !important;
	width: 100% !important;
}

/* Keep product items visible but hide their amounts */
body.se-hide-prices .woocommerce-review-order-table tr:has(.product-name) {
	display: table-row !important;
}

/* Hide entire cart totals section when prices are hidden */
body.se-hide-prices .e-cart-totals,
body.se-hide-prices .cart-collaterals,
body.se-hide-prices .cart_totals,
body.se-hide-prices .e-cart__column-end {
	display: none !important;
}

/* Make cart table full width when totals are hidden */
body.se-hide-prices .e-cart__column-start {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
}

body.se-hide-prices .e-cart__container {
	grid-template-columns: 1fr !important;
}

body.se-hide-prices .e-cart-layout-two-column .e-cart__container {
	display: block !important;
}

body.se-hide-prices .woocommerce-cart-form,
body.se-hide-prices .e-shop-table {
	width: 100% !important;
	max-width: 100% !important;
}

/* Make product thumbnails larger when prices are hidden */
body.se-hide-prices .product-thumbnail {
	width: 150px !important;
}

body.se-hide-prices .product-thumbnail img {
	width: 150px !important;
	height: 150px !important;
	max-width: 150px !important;
	object-fit: cover;
}

/* Show the extra checkout button when prices are hidden and cart has items */
body.se-hide-prices:not(.woocommerce-cart-empty) #extrcartbtn {
	display: block !important;
}

#extrcartbtn {
	display: none;
	width: 100%;
	margin: 20px 0 0;
	text-align: right;
}

#extrcartbtn .checkout-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	text-decoration: none;
	white-space: nowrap;
}

body.se-hide-prices #extrcartbtn .checkout-button {
	background: var(--se-lg-btn-bg-hover, rgba(255, 255, 255, 0.98)) !important;
	color: #111827 !important;
	border: 1px solid var(--se-lg-btn-border, rgba(255, 255, 255, 0.35)) !important;
	box-shadow: var(--se-lg-btn-shadow, 0 2px 8px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.03));
	background-image: none !important;
	float: none !important;
	margin: 0;
	max-width: 100%;
}

body.se-hide-prices #extrcartbtn .checkout-button:hover,
body.se-hide-prices #extrcartbtn .checkout-button:focus {
	background: var(--se-lg-btn-bg-hover, rgba(255, 255, 255, 0.5)) !important;
	box-shadow: var(--se-lg-btn-shadow-hover, 0 4px 12px rgba(0, 0, 0, 0.07), 0 12px 32px rgba(0, 0, 0, 0.05));
	transform: translateY(-1px);
}

/* Hide the extra checkout button when prices are visible (default state) */
body:not(.se-hide-prices) #extrcartbtn {
	display: none !important;
}

/* Hide "Gå til kassen" button when cart is empty and prices are hidden */
body.se-hide-prices.woocommerce-cart-empty #extrcartbtn {
	display: none !important;
}

/* Change "Kurv total" to "Kurv" text using CSS as fallback */
body.se-hide-prices .cart_totals h2 {
	font-size: 0;
	line-height: 0;
	height: 0;
	overflow: hidden;
}

body.se-hide-prices .cart_totals h2::before {
	content: 'Kurv';
	font-size: 1.5em;
	line-height: 1.5;
	display: inline-block;
}

@media (max-width: 767px) {
	#extrcartbtn {
		text-align: stretch;
	}

	#extrcartbtn .checkout-button {
		width: 100%;
	}
}




