/* Modal Form Styles */

.contact-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
}

.contact-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	overflow: hidden;
}

/* Backdrop filter with fallback for Safari */
@supports (backdrop-filter: blur(4px)) {
	.contact-modal__overlay {
		backdrop-filter: blur(4px);
		-webkit-backdrop-filter: blur(4px);
	}
}

.contact-modal__container {
	position: relative;
	background-color: #ffffff;
	border-radius: 12px;
	width: 100%;
	max-width: 480px;
	max-height: 95vh;
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	transform: scale(0.9);
	transition: transform 0.3s ease;
	flex-shrink: 0;
	-webkit-overflow-scrolling: touch;
}

.contact-modal[aria-hidden="false"] .contact-modal__container {
	transform: scale(1);
}

.contact-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #121416;
	font-size: 1.25rem;
	z-index: 10;
	transition: color 0.2s ease, transform 0.2s ease;
	border-radius: 50%;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.contact-modal__close:hover,
.contact-modal__close:focus {
	color: #1384f5;
	transform: rotate(90deg);
	outline: none;
}

.contact-modal__close:active {
	transform: rotate(90deg) scale(0.95);
}

.contact-modal__content {
	padding: 1.5rem 1.5rem;
}

.contact-modal__title {
	margin: 0 0 1.25rem 0;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	color: #121416;
	text-align: center;
}

.contact-modal__form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.contact-modal__field {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.contact-modal__field--floating {
	position: relative;
	gap: 0;
}

.contact-modal__label {
	font-size: 0.875rem;
	font-weight: 500;
	color: #121416;
	line-height: 1.4;
	margin-bottom: 0.125rem;
	transition: transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
	pointer-events: none;
}

.contact-modal__field--floating .contact-modal__label {
	position: absolute;
	left: 0.875rem;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	font-size: 16px;
	color: #6c757d;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	z-index: 1;
}

.contact-modal__input {
	width: 100%;
	padding: 0.625rem 0.875rem;
	font-size: 16px;
	line-height: 1.5;
	color: #121416;
	background-color: #ffffff;
	border: 1.5px solid #ced4da;
	border-radius: 8px;
	transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
}

.contact-modal__field--floating .contact-modal__input:focus ~ .contact-modal__label,
.contact-modal__field--floating .contact-modal__input:not(:placeholder-shown) ~ .contact-modal__label {
	opacity: 0;
	visibility: hidden;
}

/* Prevent zoom on input focus in iOS Safari */
@media screen and (max-width: 719.98px) {
	.contact-modal__input {
		font-size: 16px;
	}
}

.contact-modal__input:focus {
	outline: none;
	border-color: #1384f5;
	box-shadow: 0 0 0 4px rgba(19, 132, 245, 0.08);
	background-color: #fafbfc;
}

.contact-modal__input:hover:not(:focus) {
	border-color: #adb5bd;
}

.contact-modal__input::placeholder {
	color: transparent;
	opacity: 0;
}

.contact-modal__field--floating .contact-modal__input::placeholder {
	color: transparent;
}

.contact-modal__input:invalid:not(:focus):not(:placeholder-shown) {
	border-color: #dc3545;
	box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.08);
}

.contact-modal__field--contact-method {
	gap: 0.75rem;
}

.contact-modal__radio-group {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.625rem;
	margin-top: 0.25rem;
}

.contact-modal__radio-label {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border: 2px solid #e9ecef;
	border-radius: 10px;
	background-color: #ffffff;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	position: relative;
	min-height: 44px;
}

.contact-modal__radio-label:hover {
	border-color: #1384f5;
	background-color: #f0f7ff;
	box-shadow: 0 2px 8px rgba(19, 132, 245, 0.15);
	transform: translateY(-1px);
}

.contact-modal__radio {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
	cursor: pointer;
}

