/**
 * MkWebTech CTA Studio - public styles.
 *
 * @package MkWebTech_CTA_Studio
 */

/* =========================================================================
   Body scroll lock
   ====================================================================== */

body.mkwebtech-cta-popup-open {
	overflow: hidden;
}

/* Fade fixed-position CTA variants while popup is open. */
body.mkwebtech-cta-popup-open .mkwebtech-cta--sticky {
	opacity: 0;
	transform: translateY( 12px );
	pointer-events: none;
}

/* =========================================================================
   Shared wrapper
   ====================================================================== */

.mkwebtech-cta-wrap {
	box-sizing: border-box;
	font-family: inherit;
	line-height: 1.6;
	font-size: 1rem;
	--mkwebtech-cta-content-gap: 10px;
}

.mkwebtech-cta-wrap *,
.mkwebtech-cta-wrap *::before,
.mkwebtech-cta-wrap *::after {
	box-sizing: inherit;
}

.mkwebtech-cta__content {
	min-width: 0;
}

.mkwebtech-cta__heading {
	margin: 0;
	line-height: 1.3;
}

.mkwebtech-cta__heading > * {
	margin: 0;
}

.mkwebtech-cta__heading > * + * {
	margin-top: .35em;
}

.mkwebtech-cta-timer {
	margin: 0;
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
	display: inline-flex;
	align-items: center;
	gap: var(--mkwebtech-timer-digit-gap, 0px);
}

.mkwebtech-cta-timer .mkwebtech-cta-timer-group {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
}

.mkwebtech-cta-timer .mkwebtech-cta-timer-group.is-label-top {
	flex-direction: column-reverse;
}

.mkwebtech-cta-timer .mkwebtech-cta-timer-label {
	font-size: .75em;
	font-weight: 500;
	line-height: 1.1;
	margin-top: .2em;
}

.mkwebtech-cta-timer .mkwebtech-cta-timer-label.is-hidden {
	display: none;
}

.mkwebtech-cta-timer .mkwebtech-cta-timer-group.is-label-top .mkwebtech-cta-timer-label {
	margin-top: 0;
	margin-bottom: .2em;
}

.mkwebtech-cta-timer .mkwebtech-cta-timer-sep {
	display: var(--mkwebtech-timer-sep-display, inline-block);
	margin: 0;
}

/* =========================================================================
   Button
   ====================================================================== */

.mkwebtech-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 10px 20px;
	border-radius: 40px;
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	font-size: .9375rem;
	white-space: nowrap;
	flex-shrink: 0;
	border: none;
	cursor: pointer;
	transition:
		transform  .18s ease,
		box-shadow .18s ease,
		filter     .18s ease;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, .18 );
}

.mkwebtech-cta__btn-icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	line-height: 1;
}

.mkwebtech-cta__btn:hover,
.mkwebtech-cta__btn:focus-visible {
	color: #fff;
	text-decoration: none;
	transform: translateY( -2px );
	filter: brightness( 1.08 );
	box-shadow: 0 8px 22px rgba( 0, 0, 0, .3 );
}

.mkwebtech-cta__btn:active {
	transform: translateY( 0 );
	filter: brightness( .96 );
	box-shadow: 0 1px 4px rgba( 0, 0, 0, .18 );
}

/* =========================================================================
   Inline CTA
   ====================================================================== */

.mkwebtech-cta--inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var( --mkwebtech-cta-content-gap );
	padding: 1.375rem 1.75rem;
	margin: 2rem 0;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba( 0, 0, 0, .08 );
}

/* =========================================================================
   Sticky Bar CTA
   ====================================================================== */

.mkwebtech-cta--sticky {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	display: none;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var( --mkwebtech-cta-content-gap );
	padding: 1rem 2rem;
	z-index: 9999;
	box-shadow: 0 -3px 20px rgba( 0, 0, 0, .12 );
}

.mkwebtech-cta--sticky.mkwebtech-cta--is-visible {
	display: flex;
}

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

.mkwebtech-cta-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, .45 );
	backdrop-filter: blur( 2px );
	-webkit-backdrop-filter: blur( 2px );
	z-index: 99998;
	display: none;
}

.mkwebtech-cta-overlay.mkwebtech-cta--is-visible {
	display: block;
}

.mkwebtech-cta--popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	padding: 2rem 2.25rem;
	border-radius: 1rem;
	z-index: 99999;
	box-shadow:
		0 1px 2px rgba( 0, 0, 0, .05 ),
		0 8px 24px rgba( 0, 0, 0, .12 );
	display: none;
}

.mkwebtech-cta--popup.mkwebtech-cta--is-visible {
	display: flex;
}

.mkwebtech-cta-wrap button.mkwebtech-cta__close,
.mkwebtech-cta-wrap [type="button"].mkwebtech-cta__close {
	position: absolute;
	top: 3px;
	right: 3px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	min-width: 24px;
	min-height: 24px;
	appearance: none;
	-webkit-appearance: none;
	background: rgba( 0, 0, 0, .2 ) !important;
	border: 0 !important;
	border-radius: 50%;
	box-shadow: none !important;
	text-shadow: none;
	outline: 0;
	cursor: pointer;
	pointer-events: auto;
	padding: 0;
	line-height: 1;
	font-size: 16px;
	color: inherit;
	opacity: 1;
	z-index: 2;
	transition:
		background .15s ease;
}

.mkwebtech-cta__close .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
}

.mkwebtech-cta__close:hover {
	background: rgba( 0, 0, 0, .2 ) !important;
}

/* =========================================================================
   Responsive
   ====================================================================== */

@media ( max-width: 600px ) {
	.mkwebtech-cta--inline,
	.mkwebtech-cta--sticky {
		flex-direction: column;
		text-align: center;
		gap: var( --mkwebtech-cta-content-gap );
	}

	.mkwebtech-cta--popup {
		padding: 2.25rem 1.75rem;
	}

	.mkwebtech-cta__btn {
		width: 100%;
	}
}
