/**
 * LCR Mimaki Financing Promos - frontend styles
 * All classes are prefixed with lcr-financing- to avoid collisions.
 */

/* ---------------------------------------------------------------------
 * Add to Cart financing note
 * ------------------------------------------------------------------- */
.lcr-financing-enhanced-button {
	display: inline-flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1.2;
	text-align: center;
}

.lcr-financing-button-note {
	display: block;
	margin-top: 2px;
	font-size: 0.72em;
	font-weight: 400;
	letter-spacing: 0.02em;
	opacity: 0.85;
	text-transform: none;
}

/* Financing link below the single product Add to Cart button */
.lcr-financing-single-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin-top: 0.85rem;
	padding: 0.55rem 0.9rem;
	border-radius: 8px;
	background: linear-gradient(135deg, rgba(255, 122, 24, 0.1), rgba(255, 77, 109, 0.1));
	border: 1px solid rgba(255, 122, 24, 0.45);
	color: #c2410c;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.lcr-financing-single-link:hover,
.lcr-financing-single-link:focus {
	background: linear-gradient(135deg, rgba(255, 122, 24, 0.18), rgba(255, 77, 109, 0.18));
	border-color: rgba(255, 77, 109, 0.7);
	color: #9a3412;
	transform: translateY(-1px);
}

.lcr-financing-single-link:focus-visible {
	outline: 3px solid rgba(255, 122, 24, 0.5);
	outline-offset: 2px;
}

.lcr-financing-single-link-icon {
	font-size: 1.05em;
}

.lcr-financing-single-link-arrow {
	transition: transform 0.18s ease;
}

.lcr-financing-single-link:hover .lcr-financing-single-link-arrow,
.lcr-financing-single-link:focus .lcr-financing-single-link-arrow {
	transform: translateX(3px);
}

/* ---------------------------------------------------------------------
 * Product image financing ribbon
 * ------------------------------------------------------------------- */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
li.product {
	position: relative;
}

.lcr-financing-ribbon {
	position: absolute;
	top: 12px;
	left: -6px;
	z-index: 5;
	pointer-events: none;
	display: inline-block;
	max-width: 70%;
	padding: 5px 12px 5px 14px;
	background: linear-gradient(135deg, #0a66c2 0%, #1b8ef2 100%);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	border-radius: 0 4px 4px 0;
	box-shadow: 0 4px 10px rgba(10, 102, 194, 0.28);
}

.lcr-financing-ribbon::after {
	content: "";
	position: absolute;
	bottom: -6px;
	left: 0;
	border-width: 6px 6px 0 0;
	border-style: solid;
	border-color: #054a8c transparent transparent transparent;
}

.lcr-financing-ribbon-text {
	position: relative;
	z-index: 1;
	white-space: nowrap;
}

/* Single product main image variant */
.lcr-financing-ribbon--single {
	top: 16px;
	left: 0;
	font-size: 12px;
	padding: 6px 14px 6px 16px;
}

.woocommerce div.product div.images,
.woocommerce-product-gallery {
	position: relative;
}

/* Avoid layout shift: ribbon is absolutely positioned over existing image area */
@media (max-width: 480px) {
	.lcr-financing-ribbon {
		font-size: 10px;
		padding: 4px 9px;
		top: 8px;
	}
}

/* ---------------------------------------------------------------------
 * Homepage financing banner
 * ------------------------------------------------------------------- */
.lcr-financing-banner {
	position: relative;
	overflow: hidden;
	margin: 0 auto 1.5rem;
	padding: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3.25rem);
	border-radius: 18px;
	background: #0a3d8f;
	color: #fff;
	box-shadow: 0 18px 40px rgba(8, 27, 64, 0.28);
	isolation: isolate;
}

/* Inline (shortcode) placement keeps the normal flow width. */
.lcr-financing-banner--inline {
	max-width: 1100px;
}

/* Floating, viewport-centered, dismissible modal-style card. */
.lcr-financing-banner--float {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%) scale(0.96);
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	overflow: auto;
	margin: 0;
	z-index: 99991;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.4s;
}