.contact-modal__radio-custom {
	width: 22px;
	height: 22px;
	border: 2.5px solid #ced4da;
	border-radius: 50%;
	background-color: #ffffff;
	position: relative;
	flex-shrink: 0;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-modal__radio-custom::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #ffffff;
	transform: translate(-50%, -50%) scale(0);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-modal__radio:checked ~ .contact-modal__radio-custom {
	border-color: #1384f5;
	background-color: #1384f5;
	box-shadow: 0 0 0 4px rgba(19, 132, 245, 0.15);
}

.contact-modal__radio:checked ~ .contact-modal__radio-custom::after {
	transform: translate(-50%, -50%) scale(1);
}

.contact-modal__radio:checked ~ .contact-modal__radio-text {
	color: #1384f5;
	font-weight: 600;
}

.contact-modal__radio:focus ~ .contact-modal__radio-custom {
	box-shadow: 0 0 0 4px rgba(19, 132, 245, 0.2);
}

.contact-modal__radio-label:has(.contact-modal__radio:checked) {
	border-color: #1384f5;
	background: linear-gradient(135deg, rgba(19, 132, 245, 0.08) 0%, rgba(13, 110, 253, 0.05) 100%);
	box-shadow: 0 4px 12px rgba(19, 132, 245, 0.2), 0 2px 4px rgba(19, 132, 245, 0.1);
	transform: translateY(-1px);
}

.contact-modal__radio-text {
	font-size: 0.9375rem;
	color: #495057;
	line-height: 1.5;
	transition: color 0.3s ease, font-weight 0.3s ease;
	font-weight: 500;
}

.contact-modal__message {
	padding: 0.875rem 1rem;
	border-radius: 8px;
	font-size: 0.9375rem;
	line-height: 1.5;
	display: none;
}

.contact-modal__message.show {
	display: block;
}

.contact-modal__message.success {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.contact-modal__message.error {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.contact-modal__submit {
	width: 100%;
	padding: 0.875rem 1.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	color: #ffffff;
	background: linear-gradient(135deg, #1384f5 0%, #0d6efd 100%);
	border: none;
	border-radius: 10px;
	box-shadow: 0 4px 12px rgba(19, 132, 245, 0.3), 0 2px 4px rgba(19, 132, 245, 0.2);
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 48px;
	margin-top: 0.25rem;
	position: relative;
	overflow: hidden;
}

.contact-modal__submit::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	transform: translate(-50%, -50%);
	transition: width 0.6s ease, height 0.6s ease;
}

.contact-modal__submit:hover,
.contact-modal__submit:focus {
	background: linear-gradient(135deg, #1173d4 0%, #0b5ed7 100%);
	box-shadow: 0 6px 20px rgba(19, 132, 245, 0.4), 0 4px 8px rgba(19, 132, 245, 0.3);
	transform: translateY(-2px);
	outline: none;
}

.contact-modal__submit:hover::before {
	width: 300px;
	height: 300px;
}

.contact-modal__submit:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(19, 132, 245, 0.3), 0 1px 2px rgba(19, 132, 245, 0.2);
}

.contact-modal__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
	box-shadow: none;
}

.contact-modal__submit-loader {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.contact-modal__submit-loader svg {
	animation: rotate 1.5s linear infinite;
}

@keyframes rotate {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Mobile Styles */
@media (max-width: 719.98px) {
	.contact-modal__overlay {
		padding: 0;
		align-items: flex-end;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
	
	.contact-modal__container {
		max-width: 100%;
		max-height: none;
		height: auto;
		border-radius: 16px 16px 0 0;
		transform: translateY(100%);
		overflow: visible;
	}
	
	.contact-modal[aria-hidden="false"] .contact-modal__container {
		transform: translateY(0);
	}
	
	.contact-modal__content {
		padding: 1.25rem 1.25rem;
	}
	
	.contact-modal__title {
		font-size: 1.375rem;
		margin-bottom: 1rem;
	}
	
	.contact-modal__form {
		gap: 0.875rem;
	}
	
	.contact-modal__close {
		top: 0.75rem;
		right: 0.75rem;
		width: 44px;
		height: 44px;
		min-width: 44px;
		min-height: 44px;
	}
	
	.contact-modal__radio-group {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.5rem;
	}
	
	.contact-modal__radio-label {
		padding: 0.75rem 0.875rem;
		min-height: 44px;
	}
	
	.contact-modal__submit {
		min-height: 48px;
		padding: 0.875rem 1.25rem;
	}
}

/* Prevent body scroll when modal is open */
body.modal-open {
	overflow: hidden;
	position: fixed;
	width: 100%;
	height: 100%;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
	body.modal-open {
		position: fixed;
		width: 100%;
		height: 100%;
		left: 0;
		top: 0;
	}
}

