/**
 * Gledesgaver Caddy 3.x presentation.
 *
 * This file intentionally changes presentation only. Cart operations remain
 * entirely controlled by Caddy and the WooCommerce Store API.
 */

:root {
	--cc-window-width: 400px;
	--cc-window-bg-color: #fff;
	--cc-window-text-color: #111;
	--cc-window-muted-text-color: #888;
	--cc-window-border-color: #e9e9e9;
	--cc-meter-color: #111;
	--cc-meter-completed-color: #111;
	--cc-checkout-button-bg-color: #abe7d3;
	--cc-checkout-button-text-color: #1c3151;
	--cc-checkout-button-hover-bg-color: #9edcc8;
	--cc-checkout-button-hover-text-color: #1c3151;
	--cc-checkout-button-icon-color: #1c3151;
	--cc-button-border-radius: 24px;
	--cc-thumb-width-d: 70px;
	--cc-thumb-width-m: 70px;
}

/* Drawer and old-style text tabs. */
.cc-window {
	font-family: Poppins, Arial, sans-serif;
	width: var(--cc-window-width);
}

.cc-header-bar {
	justify-content: flex-start;
	min-height: 47px;
	padding: 0 40px;
}

.cc-header-back {
	left: auto;
	position: absolute;
	right: 12px;
	top: 13px;
	z-index: 2;
}

.cc-header-title {
	border-bottom: 2px solid #111;
	color: #111;
	font-size: 14px;
	font-weight: 400;
	left: auto;
	padding: 14px 0 10px;
	pointer-events: auto;
	position: static;
	transform: none;
}

.cc-header-title .cc-cart-tab-count {
	display: none !important;
}

.cc-header-icons {
	align-self: stretch;
	gap: 0;
	margin-left: 28px;
}

.cc-header-icons .cc-save-nav {
	align-items: center;
	border-bottom: 2px solid transparent;
	display: flex !important;
	font-size: 0;
	padding: 14px 0 10px;
}

.cc-header-icons .cc-save-nav i,
.cc-header-icons .cc-saved-tab-count {
	display: none !important;
}

.cc-header-icons .cc-save-nav::after {
	color: #777;
	content: "Lagrede varer";
	font-size: 14px;
	font-weight: 400;
}

.cc-header-icons .cc-save-nav.active {
	border-bottom-color: #111;
}

.cc-header-icons .cc-save-nav.active::after {
	color: #111;
}

/* When viewing saved items, the existing back control becomes the cart tab. */
.cc-header-bar:has(.cc-save-nav.active) .cc-header-back {
	align-items: center;
	border-bottom: 2px solid transparent;
	display: flex;
	font-size: 0;
	left: auto;
	order: 1;
	padding: 14px 0 10px;
	position: static;
	right: auto;
	top: auto;
	width: auto;
}

.cc-header-bar:has(.cc-save-nav.active) .cc-header-back svg {
	display: none !important;
}

.cc-header-bar:has(.cc-save-nav.active) .cc-header-back::after {
	color: #777;
	content: "Handlevogn";
	font-size: 14px;
}

.cc-header-bar:has(.cc-save-nav.active) .cc-header-title {
	margin-left: 28px;
	order: 2;
}

.cc-header-bar:has(.cc-save-nav.active) .cc-header-icons {
	display: none;
}

/* Put cart products on white rows over the previous light-grey body. */
.cc-cart-container {
	background: #f5f5f5;
}

.cc-body-container {
	background: #f5f5f5;
	min-height: 0;
	order: 1;
}

.cc-body {
	background: #f5f5f5;
}

.cc-cart-items {
	background: #fff;
}

.cc-cart-product-list {
	background: #fff;
	border-bottom: 1px solid #ededed;
	border-top: 0;
	margin: 0;
	min-height: 122px;
	padding: 15px 18px 15px 66px;
}

.cc-product-thumb {
	background: #fafafa;
	border-radius: 0;
	height: 70px;
	margin-right: 15px;
	width: 70px;
}

.cc-product-thumb img {
	border-radius: 0;
}

.cc_item_content {
	flex: 1;
	min-width: 0;
	position: static;
}

.cc-item-content-top {
	display: grid !important;
	grid-template-areas:
		"title"
		"price"
		"variation"
		"quantity";
	grid-template-columns: minmax(0, 1fr);
	position: relative;
}

