/* Frisk Core – mini cart panel of the Cart widget.
   Title bar, a product list that scrolls on its own, and a footer with the
   subtotal and buttons that always stays in view. Widget style controls set
   the --gc-mc-* variables and the colours. */

.gc-cart-panel .gc-mc {
	--gc-mc-text: var(--white-color, #fff);
	--gc-mc-muted: rgba(255, 255, 255, .62);
	--gc-mc-line: rgba(255, 255, 255, .12);
	--gc-mc-line-strong: rgba(255, 255, 255, .24);
	--gc-mc-accent: var(--theme-color, #e3ff04);
	--gc-mc-ink: var(--title-color, #0a0c00);
	--gc-mc-thumb: 92px;
	--gc-mc-pad: 36px;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	color: var(--gc-mc-text);
}

/* The page dims behind the panel (Backdrop Color control); a click there closes it */
.sidemenu-wrapper.gc-hp-panel.gc-cart-panel {
	background-color: rgba(10, 12, 0, .5);
}

/* Panel: full height, no own scroll (the list scrolls) */
.sidemenu-wrapper.gc-hp-panel.gc-cart-panel .sidemenu-content {
	display: flex;
	flex-direction: column;
	width: 460px;
	max-width: 100%;
	padding: 0;
	overflow: hidden;
}

/* Close button, in line with the title */
.sidemenu-wrapper.gc-hp-panel.gc-cart-panel .closeButton {
	z-index: 2;
	width: 44px;
	height: 44px;
	top: 26px;
	right: 28px;
	line-height: 1;
	border: 1px solid var(--gc-mc-line-strong, rgba(255, 255, 255, .24));
	color: var(--white-color, #fff);
	transition: color .3s ease, background-color .3s ease, border-color .3s ease, transform .4s ease;
}
.sidemenu-wrapper.gc-hp-panel.gc-cart-panel .closeButton .gc-icon {
	width: 18px;
	height: 18px;
}
.sidemenu-wrapper.gc-hp-panel.gc-cart-panel .closeButton:hover {
	color: var(--title-color, #0a0c00);
	background-color: var(--theme-color, #e3ff04);
	border-color: var(--theme-color, #e3ff04);
}

/* Title bar */
.gc-cart-panel .gc-mc-head {
	position: relative;
	flex: none;
	padding: 35px 96px 29px var(--gc-mc-pad);
	border-bottom: 1px solid var(--gc-mc-line);
	overflow: hidden;
}
.gc-cart-panel .gc-mc .gc-mc-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	font-family: var(--title-font);
	font-size: 20px;
	font-weight: 600;
	line-height: 26px;
	color: var(--gc-mc-text);
}
.gc-cart-panel .gc-mc-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 8px;
	border-radius: 13px;
	background: var(--gc-mc-accent);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	color: var(--gc-mc-ink);
	font-variant-numeric: tabular-nums;
}
.gc-cart-panel .gc-mc-count.is-zero {
	display: none;
}
.gc-cart-panel .gc-mc .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Working: a bar runs under the title */
.gc-cart-panel .gc-mc-head::after {
	content: "";
	position: absolute;
	bottom: 0;
	inset-inline-start: 0;
	width: 40%;
	height: 2px;
	background: var(--gc-mc-accent);
	opacity: 0;
	transform: translateX(-100%);
}
.gc-cart-panel.is-busy .gc-mc-head::after {
	opacity: 1;
	animation: gc-mc-busy 1s ease-in-out infinite;
}
@keyframes gc-mc-busy {
	from { transform: translateX(-100%); }
	to   { transform: translateX(250%); }
}

/* Message (a quantity could not be saved) */
.gc-cart-panel .gc-mc-alert {
	flex: none;
	margin: 16px var(--gc-mc-pad) 0;
	padding: 10px 14px;
	border-inline-start: 2px solid #ff7a7a;
	background: rgba(255, 122, 122, .1);
	font-size: 14px;
	line-height: 1.5;
	color: #ffc2c2;
}
.gc-cart-panel .gc-mc-alert[hidden] {
	display: none;
}

/* Content: list + footer, or the empty state */
.gc-cart-panel .gc-mini-cart {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

/* Product list */
.gc-cart-panel .gc-mc-list {
	flex: 1 1 auto;
	min-height: 0;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--gc-mc-line-strong) transparent;
}
.gc-cart-panel .gc-mc-list::-webkit-scrollbar {
	width: 4px;
}
.gc-cart-panel .gc-mc-list::-webkit-scrollbar-thumb {
	background: var(--gc-mc-line-strong);
}

.gc-cart-panel .gc-mc-item {
	position: relative;
	display: grid;
	grid-template-columns: var(--gc-mc-thumb) minmax(0, 1fr);
	gap: 18px;
	margin: 0;
	padding: 22px var(--gc-mc-pad);
	list-style: none;
	transition: opacity .25s ease;
}
.gc-cart-panel .gc-mc-item::after {
	content: "";
	position: absolute;
	inset-inline: var(--gc-mc-pad);
	bottom: 0;
	height: 1px;
	background: var(--gc-mc-line);
}
.gc-cart-panel .gc-mc-item:last-child::after {
	display: none;
}
/* Clearfix pseudo elements of list CSS elsewhere would take a grid cell */
.gc-cart-panel .gc-mc-item::before {
	content: none;
	display: none;
}

/* As tall as the text beside it: top on the name, bottom on the quantity box */
.gc-cart-panel .gc-mc-thumb {
	display: block;
	align-self: stretch;
	width: var(--gc-mc-thumb);
	min-height: var(--gc-mc-thumb);
	overflow: hidden;
	background: var(--smoke-color, #f6f5f3);
}
.gc-cart-panel .gc-mc-thumb img {
	display: block;
	float: none;
	width: 100%;
	height: 100%;
	margin: 0;
	box-shadow: none;
	object-fit: cover;
	transition: transform .5s ease;
}
.gc-cart-panel .gc-mc-item:hover .gc-mc-thumb img {
	transform: scale(1.06);
}
/* Its own layer the whole time: no jump when the hover zoom starts and ends (mouse devices only). */
@media (hover: hover) {
	.gc-cart-panel .gc-mc-thumb img {
		will-change: transform;
	}
}

.gc-cart-panel .gc-mc-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: var(--gc-mc-thumb);
}
.gc-cart-panel .gc-mc-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}
.gc-cart-panel .gc-mc-name {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-family: var(--title-font);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--gc-mc-text);
	text-decoration: none;
	transition: color .25s ease;
}
.gc-cart-panel a.gc-mc-name:hover {
	color: var(--gc-mc-accent);
}

.gc-cart-panel .gc-mc-remove {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	/* Its size does not make the name row taller */
	margin-block: -4px -6px;
	border: 1px solid var(--gc-mc-line);
	border-radius: 50%;
	color: var(--gc-mc-muted);
	transition: color .25s ease, background-color .25s ease, border-color .25s ease;
}
.gc-cart-panel .gc-mc-remove .gc-mc-icon {
	width: 14px;
	height: 14px;
}
.gc-cart-panel .gc-mc-remove:hover {
	border-color: var(--gc-mc-accent);
	background: var(--gc-mc-accent);
	color: var(--gc-mc-ink);
}

.gc-cart-panel .gc-mc-meta {
	margin-top: 2px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--gc-mc-muted);
}
.gc-cart-panel .gc-mc-meta .amount {
	padding: 0;
	font-size: inherit;
	font-weight: 400;
	color: inherit;
}
.gc-cart-panel .gc-mc-meta dl.variation {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0 6px;
	margin: 4px 0 0;
	font-size: 13px;
}
.gc-cart-panel .gc-mc-meta dl.variation dt,
.gc-cart-panel .gc-mc-meta dl.variation dd,
.gc-cart-panel .gc-mc-meta dl.variation p {
	margin: 0;
	padding: 0;
	font-weight: 400;
}

.gc-cart-panel .gc-mc-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 8px;
}

/* Quantity buttons */
.gc-cart-panel .gc-mc-qty {
	display: inline-flex;
	align-items: stretch;
	height: 36px;
	border: 1px solid var(--gc-mc-line-strong);
	color: var(--gc-mc-text);
}
.gc-cart-panel .gc-mc-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease;
}
.gc-cart-panel .gc-mc-step .gc-mc-icon {
	width: 14px;
	height: 14px;
}
.gc-cart-panel .gc-mc-step:hover:not([disabled]) {
	background: rgba(255, 255, 255, .08);
	color: var(--gc-mc-accent);
}
.gc-cart-panel .gc-mc-step[disabled] {
	opacity: .3;
	cursor: not-allowed;
}
.gc-cart-panel .gc-mc-qty-val {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	font-size: 15px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}
.gc-cart-panel .gc-mc-qty-fixed {
	font-size: 14px;
	color: var(--gc-mc-muted);
}

