/* Staging Feedback */
#sfb-root, #sfb-layer, #sfb-root *, #sfb-layer * {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
}
#sfb-layer { position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: 2147483000; }

html.sfb-mode, html.sfb-mode * { cursor: crosshair !important; }
html.sfb-mode #sfb-root, html.sfb-mode #sfb-root * { cursor: pointer !important; }

.sfb-outline {
	position: fixed; display: none; pointer-events: none; z-index: 2147483001;
	outline: 2px solid #e8590c; background: rgba(232, 89, 12, .08); border-radius: 2px;
}
.sfb-banner {
	position: fixed; top: 0; left: 0; right: 0; z-index: 2147483002;
	background: #e8590c; color: #fff; text-align: center; padding: 10px 16px;
}
.sfb-banner[hidden], .sfb-list[hidden] { display: none !important; }
.sfb-link { background: none; border: 0; color: #fff; text-decoration: underline; padding: 0; cursor: pointer; }

.sfb-bar {
	position: fixed; right: 20px; bottom: 20px; z-index: 2147483002;
	display: flex; gap: 8px; align-items: center;
}
.sfb-btn {
	display: inline-flex; align-items: center; gap: 6px;
	background: #fff; color: #1d2327; border: 1px solid #c3c4c7; border-radius: 6px;
	padding: 8px 14px; cursor: pointer; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.sfb-btn:hover { border-color: #8c8f94; }
.sfb-btn--primary { background: #e8590c; border-color: #e8590c; color: #fff; }
.sfb-btn--primary:hover { background: #c94c09; border-color: #c94c09; color: #fff; }
.sfb-btn[disabled] { opacity: .6; cursor: default; }
.sfb-main { padding: 10px 18px; font-weight: 600; }
.sfb-badge { background: #e8590c; color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12px; }

.sfb-pin {
	position: absolute; transform: translate(-50%, -100%);
	width: 28px; height: 28px; border-radius: 50%;
	background: #e8590c; color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
	display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
	font-weight: 700; font-size: 12px;
}
.sfb-pin--done { background: #8c8f94; opacity: .75; }

.sfb-pop {
	position: absolute; width: 340px; max-width: calc(100vw - 24px);
	background: #fff; color: #1d2327; border-radius: 8px; padding: 14px;
	box-shadow: 0 8px 30px rgba(0,0,0,.25); border: 1px solid #dcdcde;
}
.sfb-pop__head { font-weight: 600; margin-bottom: 8px; padding-right: 20px; word-break: break-word; }
.sfb-close { position: absolute; top: 6px; right: 8px; background: none; border: 0; font-size: 20px; cursor: pointer; color: #646970; }
.sfb-form textarea, .sfb-form input[type="text"], .sfb-form input[type="email"] {
	width: 100%; border: 1px solid #c3c4c7; border-radius: 4px; padding: 8px; margin: 0 0 8px;
	background: #fff; color: #1d2327; box-shadow: none; min-height: 0;
}
.sfb-row { display: flex; gap: 8px; }
.sfb-row input { flex: 1; min-width: 0; }
.sfb-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.sfb-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.sfb-meta { color: #646970; font-size: 12px; margin: 0 0 6px; word-break: break-word; }
.sfb-warn { background: #fcf0e3; color: #8a4b00; border-radius: 4px; padding: 6px 8px; font-size: 12px; margin: 6px 0; }
.sfb-comment { white-space: pre-wrap; margin: 0 0 8px; word-break: break-word; }

.sfb-num {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 22px; height: 22px; border-radius: 50%; background: #e8590c; color: #fff; font-size: 12px; font-weight: 700;
}
.sfb-num--done { background: #8c8f94; }

.sfb-list {
	position: fixed; right: 20px; bottom: 74px; z-index: 2147483002;
	width: 360px; max-width: calc(100vw - 40px); max-height: 60vh; display: flex; flex-direction: column;
	background: #fff; color: #1d2327; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.25); border: 1px solid #dcdcde;
}
.sfb-list__head { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid #f0f0f1; }
.sfb-list__head strong { flex: 1; }
.sfb-list__head label { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; margin: 0; }
.sfb-list__body { overflow: auto; padding: 6px; }
.sfb-list__item {
	display: flex; gap: 10px; width: 100%; text-align: left; align-items: flex-start;
	background: none; border: 0; border-radius: 6px; padding: 8px; cursor: pointer; color: inherit;
}
.sfb-list__item:hover { background: #f6f7f7; }
.sfb-list__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sfb-list__text strong { font-weight: 600; word-break: break-word; }
.sfb-list__text small { color: #646970; font-size: 12px; }

.sfb-toast {
	position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2147483003;
	background: #1d2327; color: #fff; padding: 10px 16px; border-radius: 6px; transition: opacity .4s;
}
.sfb-toast--error { background: #d63638; }
.sfb-toast--out { opacity: 0; }

@media (max-width: 600px) {
	.sfb-bar { right: 12px; bottom: 12px; }
	.sfb-main { padding: 8px 12px; }
	.sfb-row { flex-direction: column; gap: 0; }
}

/* Tools */
.sfb-banner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.sfb-tool {
	background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.5);
	border-radius: 14px; padding: 3px 12px; cursor: pointer;
}
.sfb-tool.is-active { background: #fff; color: #e8590c; border-color: #fff; font-weight: 600; }
.sfb-hint { opacity: .9; }
html.sfb-tool-text, html.sfb-tool-text * { cursor: text !important; }
html.sfb-tool-box, html.sfb-tool-box * { touch-action: none !important; user-select: none !important; }
html.sfb-tool-text #sfb-root, html.sfb-tool-text #sfb-root * { cursor: pointer !important; }

/* Frames & text markings */
.sfb-box { position: absolute; pointer-events: none; border-radius: 3px; display: none; }
.sfb-box--saved, .sfb-box--draft { display: block; }
.sfb-box--box, .sfb-box--drawing { border: 2px solid #e8590c; background: rgba(232, 89, 12, .06); }
.sfb-box--drawing { border-style: dashed; }
.sfb-box--text { background: rgba(255, 213, 0, .35); border-bottom: 2px solid #f0b400; mix-blend-mode: multiply; }
.sfb-box--done { border-color: #8c8f94; background: rgba(140, 143, 148, .08); opacity: .6; }
.sfb-quote { margin: 0 0 8px; padding: 4px 8px; border-left: 3px solid #f0b400; background: #fffbe6; font-style: italic; word-break: break-word; }

/* Replies */
.sfb-replies { border-top: 1px solid #f0f0f1; margin-top: 8px; padding-top: 8px; max-height: 220px; overflow: auto; }
.sfb-reply { border-left: 3px solid #e8590c; padding: 2px 0 2px 8px; margin: 0 0 8px; }
.sfb-reply .sfb-comment { margin: 0; }
.sfb-replyform { border-top: 1px solid #f0f0f1; margin-top: 10px; padding-top: 10px; }
.sfb-replyform textarea { min-height: 0; }
.sfb-row[hidden] { display: none !important; }
.sfb-pop { max-height: calc(100vh - 40px); overflow: auto; }
