/* ukrcredits: installment button, popup and checkout block in the Poosh theme */

/* Product page button (placed after #button-cart inside .price-buttons) */
#button-ukrcredits {
	order: 2;
	width: 100%;
	border: 0;
	background: var(--primary-white);
	box-shadow: inset 0 0 0 1px var(--green);
	color: var(--primary-black);
}
#button-ukrcredits:hover {
	background: var(--green);
	color: var(--primary-white);
}
#button-ukrcredits img {
	display: block;
	width: auto;
	max-width: none !important; /* inline max-width from the icons_size setting */
	height: 1rem;
	margin: -.125rem 0;
}
@media (min-width: 992px) {
	.price-buttons #button-ukrcredits {
		width: auto;
	}
}
/* #button-cart shares a row with .quantity here and stretches to its 46px */
@media (min-width: 1200px) {
	.price-buttons #button-ukrcredits {
		min-height: 2.875rem;
	}
}
#button-ukrcredits.loading,
#button-ukrcredits:disabled {
	opacity: .6;
	pointer-events: none;
}

/* Loader shown by Magnific Popup until the popup content arrives */
.uc-spinner {
	display: inline-block;
	width: 2.5rem;
	height: 2.5rem;
	border: 3px solid rgba(255, 255, 255, .3);
	border-top-color: var(--green);
	border-radius: 50%;
	animation: uc-spin .8s linear infinite;
}
@keyframes uc-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Popup */
.mfp-content #ukrcredit-popup {
	max-width: 35rem;
	margin: 1.25rem auto;
	padding: 1.5rem;
	border-radius: .75rem;
	background: var(--primary-white);
	color: var(--primary-black);
	font-family: var(--font-family);
	font-size: .875rem;
	line-height: 1.4;
}
#ukrcredit-popup .mfp-close {
	top: .75rem;
	right: .75rem;
	width: 2rem;
	height: 2rem;
	line-height: 2rem;
	color: var(--primary-black);
	opacity: 1;
	font-family: var(--font-family);
	font-size: 1.75rem;
	font-weight: 300;
}
#ukrcredit-popup .credithead {
	margin: 0 2.5rem 1.25rem 0;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
	text-transform: uppercase;
}
#ukrcredit-popup .proposition {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: .75rem;
	padding: 1rem;
	border: 1px solid var(--gray-10);
	border-radius: .75rem;
	transition: border-color .2s ease-in-out;
}
#ukrcredit-popup .proposition:last-of-type {
	margin-bottom: 0;
}
#ukrcredit-popup .proposition:hover {
	border-color: var(--gray-40);
}
#ukrcredit-popup .prop_name {
	display: flex;
	align-items: center;
	gap: .75rem;
	font-size: 1rem;
	font-weight: 500;
}
#ukrcredit-popup .prop_name img {
	flex: 0 0 auto;
	height: auto;
}
#ukrcredit-popup .prop_info {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
#ukrcredit-popup .prop_total .btn {
	width: 100%;
}
.prop_hint {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 1.125rem;
	height: 1.125rem;
	border: 1px solid var(--gray-50);
	border-radius: 50%;
	color: var(--gray-60);
	font-size: .75rem;
	cursor: help;
}

/* Term calculator line: "N платежі на [select] по X = Y" */
.prop_calc {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
}
.prop_calc > div {
	white-space: nowrap;
}
.prop_calc .prop_select {
	flex: 0 0 8.5rem;
}
/* the term list already reads "3 платежі" */
.prop_calc .prop_paymentsCount {
	display: none;
}
.prop_calc .prop_permounth span,
.prop_calc .prop_price span {
	font-weight: 600;
}

/* SlimSelect on the term select (classes are copied from the <select>) */
.ss-main.uc-term .ss-single,
.ss-content.uc-term .ss-option {
	white-space: nowrap;
}

/* Term slider (jQuery UI) */
[id^="termSlider"].ui-slider {
	position: relative;
	height: 4px;
	margin: .5rem .5625rem;
	border: 0;
	border-radius: 2px;
	background: var(--gray-10);
}
[id^="termSlider"] .progress {
	height: 100%;
	margin: 0;
	overflow: hidden;
	border-radius: inherit;
	background: transparent;
	box-shadow: none;
}
[id^="termSlider"] .progress-bar {
	height: 100%;
	background: var(--green);
	box-shadow: none;
	transition: none;
}
[id^="termSlider"] .ui-slider-handle {
	position: absolute;
	z-index: 2;
	top: 50%;
	width: 1.125rem;
	height: 1.125rem;
	margin: -.5625rem 0 0 -.5625rem;
	border: 2px solid var(--green);
	border-radius: 50%;
	background: var(--primary-white);
	outline: none;
	cursor: grab;
	-ms-touch-action: none;
	touch-action: none;
}
[id^="termSlider"] .ui-slider-handle:active {
	cursor: grabbing;
}

/* Checkout: block under the "Покупка частинами" payment method */
.uc-checkout {
	margin-top: .5rem;
	padding: 1rem;
	border-radius: .75rem;
	background: var(--gray-20);
	font-size: .875rem;
}
.uc-checkout .prop_calc {
	margin-bottom: 1rem;
}
/* Bank reply after "Оформлення замовлення" (refusal or "confirm in the app") */
#opc-payment > .alert {
	margin: 0 0 1rem;
	padding: 1rem;
	border-radius: .75rem;
	background: var(--gray-20);
	color: var(--primary-black);
	line-height: 1.4;
}
#opc-payment > .alert .close {
	display: none;
}

/* Stickers on product images: bottom-left, labels asp sit top-left */
.uc-stickers {
	position: absolute;
	left: .5rem;
	bottom: .5rem;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: .25rem;
}
.product-label.uc-sticker {
	gap: .25rem;
	background: var(--primary-white);
	box-shadow: inset 0 0 0 1px var(--gray-10);
	color: var(--primary-black);
	font-weight: 600;
}
.product-label.uc-sticker picture {
    line-height: 0.9;
}
.product-label.uc-sticker img {
	width: .75rem;
	height: auto;
}
.product-page-slider .product-label.uc-sticker img {
	width: 1rem;
}

@media (min-width: 992px) {
	.product-card .uc-stickers {
		left: .75rem;
		bottom: .75rem;
	}
	.product-page-slider .uc-stickers {
		left: 1rem;
		bottom: 1rem;
	}
}

@media (max-width: 575px) {
	.mfp-content #ukrcredit-popup {
		padding: 1.25rem 1rem;
	}
	#ukrcredit-popup .credithead {
		font-size: 1rem;
	}
}
