.ae-feedback {
	position: fixed;
	right: max(18px, env(safe-area-inset-right, 0px) + 12px);
	bottom: max(72px, env(safe-area-inset-bottom, 0px) + 64px);
	z-index: 999999;
}

.ae-feedback [hidden] {
	display: none !important;
}

.ae-feedback__trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 34px;
	padding: 0 14px 0 11px;
	border: 1px solid rgba(17, 17, 17, 0.14);
	border-radius: 999px;
	background: #ffffff;
	color: #111111;
	font-family: 'Inter', 'Neue Haas Grotesk', 'Helvetica Neue', system-ui, sans-serif;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	box-shadow: 0 8px 22px rgba(17, 17, 17, 0.06);
	cursor: pointer;
	transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ae-feedback__trigger:hover,
.ae-feedback__trigger:focus-visible {
	transform: translateY(-1px);
	border-color: rgba(17, 17, 17, 0.28);
	box-shadow: 0 14px 36px rgba(17, 17, 17, 0.1);
	outline: none;
}

.ae-feedback__trigger:focus-visible {
	outline: 2px solid #111111;
	outline-offset: 2px;
}

.ae-feedback__triggerDot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #8a6f4e;
	flex: 0 0 auto;
}

.ae-feedback__triggerLabel {
	display: inline-block;
	line-height: 1;
}

.ae-feedback__overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(8, 8, 11, 0.42);
	backdrop-filter: blur(10px);
}

.ae-feedback__panel {
	width: min(100%, 680px);
	max-height: min(100vh - 48px, 820px);
	overflow: auto;
	padding: 24px;
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
	color: #111827;
	-webkit-overflow-scrolling: touch;
}

.ae-feedback__panelHeader {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: -24px -24px 18px;
	padding: 24px 24px 12px;
	background: rgba(255, 255, 255, 0.97);
}

.ae-feedback__title {
	margin: 0;
	font-size: 34px;
	line-height: 1;
	letter-spacing: -0.04em;
}

.ae-feedback__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.06);
	color: #111827;
	font-size: 28px;
	cursor: pointer;
}

.ae-feedback__form {
	display: grid;
	gap: 16px;
}

.ae-feedback__honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.ae-feedback__field {
	display: grid;
	gap: 8px;
}

.ae-feedback__field > span {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #4b5563;
}

.ae-feedback__field input,
.ae-feedback__field textarea {
	width: 100%;
	min-height: 52px;
	padding: 16px 18px;
	border: 1px solid rgba(17, 24, 39, 0.14);
	border-radius: 18px;
	background: #ffffff;
	font: inherit;
	color: #111827;
}

.ae-feedback__field textarea {
	min-height: 180px;
	font-size: 18px;
	line-height: 1.5;
	resize: vertical;
}

.ae-feedback__field input:focus,
.ae-feedback__field textarea:focus {
	border-color: #111827;
	outline: none;
	box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.ae-feedback__toggles {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
}

.ae-feedback__toggleLink {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-weight: 600;
	color: #111827;
	text-decoration: underline;
	cursor: pointer;
}

.ae-feedback__toggleDivider {
	color: #9ca3af;
}

.ae-feedback__optional {
	display: grid;
	gap: 12px;
	padding: 2px 0 4px;
}

.ae-feedback__screenshotActions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ae-feedback__uploadButton,
.ae-feedback__captureButton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 16px;
	border-radius: 999px;
	border: 1px solid rgba(17, 24, 39, 0.14);
	background: #ffffff;
	font: inherit;
	font-weight: 600;
	color: #111827;
	cursor: pointer;
}

.ae-feedback__dropzone {
	display: block;
	padding: 16px;
	border: 1px dashed rgba(17, 24, 39, 0.18);
	border-radius: 18px;
	background: linear-gradient(180deg, rgba(249, 250, 251, 0.9), rgba(255, 255, 255, 0.95));
	cursor: pointer;
}

.ae-feedback__dropzone.is-dragover {
	border-color: #111827;
	background: rgba(17, 24, 39, 0.04);
}

