/* ============================================================
   Contact Modal — единая модалка обратной связи
   ============================================================ */

.contact-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s ease;
	padding: 20px;
}

.contact-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.contact-modal {
	position: relative;
	width: 100%;
	max-width: 480px;
	background: #1a1934;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius-lg);
	padding: 40px 36px 36px;
	transform: scale(0.95) translateY(10px);
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(255, 94, 20, 0.03);
	max-height: 90vh;
	overflow-y: auto;
}

.contact-modal-overlay.active .contact-modal {
	transform: scale(1) translateY(0);
}

.contact-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.5);
	transition: all 0.3s ease;
}

.contact-modal-close:hover {
	background: rgba(255, 94, 20, 0.15);
	border-color: rgba(255, 94, 20, 0.3);
	color: var(--color-primary);
}

.contact-modal-title {
	font-family: var(--font-heading);
	font-size: 22px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.3;
	margin-bottom: 8px;
	padding-right: 36px;
}

.contact-modal-subtitle {
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 24px;
}

.contact-modal-fields {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 20px;
}

.contact-modal-fields .form-group {
	margin-bottom: 0;
}

.contact-modal-fields .form-label {
	color: rgba(255, 255, 255, 0.7);
	font-size: 13px;
	font-weight: 500;
}

.contact-modal-fields .form-input {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border-radius: var(--radius-sm);
	padding: 12px 14px;
	font-size: 15px;
	width: 100%;
	font-family: var(--font-primary);
	transition: border-color 0.3s ease;
}

.contact-modal-fields .form-input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(255, 94, 20, 0.1);
}

.contact-modal-fields .form-input::placeholder {
	color: rgba(255, 255, 255, 0.3);
}

.contact-modal-fields .form-textarea {
	resize: vertical;
	min-height: 70px;
}

.contact-modal-submit {
	margin-top: 4px;
}

/* Loading state */
.contact-modal-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 0;
	color: rgba(255, 255, 255, 0.6);
	font-size: 15px;
	font-weight: 500;
}

.contact-modal-spinner {
	animation: contact-spin 1s linear infinite;
	flex-shrink: 0;
}

@keyframes contact-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.contact-modal .form-disclaimer {
	color: rgba(255, 255, 255, 0.3);
	font-size: 11px;
	margin-top: 10px;
}

/* Success state */
.contact-modal-success {
	text-align: center;
	padding: 30px 10px;
}

.contact-modal-success h4 {
	font-family: var(--font-heading);
	font-size: 22px;
	font-weight: 700;
	color: #ffffff;
	margin: 16px 0 8px;
}

.contact-modal-success p {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.55);
	line-height: 1.5;
}

/* Scrollbar */
.contact-modal::-webkit-scrollbar {
	width: 6px;
}

.contact-modal::-webkit-scrollbar-track {
	background: transparent;
}

.contact-modal::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
}

@media (max-width: 520px) {
	.contact-modal {
		padding: 28px 20px 24px;
	}

	.contact-modal-title {
		font-size: 18px;
	}
}