/*======================================================================//
// Rabatsystem til salg af handsker                                     //
//======================================================================*/

/* Knappen - står på varesiden, i kurven og i mini-kurven.
   Selve knappens udseende kommer fra temaets .stom-button; her sætter vi kun
   placeringen, så den fylder bredden ud de tre steder den optræder. */
.stom-button.stom-glove-sale-open-wrap {
	display: block;
	margin-bottom: 20px;
	text-align: center;
}

.widget_shopping_cart_content .stom-button.stom-glove-sale-open-wrap {
	margin: 20px 0 0;
	padding: 0 20px;
}

.stom-button.stom-glove-sale-open-wrap .stom-custom-svg {
	display: none;
}

.stom-glove-sale-open-wrap .stom-glove-sale-open {
	display: block;
	padding: .618em 1em;
	line-height: 1.5em;
	border-radius: 5px;
}

/* I mini-kurven står knappen på lys baggrund lige over "Gå til kassen".
   To fyldte knapper over hinanden ville slås om opmærksomheden, så den her
   trækker sig tilbage til en ren outline i --color-1. */
.widget_shopping_cart_content .stom-glove-sale-open-wrap .stom-glove-sale-open {
	background-color: transparent;
	border-color: var(--color-1) !important;
	color: var(--color-1) !important;
}

/* Hover vender den om og fylder ud - samme greb som temaets øvrige knapper,
   bare den anden vej rundt. */
.widget_shopping_cart_content .stom-glove-sale-open-wrap .stom-glove-sale-open:hover {
	background-color: var(--color-1) !important;
	border-color: var(--color-1) !important;
	color: #fff !important;
}

/* Rabat-badge på de nedsatte linjer */
.stom-glove-sale-badge {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 3px;
	background: #d63638;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	vertical-align: middle;
	white-space: nowrap;
}

#woo-icons .stom-off-canvas-wrapper .stom-glove-sale-open-wrap + .woocommerce-mini-cart__buttons {
	padding-top: 10px;
}


/*======================================================================//
// Popup                                                                //
//======================================================================*/

.stom-glove-sale-modal {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99999;
	display: none;
	width: 100%;
	height: 100%;
}

.stom-glove-sale-modal.is-open {
	display: block;
}

.stom-glove-sale-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, .6);
}

.stom-glove-sale-modal__panel {
	position: absolute;
	top: 50%;
	left: 50%;
	width: calc(100% - 40px);
	max-width: 720px;
	max-height: calc(100% - 40px);
	overflow-y: auto;
	padding: 30px;
	transform: translate(-50%, -50%);
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}

.stom-glove-sale-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.stom-glove-sale-modal.is-loading .stom-glove-sale-modal__body {
	opacity: .5;
	pointer-events: none;
}

/* Undgå at siden bag popup'en kan scrolles */
body.stom-glove-sale-open-body {
	overflow: hidden;
}


/*======================================================================//
// Indhold                                                              //
//======================================================================*/

.stom-glove-sale-intro {
	margin-bottom: 25px;
	padding-right: 36px;
}

.stom-glove-sale-title {
	margin: 0 0 8px;
	font-size: 22px;
}

.stom-glove-sale-status {
	margin: 0;
}

.stom-glove-sale-status.is-complete {
	font-weight: 700;
}

.stom-glove-sale-products {
	margin: 0;
	padding: 0;
	list-style: none;
}

.stom-glove-sale-product {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 15px 0;
	border-top: 1px solid rgba(0, 0, 0, .1);
}

.stom-glove-sale-product__image {
	flex: 0 0 70px;
	width: 70px;
}

.stom-glove-sale-product__image img {
	display: block;
	width: 100%;
	height: auto;
}

.stom-glove-sale-product__details {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 4px;
}

.stom-glove-sale-product__title {
	font-weight: 700;
}

/* Antalsregler - min. antal og spring */
.stom-glove-sale-product__hint {
	font-size: 12px;
	opacity: .7;
}

.stom-glove-sale-product__actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
}

/* Antalsfeltet bruger temaets .stom-input-wrap. Udseendet kommer derfra - her
   nulstiller vi kun den margin temaet bruger til at holde afstand til
   "Læg i kurv", da popup'en styrer afstanden med gap. */
.stom-glove-sale-modal .quantity {
	margin: 0;
}

.stom-glove-sale-modal .stom-input-wrap {
	margin-right: 0;
}

.stom-glove-sale-product__actions .stom-button {
	margin: 0;
	white-space: nowrap;
}


.stom-glove-sale-product__actions .stom-button .stom-custom-svg,
.widget_shopping_cart_content .stom-button.stom-glove-sale-open-wrap .stom-custom-svg {
	display: none !important;
}


div.product .stom-button.stom-glove-sale-open-wrap {
	margin-top: 20px;
}


/*======================================================================//
// Bunden - opsamling og én knap der lægger det hele i kurven            //
//======================================================================*/

.stom-glove-sale-footer {
	position: sticky;
	bottom: -30px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	flex-wrap: wrap;
	margin: 25px -30px -30px;
	padding: 20px 30px;
	border-top: 1px solid rgba(0, 0, 0, .1);
	background: #fff;
}

.stom-glove-sale-summary {
	flex: 1 1 200px;
	margin: 0;
}

.stom-button.stom-glove-sale-submit-wrap {
	flex: 0 0 auto;
	margin: 0;
}

/* Intet valgt endnu - knappen er synlig, men død. */
.stom-glove-sale-submit.is-disabled {
	opacity: .4;
	pointer-events: none;
}

.stom-glove-sale-submit.is-busy {
	opacity: .6;
	pointer-events: none;
}


/*======================================================================//
// Mobil                                                                //
//======================================================================*/

@media only screen and (max-width: 600px) {
	.stom-glove-sale-modal__panel {
		padding: 20px;
	}

	.stom-glove-sale-product {
		flex-wrap: wrap;
	}

	.stom-glove-sale-product__details {
		flex: 1 1 calc(100% - 85px);
	}

	.stom-glove-sale-product__actions {
		flex: 1 1 100%;
		justify-content: space-between;
	}

	/* Panelets padding er 20px her, så bunden skal trækkes tilsvarende ud. */
	.stom-glove-sale-footer {
		bottom: -20px;
		margin: 20px -20px -20px;
		padding: 15px 20px;
	}

	.stom-button.stom-glove-sale-submit-wrap {
		flex: 1 1 100%;
		text-align: center;
	}
}


/*======================================================================//
// Statuslinje mod rabatten                                             //
//======================================================================*/

/* Skjult indtil JS har hentet kurven. Tallene må ikke komme fra den cachede
   side, så linjen har intet at vise før da. */
.rabat-progress {
	display: none;
	width: 100%;
	margin: 25px 0 0;
}

.rabat-progress.is-ready {
	display: block;
}

.rabat-progress__bar {
	height: 6px;
	border-radius: 999px;
	background: #C6D5EA;
	overflow: hidden;
}

.rabat-progress__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: #4273B0;
	transition: width 0.25s ease;
}

.rabat-progress__tekst {
	margin: 0.45rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #6b6b6b;
}

.rabat-progress.is-complete .rabat-progress__fill {
	background: #4a7c59;
}

.rabat-progress.is-complete .rabat-progress__tekst {
	color: #4a7c59;
	font-weight: 500;
}