.lcr-financing-banner--float.lcr-financing-banner--visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(-50%, -50%) scale(1);
	transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.lcr-financing-banner--float.lcr-financing-banner--dismissed {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate(-50%, -50%) scale(0.96);
}

/* Simple scrim behind the centered card. */
.lcr-financing-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: rgba(8, 18, 40, 0.42);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.lcr-financing-backdrop.lcr-financing-backdrop--visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.4s ease;
}

/* Close button */
.lcr-financing-banner-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.18s ease, transform 0.18s ease;
}

.lcr-financing-banner-close:hover,
.lcr-financing-banner-close:focus {
	background: rgba(255, 255, 255, 0.32);
	transform: rotate(90deg);
}

.lcr-financing-banner-close:focus-visible {
	outline: 3px solid #ffd9a8;
	outline-offset: 2px;
}

/* Subtle moving paint/ink liquid background (single color, lighter/darker shades) */
.lcr-financing-liquid {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		radial-gradient(60% 70% at 20% 25%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 60%),
		radial-gradient(55% 65% at 80% 70%, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 60%),
		radial-gradient(70% 80% at 60% 10%, rgba(40, 120, 220, 0.45), rgba(40, 120, 220, 0) 65%);
	background-size: 160% 160%, 170% 170%, 150% 150%;
	background-position: 0% 0%, 100% 100%, 50% 0%;
	animation: lcr-financing-liquid-flow 18s ease-in-out infinite;
}

@keyframes lcr-financing-liquid-flow {
	0%,
	100% {
		background-position: 0% 0%, 100% 100%, 50% 0%;
	}
	33% {
		background-position: 30% 20%, 70% 80%, 40% 30%;
	}
	66% {
		background-position: 60% 10%, 40% 60%, 60% 15%;
	}
}

.lcr-financing-banner-inner {
	position: relative;
	z-index: 2;
	max-width: 1100px;
	margin: 0 auto;
}

.lcr-financing-banner-content {
	max-width: 640px;
}

.lcr-financing-banner-eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #8fd0ff;
}

.lcr-financing-banner-headline {
	margin: 0 0 0.65rem;
	font-size: clamp(1.6rem, 3.4vw, 2.5rem);
	line-height: 1.12;
	font-weight: 800;
	color: #ffffff;
}

.lcr-financing-banner-subheadline {
	margin: 0 0 1.4rem;
	font-size: clamp(1rem, 1.6vw, 1.18rem);
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.88);
}

.lcr-financing-banner-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.85rem 1.1rem;
}

.lcr-financing-banner-cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.6rem;
	border-radius: 999px;
	background: linear-gradient(135deg, #ff7a18 0%, #ff4d6d 100%);
	color: #fff !important;
	font-size: 1.02rem;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 10px 24px rgba(255, 77, 109, 0.35);
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.lcr-financing-banner-cta:hover,
.lcr-financing-banner-cta:focus {
	transform: translateY(-2px);
	box-shadow: 0 14px 30px rgba(255, 77, 109, 0.45);
	filter: brightness(1.05);
	color: #fff !important;
}

.lcr-financing-banner-cta:focus-visible {
	outline: 3px solid #ffd9a8;
	outline-offset: 2px;
}

.lcr-financing-banner-cta-arrow {
	font-size: 1.1em;
	transition: transform 0.18s ease;
}

.lcr-financing-banner-cta:hover .lcr-financing-banner-cta-arrow,
.lcr-financing-banner-cta:focus .lcr-financing-banner-cta-arrow {
	transform: translateX(3px);
}

.lcr-financing-banner-microcopy {
	font-size: 0.86rem;
	color: rgba(255, 255, 255, 0.78);
}

/* Paint / ink splash accents using pseudo-element shapes */
.lcr-financing-banner-splash {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.lcr-financing-banner-cta,
	.lcr-financing-banner-cta-arrow,
	.lcr-financing-banner--float {
		transition: none;
	}
	.lcr-financing-liquid {
		animation: none;
	}
}
