/* ShopiDevs File Manager Promo Popup
 * CUSTOMIZATION: Update the colour variables below to align the popup with a future brand refresh.
 */
:root {
	--sd-fm-green: #08b87a;
	--sd-fm-green-dark: #057f56;
	--sd-fm-ink: #13231e;
	--sd-fm-muted: #52615b;
}

.sd-fm-promo {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: grid;
	place-items: center;
	box-sizing: border-box;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .24s ease, visibility .24s ease;
}

.sd-fm-promo.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.sd-fm-promo__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 22, 17, .7);
	backdrop-filter: blur(5px);
}

.sd-fm-promo__dialog,
.sd-fm-promo__dialog * {
	box-sizing: border-box;
}

.sd-fm-promo__dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(220px, .76fr) minmax(0, 1fr);
	width: min(720px, 100%);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 28px 75px rgba(0, 0, 0, .28);
	transform: translateY(14px) scale(.98);
	transition: transform .24s ease;
}

.sd-fm-promo.is-visible .sd-fm-promo__dialog {
	transform: translateY(0) scale(1);
}

.sd-fm-promo__art {
	display: grid;
	place-items: center;
	min-height: 335px;
	padding: 30px;
	background: radial-gradient(circle at 15% 15%, #6df3c0, transparent 42%), linear-gradient(145deg, #0dba80, #047555);
}

.sd-fm-promo__art svg,
.sd-fm-promo__art img {
	display: block;
	width: min(100%, 260px);
	max-height: 220px;
	object-fit: contain;
}

/* Default Fileora product visual. The parent clips the wide source image into a purposeful left-panel crop. */
.sd-fm-promo__art--image {
	padding: 0;
	/* Matches the navy-to-blue tones at the outer edge of the Fileora artwork. */
	background: linear-gradient(180deg, #0b0b69 0%, #050550 100%);
}

.sd-fm-promo__art--image img {
	width: 100%;
	height: 335px;
	max-height: none;
	object-fit: cover;
	/* Keep the product dashboard, rather than cropped headline text, in the visible left panel. */
	object-position: right center;
}

.sd-fm-promo__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	padding: 52px 46px 42px;
}

.sd-fm-promo__eyebrow {
	margin-bottom: 12px;
	color: var(--sd-fm-green-dark);
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.sd-fm-promo h2 {
	margin: 0;
	color: var(--sd-fm-ink);
	font-family: inherit;
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 750;
	letter-spacing: -.035em;
	line-height: 1.1;
}

.sd-fm-promo p {
	margin: 18px 0 0;
	color: var(--sd-fm-muted);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.6;
}

.sd-fm-promo__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	margin-top: 30px;
}

.sd-fm-promo__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border-radius: 9px;
	padding: 14px 20px;
	background: var(--sd-fm-green);
	box-shadow: 0 8px 18px rgba(8, 184, 122, .22);
	color: #fff !important;
	font-family: inherit;
	font-size: 15px;
	font-weight: 750;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background .16s ease, transform .16s ease;
}

.sd-fm-promo__cta:hover,
.sd-fm-promo__cta:focus-visible {
	background: var(--sd-fm-green-dark);
	color: #fff;
	transform: translateY(-1px);
}

.sd-fm-promo__cta span {
	font-size: 18px;
	line-height: 12px;
}

.sd-fm-promo__cancel,
.sd-fm-promo__close {
	border: 0;
	background: transparent;
	color: #5e6c66;
	font-family: inherit;
	cursor: pointer;
}

.sd-fm-promo__cancel {
	min-height: 32px;
	margin-left: 2px;
	padding: 6px 2px;
	font-size: 14px;
	font-weight: 650;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sd-fm-promo__close {
	position: absolute;
	/* Align with the desktop content area instead of the dialog edge. */
	top: 28px;
	right: 30px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #f0f4f2;
	color: #34443e;
	font-size: 28px;
	font-weight: 300;
	line-height: 1;
	transition: background .16s ease, color .16s ease;
}

/* A CSS-drawn icon avoids the optical off-centering of the × font glyph. */
.sd-fm-promo__close span {
	position: relative;
	display: block;
	width: 16px;
	height: 16px;
	font-size: 0;
}

.sd-fm-promo__close span::before,
.sd-fm-promo__close span::after {
	position: absolute;
	top: 7px;
	left: 0;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	content: '';
}

.sd-fm-promo__close span::before {
	transform: rotate(45deg);
}

.sd-fm-promo__close span::after {
	transform: rotate(-45deg);
}

.sd-fm-promo__close:hover,
.sd-fm-promo__close:focus-visible,
.sd-fm-promo__cancel:hover,
.sd-fm-promo__cancel:focus-visible {
	background: #e2eae6;
	color: var(--sd-fm-ink);
}

.sd-fm-promo__cta:focus-visible,
.sd-fm-promo__close:focus-visible,
.sd-fm-promo__cancel:focus-visible {
	outline: 3px solid rgba(8, 184, 122, .4);
	outline-offset: 3px;
}

body.sd-fm-promo-open {
	overflow: hidden;
}

/* Mobile: a single-column, bottom-sheet-style dialog is easier to scan and tap. */
@media (max-width: 700px) {
	.sd-fm-promo__close {
		top: 16px;
		right: 16px;
	}

	.sd-fm-promo {
		align-items: end;
		padding: 12px;
		padding-top: max(12px, env(safe-area-inset-top));
		padding-right: max(12px, env(safe-area-inset-right));
		padding-bottom: max(12px, env(safe-area-inset-bottom));
		padding-left: max(12px, env(safe-area-inset-left));
	}

	.sd-fm-promo__dialog {
		grid-template-columns: 1fr;
		width: min(100%, 520px);
		max-height: calc(100vh - 24px);
		max-height: calc(100dvh - 24px); /* Prevents browser UI from clipping the popup on modern mobile browsers. */
		overflow-y: auto;
		border-radius: 20px 20px 16px 16px;
	}

	.sd-fm-promo__art {
		min-height: 145px;
		padding: 18px;
	}

	.sd-fm-promo__art svg,
	.sd-fm-promo__art img {
		width: 180px;
		height: 120px;
	}

	.sd-fm-promo__art--image {
		padding: 0;
	}

	.sd-fm-promo__art--image img {
		width: 100%;
		height: 145px;
		max-height: none;
		object-position: right center;
	}

	.sd-fm-promo__content {
		padding: 27px 26px 30px;
	}

	.sd-fm-promo p {
		font-size: 15px;
	}

	.sd-fm-promo__actions {
		display: grid;
		width: 100%;
		margin-top: 23px;
	}

	.sd-fm-promo__cta {
		justify-content: center;
		width: 100%;
		min-height: 50px; /* Comfortable tap target. */
		font-size: 16px; /* Avoids iOS auto-zoom on button tap. */
	}

	.sd-fm-promo__cancel {
		justify-self: center;
		min-height: 44px;
		padding: 10px 12px;
	}
}

/* Keep the important copy and CTA visible on short landscape phone screens. */
@media (max-width: 700px) and (max-height: 620px) {
	.sd-fm-promo__art {
		display: none;
	}

	.sd-fm-promo__content {
		padding-top: 38px;
	}
}

@media (max-width: 360px) {
	.sd-fm-promo__content {
		padding-right: 20px;
		padding-left: 20px;
	}

	.sd-fm-promo h2 {
		font-size: 25px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sd-fm-promo,
	.sd-fm-promo__dialog,
	.sd-fm-promo__cta {
		transition: none;
	}
}
