:root {
	--fm-feedback-primary: #0E1C39;
	--fm-feedback-primary-hover: #1a3a7a;
	--fm-feedback-accent: #CEAA62;
	--fm-feedback-bg: #ffffff;
	--fm-feedback-text: #0E1C39;
	--fm-feedback-muted: #6b7280;
	--fm-feedback-border: #e5e7eb;
	--fm-feedback-radius: 12px;
	--fm-feedback-shadow: 0 10px 30px rgba(14, 28, 57, .18);
	--fm-feedback-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--fm-feedback-z: 2147483000;
}

#flowmatic-feedback-root,
#flowmatic-feedback-root * {
	box-sizing: border-box;
	font-family: var(--fm-feedback-font);
}

.fm-feedback__fab {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 56px;
	height: 56px;
	border-radius: 999px;
	background: var(--fm-feedback-primary);
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: var(--fm-feedback-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: var(--fm-feedback-z);
	transition: transform .15s ease, background .15s ease;
}
.fm-feedback__fab:hover { background: var(--fm-feedback-primary-hover); transform: scale(1.05); }
.fm-feedback__fab svg { width: 24px; height: 24px; }
.fm-feedback__fab--active { background: var(--fm-feedback-accent); color: var(--fm-feedback-text); }

.fm-feedback__hint {
	position: fixed;
	right: 90px;
	bottom: 32px;
	background: var(--fm-feedback-text);
	color: #fff;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 13px;
	z-index: var(--fm-feedback-z);
	box-shadow: var(--fm-feedback-shadow);
	pointer-events: none;
}

.fm-feedback__highlight {
	position: fixed;
	pointer-events: none;
	border: 2px solid var(--fm-feedback-accent);
	background: rgba(206, 170, 98, .12);
	z-index: calc(var(--fm-feedback-z) - 10);
	transition: all .05s linear;
	border-radius: 4px;
}

.fm-feedback__overlay {
	position: fixed;
	inset: 0;
	background: rgba(14, 28, 57, .55);
	z-index: calc(var(--fm-feedback-z) - 5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.fm-feedback__modal {
	background: var(--fm-feedback-bg);
	color: var(--fm-feedback-text);
	border-radius: var(--fm-feedback-radius);
	box-shadow: var(--fm-feedback-shadow);
	max-width: 520px;
	width: 100%;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-height: 90vh;
	overflow: auto;
}

.fm-feedback__title {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
}

.fm-feedback__anchor {
	font-size: 12px;
	color: var(--fm-feedback-muted);
	background: #f7f8fa;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid var(--fm-feedback-border);
	word-break: break-all;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
	max-height: 80px;
	overflow: auto;
}
.fm-feedback__anchor strong { color: var(--fm-feedback-text); display: block; margin-bottom: 4px; font-family: var(--fm-feedback-font); font-size: 12px; }

.fm-feedback__shot { display: flex; flex-direction: column; gap: 6px; }
.fm-feedback__shot-label { font-size: 12px; color: var(--fm-feedback-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.fm-feedback__shot img {
	display: block;
	max-width: 100%;
	max-height: 240px;
	width: auto;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
	border-radius: 8px;
	border: 1px solid var(--fm-feedback-border);
	background: #f7f8fa;
}

.fm-feedback__field { display: flex; flex-direction: column; gap: 6px; }
.fm-feedback__label { font-size: 13px; font-weight: 600; }

.fm-feedback__types {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.fm-feedback__type {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border: 1px solid var(--fm-feedback-border);
	background: #fff;
	color: var(--fm-feedback-text);
	border-radius: 999px;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.fm-feedback__type:hover { background: #f7f8fa; }
.fm-feedback__type--active {
	background: var(--fm-feedback-primary);
	border-color: var(--fm-feedback-primary);
	color: #fff;
}
.fm-feedback__type--active:hover { background: var(--fm-feedback-primary-hover); }
.fm-feedback__type-icon { font-size: 14px; line-height: 1; }
.fm-feedback__type-label { line-height: 1.2; }

.fm-feedback__input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid var(--fm-feedback-border);
	font: inherit;
	color: inherit;
	background: #fff;
}
.fm-feedback__input:focus { outline: 2px solid var(--fm-feedback-primary); outline-offset: 1px; }

.fm-feedback__textarea {
	width: 100%;
	min-height: 110px;
	resize: vertical;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid var(--fm-feedback-border);
	font: inherit;
	color: inherit;
	background: #fff;
}
.fm-feedback__textarea:focus { outline: 2px solid var(--fm-feedback-primary); outline-offset: 1px; }

.fm-feedback__row { display: flex; align-items: center; gap: 8px; }

.fm-feedback__btn {
	border: none;
	padding: 10px 16px;
	border-radius: 999px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, opacity .15s ease;
}
.fm-feedback__btn--primary { background: var(--fm-feedback-primary); color: #fff; }
.fm-feedback__btn--primary:hover { background: var(--fm-feedback-primary-hover); }
.fm-feedback__btn--ghost { background: transparent; color: var(--fm-feedback-muted); }
.fm-feedback__btn--ghost:hover { color: var(--fm-feedback-text); }
.fm-feedback__btn--mic {
	background: #f1f3f6; color: var(--fm-feedback-text);
	width: 40px; height: 40px; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
}
.fm-feedback__btn--mic.is-recording { background: #ef4444; color: #fff; animation: fm-pulse 1.4s ease-in-out infinite; }
.fm-feedback__btn--mic[disabled] { opacity: .4; cursor: not-allowed; }

@keyframes fm-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); }
	50%      { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.fm-feedback__actions { display: flex; justify-content: flex-end; gap: 8px; }

.fm-feedback__toast {
	position: fixed;
	right: 20px;
	bottom: 90px;
	background: var(--fm-feedback-text);
	color: #fff;
	padding: 10px 16px;
	border-radius: 999px;
	z-index: var(--fm-feedback-z);
	box-shadow: var(--fm-feedback-shadow);
	font-size: 14px;
	animation: fm-toast-in .2s ease;
}
.fm-feedback__toast--err { background: #ef4444; }
@keyframes fm-toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