.ae-feedback__dropzoneContent strong {
	display: block;
	margin-bottom: 4px;
	font-size: 18px;
}

.ae-feedback__dropzoneContent p {
	margin: 0;
	color: #6b7280;
}

.ae-feedback__preview {
	display: grid;
	gap: 12px;
	margin-top: 12px;
}

.ae-feedback__previewHeader {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ae-feedback__previewCount {
	font-size: 13px;
	font-weight: 600;
	color: #4b5563;
}

.ae-feedback__previewList {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ae-feedback__previewItem {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 88px;
}

.ae-feedback__previewTile {
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.ae-feedback__previewThumb {
	display: block;
	width: 88px;
	height: 88px;
	object-fit: cover;
	border-radius: 14px;
	border: 1px solid rgba(17, 24, 39, 0.1);
	background: #f3f4f6;
}

.ae-feedback__previewName {
	display: block;
	font-size: 12px;
	line-height: 1.35;
	color: #4b5563;
	word-break: break-word;
}

.ae-feedback__previewRemove {
	position: absolute;
	top: 6px;
	right: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.88);
	font-size: 18px;
	line-height: 1;
	color: #fff;
	cursor: pointer;
}

.ae-feedback__helper {
	margin: 0;
	font-size: 13px;
	color: #6b7280;
}

.ae-feedback__actions {
	position: sticky;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 -24px -24px;
	padding: 16px 24px 24px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 18%, rgba(255, 255, 255, 0.98));
}

.ae-feedback__status {
	flex: 1 1 auto;
	min-height: 20px;
	font-size: 13px;
	color: #6b7280;
}

.ae-feedback__status[data-tone="error"] {
	color: #b91c1c;
}

.ae-feedback__status[data-tone="muted"] {
	color: #6b7280;
}

.ae-feedback__submit {
	flex: 0 0 auto;
	min-width: 150px;
	min-height: 52px;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	background: #111111;
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
	opacity: 0.4;
	cursor: not-allowed;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.ae-feedback__submit.is-enabled,
.ae-feedback__submit:not(:disabled) {
	opacity: 1;
	cursor: pointer;
}

.ae-feedback__toast {
	position: fixed;
	left: 50%;
	bottom: max(16px, env(safe-area-inset-bottom, 0px) + 8px);
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: calc(100vw - 32px);
	padding: 14px 18px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
	color: #111827;
	z-index: 1000000;
}

.ae-feedback__toastMessage {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
}

.ae-feedback__toastLink {
	color: #111827;
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	white-space: nowrap;
}

html.ae-feedback-open,
html.ae-feedback-open body {
	overflow: hidden;
}

@media (max-width: 767px) {
	.ae-feedback {
		right: max(14px, env(safe-area-inset-right, 0px) + 8px);
		bottom: max(64px, env(safe-area-inset-bottom, 0px) + 56px);
	}

	.ae-feedback__trigger {
		height: 32px;
		padding: 0 12px 0 10px;
		gap: 7px;
		font-size: 10px;
		letter-spacing: 0.16em;
	}

	.ae-feedback__overlay {
		padding: calc(10px + env(safe-area-inset-top, 0px)) 10px calc(10px + env(safe-area-inset-bottom, 0px));
		align-items: flex-start;
	}

	.ae-feedback__panel {
		width: 100%;
		max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
		padding: 16px;
		border-radius: 22px;
	}

	.ae-feedback__panelHeader {
		margin: -16px -16px 14px;
		padding: 16px 16px 10px;
	}

	.ae-feedback__title {
		font-size: 26px;
	}

	.ae-feedback__field textarea {
		min-height: 160px;
		font-size: 17px;
	}

	.ae-feedback__actions {
		flex-direction: column;
		align-items: stretch;
		margin: 0 -16px -16px;
		padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
	}

	.ae-feedback__submit {
		width: 100%;
	}

	.ae-feedback__toast {
		left: 16px;
		right: 16px;
		transform: none;
		max-width: none;
	}
}
