.kcal-feedback-modal,
.kcal-feedback-modal * {
	box-sizing: border-box;
}

html.kcal-feedback-page-locked,
body.kcal-feedback-page-locked {
	overflow: hidden !important;
	overscroll-behavior: none !important;
}

.kcal-feedback-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 18px;
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 180ms ease, visibility 180ms ease;
}

.kcal-feedback-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.kcal-feedback-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, 0.76);
	backdrop-filter: blur(7px);
	-webkit-backdrop-filter: blur(7px);
}

.kcal-feedback-card {
	position: relative;
	z-index: 1;
	width: min(94vw, 560px);
	max-height: min(88vh, 760px);
	overflow: auto;
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 24px;
	background:
		radial-gradient(900px 360px at 5% 0%, rgba(37, 99, 235, 0.23), transparent 55%),
		radial-gradient(700px 380px at 105% 25%, rgba(34, 197, 94, 0.13), transparent 50%),
		#0b1220;
	color: #f8fafc;
	box-shadow: 0 32px 90px rgba(0, 0, 0, 0.58);
	transform: translateY(14px) scale(0.985);
	transition: transform 200ms cubic-bezier(0.2, 0.85, 0.25, 1.05);
	outline: none;
}

.kcal-feedback-modal.is-open .kcal-feedback-card {
	transform: translateY(0) scale(1);
}

.kcal-feedback-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px 0;
}

.kcal-feedback-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 850;
	letter-spacing: 0.2px;
}

.kcal-feedback-icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid rgba(96, 165, 250, 0.28);
	border-radius: 12px;
	background: rgba(37, 99, 235, 0.16);
}

.kcal-feedback-close {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid rgba(226, 232, 240, 0.16);
	border-radius: 14px;
	background: rgba(248, 250, 252, 0.06);
	color: #f8fafc;
	font: inherit;
	cursor: pointer;
	transition: background 150ms ease, transform 150ms ease;
}

.kcal-feedback-close:hover {
	background: rgba(248, 250, 252, 0.11);
	transform: translateY(-1px);
}

.kcal-feedback-content {
	padding: 14px 22px 22px;
}

.kcal-feedback-content h2 {
	margin: 0;
	color: #fff;
	font-size: clamp(22px, 4vw, 29px);
	line-height: 1.15;
	letter-spacing: -0.025em;
}

.kcal-feedback-content > p {
	margin: 10px 0 0;
	color: rgba(226, 232, 240, 0.75);
	font-size: 15px;
	line-height: 1.55;
}

.kcal-feedback-form {
	display: grid;
	gap: 10px;
	margin-top: 22px;
}

.kcal-feedback-form label {
	color: #e2e8f0;
	font-size: 13px;
	font-weight: 750;
}

.kcal-feedback-form textarea {
	display: block;
	width: 100%;
	min-height: 154px;
	resize: vertical;
	padding: 14px 15px;
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 16px;
	background: rgba(2, 6, 23, 0.5);
	color: #fff;
	font: inherit;
	font-size: 15px;
	line-height: 1.5;
	outline: none;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.kcal-feedback-form textarea::placeholder {
	color: rgba(203, 213, 225, 0.5);
}

.kcal-feedback-form textarea:focus {
	border-color: rgba(96, 165, 250, 0.68);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.kcal-feedback-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	color: rgba(203, 213, 225, 0.65);
	font-size: 12.5px;
	line-height: 1.4;
}

.kcal-feedback-status {
	min-height: 20px;
	margin-top: 2px;
	color: #fda4af;
	font-size: 13.5px;
	line-height: 1.4;
}

.kcal-feedback-status.is-success {
	color: #86efac;
}

.kcal-feedback-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 2px;
}

.kcal-feedback-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 44px;
	padding: 11px 17px;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 780;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
	transition: filter 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.kcal-feedback-button:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.kcal-feedback-button--primary {
	border-color: rgba(255, 255, 255, 0.12);
	background: linear-gradient(180deg, #2563eb, #1d4ed8);
	color: #fff !important;
	box-shadow: 0 10px 28px rgba(37, 99, 235, 0.26);
}

.kcal-feedback-button--secondary {
	border-color: rgba(226, 232, 240, 0.16);
	background: rgba(248, 250, 252, 0.06);
	color: #f8fafc;
}

.kcal-feedback-button[disabled] {
	opacity: 0.68;
	cursor: wait;
	transform: none;
}

.kcal-feedback-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.42);
	border-top-color: #fff;
	border-radius: 50%;
	animation: kcal-feedback-spin 700ms linear infinite;
}

.kcal-feedback-button.is-loading .kcal-feedback-spinner {
	display: inline-block;
}

.kcal-feedback-login-gate {
	display: grid;
	justify-items: center;
	margin-top: 22px;
	padding: 22px;
	border: 1px solid rgba(148, 163, 184, 0.16);
	border-radius: 18px;
	background: rgba(2, 6, 23, 0.36);
	text-align: center;
}

.kcal-feedback-lock {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: 12px;
	border: 1px solid rgba(96, 165, 250, 0.22);
	border-radius: 17px;
	background: rgba(37, 99, 235, 0.14);
	font-size: 24px;
}

.kcal-feedback-login-gate h3 {
	margin: 0;
	color: #fff;
	font-size: 18px;
	line-height: 1.25;
}

.kcal-feedback-login-gate p {
	max-width: 410px;
	margin: 8px 0 18px;
	color: rgba(203, 213, 225, 0.7);
	font-size: 14px;
	line-height: 1.5;
}

@keyframes kcal-feedback-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 540px) {
	.kcal-feedback-modal {
		align-items: end;
		padding: 10px;
	}

	.kcal-feedback-card {
		width: 100%;
		max-height: 92dvh;
		border-radius: 22px;
	}

	.kcal-feedback-content {
		padding: 12px 17px 18px;
	}

	.kcal-feedback-header {
		padding: 15px 16px 0;
	}

	.kcal-feedback-meta {
		align-items: flex-start;
	}

	.kcal-feedback-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kcal-feedback-modal,
	.kcal-feedback-card,
	.kcal-feedback-button,
	.kcal-feedback-close {
		transition: none !important;
	}

	.kcal-feedback-spinner {
		animation-duration: 1.4s;
	}
}