.gc-cart-panel .gc-mc-sub {
	font-family: var(--title-font);
	font-size: 15px;
	font-weight: 600;
	color: var(--gc-mc-text);
	white-space: nowrap;
}
.gc-cart-panel .gc-mc-sub .amount {
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

/* Saving: the product fades; WooCommerce's overlay stays invisible on the dark panel */
.gc-cart-panel .gc-mc-item.is-updating,
.gc-cart-panel .gc-mc-item:has(> .blockUI) {
	opacity: .45;
	pointer-events: none;
}
.gc-cart-panel .gc-mc .blockUI.blockOverlay {
	background: transparent !important;
}
.gc-cart-panel .gc-mc .blockUI.blockOverlay::before {
	display: none;
}

/* Just added */
.gc-cart-panel .gc-mc-item.is-new {
	animation: gc-mc-new 1.8s ease-out;
}
@keyframes gc-mc-new {
	from { background-color: rgba(227, 255, 4, .14); }
	to   { background-color: transparent; }
}

/* Footer: subtotal and buttons, always in view */
.gc-cart-panel .gc-mc-foot {
	flex: none;
	padding: 22px var(--gc-mc-pad) 30px;
	border-top: 1px solid var(--gc-mc-line);
	background: rgba(255, 255, 255, .03);
}
.gc-cart-panel .gc-mc .gc-mc-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 4px;
	padding: 0;
	border: 0;
	color: var(--gc-mc-text);
}
.gc-cart-panel .gc-mc-total-label {
	font-family: var(--title-font);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--gc-mc-muted);
}
.gc-cart-panel .gc-mc-total-value {
	font-family: var(--title-font);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
}
.gc-cart-panel .gc-mc-total-value .amount {
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}
.gc-cart-panel .gc-mc-note {
	margin: 0 0 18px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--gc-mc-muted);
}
.gc-cart-panel .gc-mc .gc-mc-buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 0;
	padding: 0;
}
.gc-cart-panel .gc-mc-btn {
	display: block;
	width: 100%;
	margin: 0;
	padding: 18px 12px;
	font-size: 13px;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
}
.gc-cart-panel .gc-mc-view {
	background: transparent;
	box-shadow: inset 0 0 0 1px var(--gc-mc-line-strong);
	color: var(--gc-mc-text);
	transition: color .3s ease, background-color .3s ease, box-shadow .3s ease;
}
.gc-cart-panel .gc-mc-view:hover,
.gc-cart-panel .gc-mc-view:focus-visible {
	background: var(--white-color, #fff);
	box-shadow: inset 0 0 0 1px var(--white-color, #fff);
	color: var(--title-color, #0a0c00);
}

/* Empty cart */
.gc-cart-panel .gc-mc-empty {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px var(--gc-mc-pad) 70px;
	text-align: center;
}
/* "(0)": the header button's count, big. The brackets open when the panel does. */
.gc-cart-panel .gc-mc-zero {
	display: inline-flex;
	align-items: center;
	margin-bottom: 18px;
	font-family: var(--title-font);
	font-size: 132px;
	line-height: 1;
	letter-spacing: -.02em;
	user-select: none;
}
.gc-cart-panel .gc-mc-zero-p {
	font-weight: 400;
	color: var(--gc-mc-line-strong);
	transition: transform .7s cubic-bezier(.2, .8, .2, 1) .25s;
}
.gc-cart-panel .gc-mc-zero-p:first-child {
	transform: translateX(22px);
}
.gc-cart-panel .gc-mc-zero-p:last-child {
	transform: translateX(-22px);
}
.gc-cart-panel.show .gc-mc-zero-p {
	transform: none;
}
.gc-cart-panel .gc-mc-zero-n {
	padding: 0 .06em;
	font-weight: 500;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--gc-mc-accent);
}
.gc-cart-panel .gc-mc .gc-mc-empty-title {
	margin: 0 0 10px;
	font-family: var(--title-font);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--gc-mc-text);
}
.gc-cart-panel .gc-mc-empty-text {
	max-width: 290px;
	margin: 0 0 28px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--gc-mc-muted);
}
.gc-cart-panel .gc-mc-shop {
	padding: 18px 34px;
	font-size: 13px;
}

