/**
 * Стили UI-блока: Feedback form
 *
 * @package medexpress-by-fin-code
 */

[data-me-feedback-trigger] {
	touch-action: manipulation;
}

.me-offcanvas--feedback {
	justify-content: flex-end;
	align-items: stretch;
}

.me-offcanvas--feedback .me-offcanvas__backdrop {
	background: rgba(var(--primary-color-rgb), 0.43);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.me-offcanvas--feedback .me-offcanvas__panel {
	width: 50%;
	max-width: 747px;
	border: none;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

.me-feedback__close {
	position: absolute;
	top: 40px;
	right: 40px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: none;
	border: none;
	color: var(--font-color);
	cursor: pointer;
}

.me-feedback__inner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	flex: 1;
	min-height: 0;
	padding: 80px 40px 40px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.me-feedback__title {
	margin: 0 0 32px;
	max-width: 440px;
	width: 100%;
	font-size: 32px;
	font-weight: 500;
	line-height: 0.92;
	color: var(--font-color);
	text-align: center;
}

.me-feedback__form {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	max-width: 440px;
}

.me-offcanvas--feedback:not(.me-offcanvas--feedback-full) .me-feedback__full-only,
.me-offcanvas--feedback-full .me-feedback__short-only {
	display: none;
}

.me-feedback__form .me-feedback__input {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 0 16px;
	font-family: var(--font-family);
	font-size: 18px;
	line-height: 1.3;
	color: var(--font-color);
	background: #fff;
	border: 1px solid var(--gray-border-color);
	border-radius: 0;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.15s ease;
}

.me-feedback__form .me-feedback__input::placeholder {
	color: var(--font-color);
	opacity: 0.6;
}

.me-feedback__form .me-feedback__input:focus {
	color: var(--font-color);
}

.me-feedback__form .me-feedback__input.is-error,
.me-feedback__phone.is-error {
	border-color: #e53935;
}

.me-feedback__contacts {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.me-feedback__hint {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.3;
	color: var(--font-color-muted);
}

.me-feedback__phone {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 52px;
	padding: 0 16px;
	background: #fff;
	border: 1px solid var(--gray-border-color);
	box-sizing: border-box;
	transition: border-color 0.15s ease;
}

.me-feedback__phone-code {
	flex-shrink: 0;
	font-size: 18px;
	line-height: 1.3;
	color: var(--font-color);
}

.me-feedback__phone-input {
	flex: 1;
	min-width: 0;
	padding: 0;
	font-family: var(--font-family);
	font-size: 18px;
	line-height: 1.3;
	color: var(--font-color);
	background: transparent;
	border: none !important;
	outline: none !important;
}

.me-feedback__phone-input::placeholder {
	color: var(--font-color);
	opacity: 0.6;
}

.me-feedback__comment {
	display: block;
	width: 100%;
	min-height: 120px;
	padding: 14px 16px;
	font-family: var(--font-family);
	font-size: 18px;
	line-height: 1.3;
	color: var(--font-color);
	background: #fff;
	border: 1px solid var(--gray-border-color);
	border-radius: 0;
	outline: none;
	resize: vertical;
	box-sizing: border-box;
}

.me-feedback__comment:focus {
	color: var(--font-color);
}

.me-feedback__comment::placeholder {
	color: var(--font-color);
	opacity: 0.6;
}

.me-feedback__consent {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
}

.me-feedback__consent-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.me-feedback__consent-box {
	position: relative;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	margin-top: 1px;
	background: #fff;
	border: 1px solid var(--gray-border-color);
	box-sizing: border-box;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.me-feedback__consent-box::after {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 14px;
	height: 10px;
	background: url('../../../assets/icons/check-white.svg') center / contain no-repeat;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.me-feedback__consent-input:checked + .me-feedback__consent-box {
	background: var(--primary-color);
	border-color: var(--primary-color);
}

.me-feedback__consent-input:checked + .me-feedback__consent-box::after {
	opacity: 1;
}

.me-feedback__consent-text {
	font-size: 16px;
	line-height: 1.1;
	color: var(--font-color);
	transition: color 0.15s ease;
}

.me-feedback__consent.is-error .me-feedback__consent-box {
	border-color: #e53935;
}

.me-feedback__consent.is-error .me-feedback__consent-text {
	color: #e53935;
}

.me-feedback__submit[disabled] {
	opacity: 0.65;
	cursor: not-allowed;
}

.me-feedback__message {
	margin: 0;
	font-size: 16px;
	line-height: 1.3;
	text-align: center;
}

.me-feedback__message.is-error {
	color: #e53935;
}

.me-feedback__message.is-success {
	color: var(--primary-color);
}

@media (max-width: 768px) {
	.me-offcanvas--feedback {
		align-items: flex-end;
	}

	.me-offcanvas--feedback .me-offcanvas__panel {
		width: 100%;
		max-width: none;
		max-height: calc(100vh - 40px);
		transform: translateY(100%);
	}

	.me-offcanvas.is-open.me-offcanvas--feedback .me-offcanvas__panel {
		transform: translateY(0);
	}

	.me-feedback__close {
		top: 20px;
		right: 16px;
		width: 24px;
		height: 24px;
	}

	.me-feedback__inner {
		align-items: stretch;
		padding: 56px 16px 32px;
	}

	.me-feedback__title {
		margin-bottom: 32px;
		font-size: 24px;
		text-align: left;
	}

	.me-feedback__form {
		max-width: none;
	}
}
