/*
 * Rozmax Digital - Smart CF7 Popup: стилі модального вікна.
 */

.rdcp-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	background:
		radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 35%),
		rgba(var(--theme-color1-rgb, 29, 29, 27), 0.78);
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.rdcp-overlay.is-active {
	display: flex;
}

.rdcp-overlay.is-visible {
	opacity: 1;
}

.rdcp-overlay.is-visible .rdcp-modal {
	transform: translateY(0) scale(1);
}

.rdcp-launcher {
	position: fixed;
	left: 30px;
	bottom: 30px;
	z-index: 100000;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 0;
	border: none;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(10px) scale(0);
	transition:
		transform 0.3s cubic-bezier(0.22, 1.2, 0.36, 1),
		opacity 0.3s ease,
		visibility 0.3s ease;
}

.rdcp-launcher.rdcp-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.rdcp-launcher:focus {
	outline: none;
}

.rdcp-launcher svg {
	width: 24px;
	height: 24px;
	display: block;
	flex: 0 0 auto;
	fill: currentColor;
}

.rdcp-launcher-label,
.rdcp-launcher-text {
	display: none;
}

.rdcp-launcher-compact {
	padding: 12px 20px;
	border-radius: 30px;
	background: #d97706;
	box-shadow: 0 18px 36px rgba(217, 119, 6, 0.28);
	color: #ffffff;
}