/* Keyboard focus */
.gc-cart-panel .gc-mc a:focus-visible,
.gc-cart-panel .gc-mc button:focus-visible {
	outline: 2px solid var(--gc-mc-accent);
	outline-offset: 2px;
}

/* Phones */
@media (max-width: 767px) {
	.sidemenu-wrapper.gc-hp-panel.gc-cart-panel .sidemenu-content {
		width: calc(100% - 28px);
		max-width: 420px;
	}
	.sidemenu-wrapper.gc-hp-panel.gc-cart-panel .closeButton {
		width: 40px;
		height: 40px;
		top: 16px;
		right: 16px;
	}
	.gc-cart-panel .gc-mc {
		--gc-mc-thumb: 82px;
		--gc-mc-pad: 20px;
	}
	.gc-cart-panel .gc-mc-head {
		padding: 23px 72px 20px var(--gc-mc-pad);
	}
	.gc-cart-panel .gc-mc .gc-mc-title {
		font-size: 17px;
	}
	.gc-cart-panel .gc-mc-item {
		gap: 14px;
		padding-block: 18px;
	}
	.gc-cart-panel .gc-mc-name,
	.gc-cart-panel .gc-mc-sub {
		font-size: 14px;
	}
	.gc-cart-panel .gc-mc-meta {
		font-size: 13px;
	}
	.gc-cart-panel .gc-mc-row {
		padding-top: 6px;
	}
	.gc-cart-panel .gc-mc-qty {
		height: 32px;
	}
	.gc-cart-panel .gc-mc-step {
		width: 30px;
	}
	.gc-cart-panel .gc-mc-foot {
		padding: 18px var(--gc-mc-pad) calc(22px + env(safe-area-inset-bottom, 0px));
	}
	.gc-cart-panel .gc-mc-total-value {
		font-size: 19px;
	}
	.gc-cart-panel .gc-mc-note {
		margin-bottom: 14px;
	}
	.gc-cart-panel .gc-mc-btn {
		padding: 16px 8px;
		font-size: 12px;
	}
	.gc-cart-panel .gc-mc-empty {
		padding: 30px 24px 60px;
	}
	.gc-cart-panel .gc-mc-zero {
		font-size: 104px;
	}
}

/* Add to cart buttons while the product goes in (the panel opens with it after):
   the button keeps its look, a spinner takes the label's place. Replaces
   WooCommerce's faded button and icon font spinner. */
.add_to_cart_button.loading,
.single_add_to_cart_button.loading {
	position: relative;
	opacity: 1 !important;
	pointer-events: none;
	cursor: progress;
	-webkit-text-fill-color: transparent;
}
.add_to_cart_button.loading::after,
.single_add_to_cart_button.loading::after {
	content: "" !important;
	position: absolute !important;
	top: 50% !important;
	right: auto !important;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px !important;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	background: none;
	font-family: inherit !important;
	animation: gc-mc-spin .7s linear infinite !important;
}
@keyframes gc-mc-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.gc-cart-panel.is-busy .gc-mc-head::after,
	.gc-cart-panel .gc-mc-item.is-new {
		animation: none;
	}
	.gc-cart-panel .gc-mc-zero-p {
		transition: none;
		transform: none !important;
	}
	.gc-cart-panel .gc-mc-thumb img,
	.gc-cart-panel .gc-mc-item:hover .gc-mc-thumb img {
		transition: none;
		transform: none;
	}
}