.cc_item_title {
	display: contents !important;
	font-weight: 600;
	margin: 0;
	width: auto;
}

.cc_item_title > .cc-product-link {
	grid-area: title;
	line-height: 1.35;
}

.cc_item_title > .cc_item_variation,
.cc_item_title > dl.variation {
	grid-area: variation;
}

.cc-item-content-top > .cc_item_total_price {
	font-size: 14px;
	font-weight: 400;
	grid-area: price;
	margin-top: 3px;
	text-align: left;
}

.cc_item_quantity_wrap {
	gap: 5px;
	grid-area: quantity;
	margin: 8px 0 0;
}

.cc_item_quantity_update {
	background: #f1f1f1;
	border: 0 !important;
	border-radius: 2px !important;
	height: 33px;
	padding: 5px;
	width: 30px;
}

.cc_item_quantity_wrap input.cc_item_quantity {
	background: transparent;
	border: 0 !important;
	height: 33px;
	min-height: 33px;
	width: 24px;
}

#cc-cart .cc_sfl_btn {
	display: none;
}

.cc-item-content-bottom {
	position: static;
}

.cc-cart-product a.cc-remove-item,
.woocommerce .cc-cart-product a.cc-remove-item {
	left: 16px;
	margin: 0;
	position: absolute;
	top: 17px;
}

.cc-remove-item svg {
	color: #6b7e82;
	fill: none !important;
	height: 16px;
	stroke: currentColor;
	width: 16px;
}

.cc-remove-item svg path {
	fill: none !important;
	stroke: currentColor;
}

/* Restore the shipping meter immediately above the totals. */
.cc-fs.cc-text-left {
	background: #fff;
	border-bottom: 0;
	border-top: 1px solid #e9e9e9;
	order: 2;
	padding: 14px 20px 10px !important;
	position: static;
	z-index: 1;
}

.cc-fs-title {
	font-size: 14px;
	font-weight: 400;
}

.cc-fs-icon {
	display: inline-block;
	font-size: 0;
	margin-right: 8px;
	position: static;
}

.cc-fs-icon svg {
	display: none;
}

.cc-fs-icon::before {
	content: "📦";
	font-size: 20px;
}

.cc-fs-meter {
	background: #d7d7d7;
	height: 5px;
	margin-top: 10px;
}

.cc-fs-meter-used,
.cc-fs-meter-used.cc-bar-active {
	animation: none;
	background: #111 !important;
	background-image: none;
	height: 5px;
}

/* Old subtotal and mint checkout button. */
.cc-cart-actions {
	background: #fff;
	border-top: 1px solid #e9e9e9;
	order: 3;
	padding: 10px 20px 14px;
	position: static;
	width: 100%;
}

.cc-cart-actions .cc-totals {
	padding-top: 0;
}

.cc-cart-actions .cc-totals .cc-total-text,
.cc-cart-actions .cc-totals .cc-total-amount {
	font-size: 14px;
}

.cc-total-box .cc-subtotal-subtext {
	color: #999;
	display: block;
	font-size: 11px;
	font-weight: 400;
	margin-top: 3px;
}

.cc-cart-actions a.cc-button-primary {
	border-radius: 24px !important;
	font-size: 15px !important;
	margin-top: 13px !important;
	padding: 11px 20px 13px !important;
}

.cc-cart-actions a.cc-button-primary:hover {
	padding-left: 20px !important;
}

.cc-cart-actions a.cc-button-primary .cc-icon-lock,
.cc-cart-actions a.cc-button-primary .cc-icon-arrow-right {
	display: none;
}

@media only screen and (max-width: 768px) {
	:root {
		--cc-window-width: 100%;
	}

	.cc-window {
		width: 100%;
	}

	.cc-header-bar {
		padding-left: 24px;
		padding-right: 40px;
	}

	.cc-cart-product-list {
		margin: 0;
		padding-left: 58px;
		padding-right: 15px;
	}

	.cc-cart-product a.cc-remove-item,
	.woocommerce .cc-cart-product a.cc-remove-item {
		left: 15px;
	}

	.cc-fs.cc-text-left {
		padding: 12px 20px 10px !important;
		text-align: left !important;
	}

	.cc-cart-actions {
		bottom: 0;
		padding: 10px 20px 14px;
	}
}