.rdcp-launcher-compact .rdcp-launcher-label {
	display: inline-block;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.rdcp-launcher-compact:hover,
.rdcp-launcher-compact:focus {
	transform: translateY(0) scale(1.05);
}

.rdcp-launcher-pulse {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #d97706;
	box-shadow: 0 18px 36px rgba(217, 119, 6, 0.28);
	color: #ffffff;
}

.rdcp-launcher-pulse.rdcp-active {
	animation: rdcp-launcher-pulse 2s infinite;
}

.rdcp-launcher-pulse:hover,
.rdcp-launcher-pulse:focus {
	transform: translateY(0) scale(1.06);
}

.rdcp-launcher-badge {
	gap: 10px;
	align-items: center;
}

.rdcp-launcher-badge svg {
	width: 56px;
	height: 56px;
	padding: 16px;
	border-radius: 50%;
	background: #d97706;
	box-shadow: 0 18px 36px rgba(217, 119, 6, 0.28);
	box-sizing: border-box;
}

.rdcp-launcher-badge.rdcp-active svg {
	animation: rdcp-launcher-badge-pulse 2.2s infinite;
}

.rdcp-launcher-badge .rdcp-launcher-label {
	display: none;
}

.rdcp-launcher-badge .rdcp-launcher-text {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	max-width: 190px;
	padding: 10px 14px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
	color: #666666;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.25;
	text-align: left;
	white-space: normal;
	box-sizing: border-box;
}

.rdcp-launcher-badge .rdcp-launcher-text::before {
	content: "";
	position: absolute;
	left: -6px;
	top: 50%;
	width: 12px;
	height: 12px;
	background: rgba(255, 255, 255, 0.96);
	transform: translateY(-50%) rotate(45deg);
	border-radius: 2px;
}

.rdcp-launcher-badge:hover,
.rdcp-launcher-badge:focus {
	transform: translateY(0) scale(1.03);
}

.rdcp-modal {
	position: relative;
	width: min(92vw, 560px);
	max-height: 90vh;
	overflow-y: auto;
	box-sizing: border-box;
	padding: 2.25rem 2.25rem 2rem;
	border-radius: 24px;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
	transform: translateY(18px) scale(0.96);
	transition: transform 0.3s ease;
}

.rdcp-close {
	position: absolute;
	top: 0.9rem;
	right: 0.9rem;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.16);
	color: #334155;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.rdcp-close:hover,
.rdcp-close:focus {
	background: rgba(var(--theme-color2-rgb, 235, 98, 9), 0.14);
	color: var(--theme-color1, #1d1d1b);
	box-shadow: 0 0 0 4px rgba(var(--theme-color2-rgb, 235, 98, 9), 0.12);
	outline: none;
	transform: rotate(90deg);
}

.rdcp-modal__title.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.rdcp-modal__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 1.5rem;
}

.rdcp-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 4.25rem;
	height: 4.25rem;
	margin-bottom: 1rem;
	border-radius: 50%;
	background: linear-gradient(
		135deg,
		rgba(var(--theme-color2-rgb, 235, 98, 9), 0.12) 0%,
		rgba(var(--theme-color3-rgb, 221, 153, 51), 0.2) 100%
	);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 30px rgba(var(--theme-color2-rgb, 235, 98, 9), 0.16);
	color: var(--theme-color2, #eb6209);
}

.rdcp-icon svg {
	width: 1.8rem;
	height: 1.8rem;
	display: block;
	fill: currentColor;
}

.rdcp-modal__heading {
	margin: 0;
	font-size: clamp(1.55rem, 2.4vw, 2rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--theme-color1, #1d1d1b);
}

.rdcp-subtitle {
	margin: 0.75rem 0 0;
	max-width: 26rem;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--theme-color1-lighter, #3a3a36);
}

.rdcp-modal__body {
	margin-top: 0.25rem;
}

.rdcp-modal__body .wpcf7 {
	margin: 0;
	padding: 0;
}

.rdcp-modal__body .wpcf7 form {
	display: grid;
	gap: 0.9rem;
}

.rdcp-modal__body .wpcf7-form-control-wrap {
	display: block;
}

.rdcp-modal__body input[type="text"],
.rdcp-modal__body input[type="tel"],
.rdcp-modal__body input[type="email"],
.rdcp-modal__body textarea {
	width: 100%;
	min-height: 3.35rem;
	padding: 0.95rem 1rem;
	border: 1px solid #cbd5e1;
	border-radius: 14px;
	background: #ffffff;
	box-sizing: border-box;
	font-size: 1rem;
	line-height: 1.4;
	color: #0f172a;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rdcp-modal__body input::placeholder,
.rdcp-modal__body textarea::placeholder {
	color: #94a3b8;
}

.rdcp-modal__body input:focus,
.rdcp-modal__body textarea:focus {
	border-color: var(--theme-color2, #eb6209);
	box-shadow: 0 0 0 4px rgba(var(--theme-color2-rgb, 235, 98, 9), 0.14);
	outline: none;
}

.rdcp-modal__body .rdcp-field-error {
	border-color: #dc2626;
	box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
}

.rdcp-modal__body .rdcp-shake {
	animation: rdcp-shake 0.38s ease-in-out;
}

.rdcp-modal__body .wpcf7-submit,
.rdcp-modal__body input[type="submit"],
.rdcp-modal__body button[type="submit"] {
	width: 100%;
	min-height: 3.4rem;
	padding: 0.95rem 1.25rem;
	border: none;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--theme-color2, #eb6209) 0%, var(--theme-color2-darker, #b54b07) 100%);
	box-shadow: 0 18px 28px rgba(var(--theme-color2-rgb, 235, 98, 9), 0.24);
	color: var(--theme-color2-text-color, #fff);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.rdcp-modal__body .wpcf7-submit:hover,
.rdcp-modal__body .wpcf7-submit:focus,
.rdcp-modal__body input[type="submit"]:hover,
.rdcp-modal__body input[type="submit"]:focus,
.rdcp-modal__body button[type="submit"]:hover,
.rdcp-modal__body button[type="submit"]:focus {
	transform: translateY(-2px) scale(1.01);
	box-shadow: 0 22px 34px rgba(var(--theme-color2-rgb, 235, 98, 9), 0.3);
	filter: brightness(1.04);
	outline: none;
}

.rdcp-modal__body .wpcf7-submit:active,
.rdcp-modal__body input[type="submit"]:active,
.rdcp-modal__body button[type="submit"]:active {
	transform: translateY(0);
}

.rdcp-modal__body .rdcp-trust-text {
	margin: -0.2rem 0 0;
	font-size: 0.82rem;
	line-height: 1.5;
	text-align: center;
	color: var(--theme-color1-lighter, #3a3a36);
}

.rdcp-modal__body .wpcf7-not-valid-tip {
	font-size: 0.82rem;
	color: #dc2626;
}

.rdcp-modal__body .wpcf7-response-output {
	margin: 0.4rem 0 0;
	border-radius: 14px;
	font-size: 0.92rem;
}

@keyframes rdcp-shake {
	0%,
	100% {
		transform: translateX(0);
	}

	20% {
		transform: translateX(-7px);
	}

	40% {
		transform: translateX(6px);
	}

	60% {
		transform: translateX(-4px);
	}

	80% {
		transform: translateX(3px);
	}
}

@keyframes rdcp-launcher-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7);
	}

	100% {
		box-shadow: 0 0 0 18px rgba(217, 119, 6, 0);
	}
}

@keyframes rdcp-launcher-badge-pulse {
	0% {
		box-shadow:
			0 18px 36px rgba(217, 119, 6, 0.28),
			0 0 0 0 rgba(217, 119, 6, 0.48);
		transform: scale(1);
	}

	60% {
		box-shadow:
			0 18px 36px rgba(217, 119, 6, 0.24),
			0 0 0 14px rgba(217, 119, 6, 0);
		transform: scale(1.04);
	}

	100% {
		box-shadow:
			0 18px 36px rgba(217, 119, 6, 0.28),
			0 0 0 0 rgba(217, 119, 6, 0);
		transform: scale(1);
	}
}

@media (max-width: 480px) {
	.rdcp-overlay {
		padding: 1rem;
	}

	.rdcp-launcher {
		left: 20px;
		bottom: 20px;
	}

	.rdcp-launcher-compact {
		padding: 11px 16px;
		gap: 8px;
	}

	.rdcp-launcher-compact .rdcp-launcher-label {
		font-size: 0.88rem;
	}

	.rdcp-launcher-pulse {
		width: 54px;
		height: 54px;
	}

	.rdcp-launcher-badge {
		max-width: calc(100vw - 40px);
		align-items: center;
	}

	.rdcp-launcher-badge svg {
		width: 54px;
		height: 54px;
		padding: 15px;
	}

	.rdcp-launcher-badge .rdcp-launcher-text {
		max-width: min(44vw, 170px);
		min-height: 40px;
		padding: 9px 12px;
		font-size: 12px;
	}

	.rdcp-modal {
		width: 95vw;
		max-height: 95vh;
		padding: 1.6rem 1rem 1.4rem;
		border-radius: 20px;
	}

	.rdcp-close {
		top: 0.65rem;
		right: 0.65rem;
	}

	.rdcp-icon {
		width: 3.75rem;
		height: 3.75rem;
	}

	.rdcp-subtitle {
		font-size: 0.95rem;
	}
}
