/**
 * Modal Popup & Multi-step Form — Modern Design
 * WebCraft Pro popup style.
 *
 * @package WebCraft_Pro
 */

/* =============================================
   MODAL POPUP BASE & ANIMATIONS
   ============================================= */
.popup-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s ease;
	padding: 20px;
}

.popup-modal.is-active {
	opacity: 1;
	visibility: visible;
}

.popup-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, 0.65);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.popup-modal__container {
	position: relative;
	background: #ffffff;
	border-radius: 20px;
	width: 100%;
	max-width: 520px;
	padding: 36px 32px;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.04),
		0 24px 80px -12px rgba(0, 0, 0, 0.25),
		0 8px 24px -8px rgba(0, 0, 0, 0.1);
	z-index: 2;
	transform: scale(0.92) translateY(16px);
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
	max-height: 90vh;
	overflow-y: auto;
	overflow-x: hidden;
}

.popup-modal__container::-webkit-scrollbar {
	width: 6px;
}
.popup-modal__container::-webkit-scrollbar-track {
	background: transparent;
}
.popup-modal__container::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 3px;
}

.popup-modal.is-active .popup-modal__container {
	transform: scale(1) translateY(0);
}

.popup-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: #f1f5f9;
	border: none;
	font-size: 20px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
}

.popup-modal__close:hover {
	background: #e2e8f0;
	color: #0f172a;
}

/* =============================================
   PROGRESS STEPS
   ============================================= */
.popup-form__progress {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin-bottom: 28px;
	padding: 0 10px;
}

.popup-form__progress-step {
	display: flex;
	align-items: center;
	gap: 8px;
}

.popup-form__progress-number {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #e2e8f0;
	color: #94a3b8;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.popup-form__progress-step--active .popup-form__progress-number {
	background: #0f172a;
	color: #ffffff;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.35);
}

.popup-form__progress-step--done .popup-form__progress-number {
	background: #334155;
	color: #ffffff;
}

.popup-form__progress-label {
	font-size: 12px;
	font-weight: 600;
	color: #94a3b8;
	transition: color 0.3s ease;
	white-space: nowrap;
}

.popup-form__progress-step--active .popup-form__progress-label {
	color: #1e293b;
}

.popup-form__progress-step--done .popup-form__progress-label {
	color: #334155;
}

.popup-form__progress-line {
	flex: 0 0 48px;
	height: 2px;
	background: #e2e8f0;
	margin: 0 8px;
	border-radius: 1px;
	transition: background 0.3s ease;
}

.popup-form__progress-line.is-active {
	background: #0f172a;
}

/* =============================================
   POPUP FORM FIELD DESIGN
   ============================================= */
.popup-form__title {
	font-size: 26px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 6px;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.popup-form__subtitle {
	font-size: 14px;
	color: #64748b;
	margin: 0 0 24px;
	line-height: 1.5;
}

.popup-form__field {
	margin-bottom: 18px;
}

.popup-form__label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 6px;
	letter-spacing: 0.01em;
}

.popup-form input[type="text"],
.popup-form input[type="email"],
.popup-form input[type="tel"],
.popup-form textarea,
.popup-form select {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	font-size: 14px;
	color: #0f172a;
	background: #ffffff;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
}

.popup-form input::placeholder,
.popup-form textarea::placeholder {
	color: #a0aec0;
}

.popup-form input:focus,
.popup-form textarea:focus,
.popup-form select:focus {
	outline: none;
	border-color: #0f172a;
	box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
	background: #ffffff;
}

/* Phone input layout styling */
.phone-input-group {
	display: flex;
	gap: 8px;
}

.phone-code-select {
	width: auto !important;
	max-width: 120px;
	flex-shrink: 0;
	padding-right: 8px;
}

/* Budget & Services Custom Radio/Checkbox buttons */
.budget-radio-group,
.services-checkbox-group {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}

.budget-radio-option,
.service-checkbox-option {
	display: block;
	position: relative;
	cursor: pointer;
}

.budget-radio-option input,
.service-checkbox-option input {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}

.budget-radio-option span,
.service-checkbox-option span {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 12px;
	background: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	text-align: center;
	font-size: 13px;
	font-weight: 500;
	color: #475569;
	transition: all 0.2s ease;
	user-select: none;
	min-height: 42px;
}

.budget-radio-option input:checked + span,
.service-checkbox-option input:checked + span {
	background: #f8fafc;
	border-color: #0f172a;
	color: #0f172a;
	font-weight: 600;
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
}

.budget-radio-option:hover span,
.service-checkbox-option:hover span {
	border-color: #93c5fd;
	background: #f8fafc;
}

/* Navigation buttons styling */
.popup-form__navigation {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: 20px;
}

.popup-form__navigation button {
	flex: 1;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	line-height: 1.4;
	font-family: inherit;
}

.btn--primary {
	background: #0f172a;
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.3);
}

.btn--primary:hover {
	background: #1e293b;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.4);
	transform: translateY(-1px);
}

.btn--whatsapp {
	background: #0f172a;
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.3);
}

.btn--whatsapp:hover {
	background: #1e293b;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.4);
	transform: translateY(-1px);
}

.btn--neutral {
	background: #f1f5f9;
	color: #475569;
	border: 1.5px solid #e2e8f0;
}

.btn--neutral:hover {
	background: #e2e8f0;
	color: #1e293b;
}

.btn--full {
	width: 100%;
}

/* =============================================
   RESPONSE SECTION
   ============================================= */
.popup-form__response {
	text-align: center;
	padding: 24px 0;
}

.popup-form__response-icon {
	width: 64px;
	height: 64px;
	background: #f1f5f9;
	color: #0f172a;
	border-radius: 50%;
	margin: 0 auto 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.popup-form__response-title {
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 8px;
}

.popup-form__response-message {
	font-size: 14px;
	color: #475569;
	margin: 0 0 20px;
	line-height: 1.5;
}

/* =============================================
   VALIDATION
   ============================================= */
.popup-form input.input-error {
	border-color: #ef4444 !important;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.popup-form .input-error-message {
	font-size: 12px;
	color: #ef4444;
	margin-top: 4px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 992px) {
	.popup-modal__container {
		padding: 28px 24px;
	}
}

@media (max-width: 480px) {
	.popup-modal__container {
		padding: 24px 18px;
		border-radius: 16px;
	}
	.popup-form__title {
		font-size: 22px;
	}
	.budget-radio-group,
	.services-checkbox-group {
		grid-template-columns: 1fr;
	}
	.phone-input-group {
		flex-direction: column;
	}
	.phone-code-select {
		max-width: 100%;
	}
	.popup-form__progress-label {
		font-size: 11px;
	}
	.popup-form__progress-line {
		flex: 0 0 24px;
	}
}
