/* Review comment UI — load before tenant branding so clients can override via CSS variables. */
:root {
	--sec-accent: #0d6efd;
	--sec-accent-hover: #0d6efd;
	--sec-surface: inherit;
	--sec-surface-muted: #f8f9fa;
	--sec-border: #ced4da;
	--sec-border-light: #dee2e6;
	--sec-text: #333;
	--sec-text-muted: #495057;
	--sec-text-subtle: #6c757d;
	--sec-text-faint: #888;
	--sec-on-accent: #fff;
	--sec-success: #2e7d32;
	--sec-success-bg: #e8f5e9;
	--sec-error: #b00020;
	--sec-status: #666;
	--sec-mod-type-bg: #fde8e8;
	--sec-mod-type-text: #8b0000;
	--sec-priority-low-bg: #e9ecef;
	--sec-priority-low-text: #495057;
	--sec-priority-medium-bg: #fff3cd;
	--sec-priority-medium-text: #856404;
	--sec-priority-high-bg: #ffe0b2;
	--sec-priority-high-text: #e65100;
	--sec-priority-critical-bg: #f8d7da;
	--sec-priority-critical-text: #721c24;
	--sec-reply-panel-bg: #fafafa;
}

.comment-section {
	margin-top: 16px;
	border: 1px solid var(--sec-border-light);
	border-radius: 8px;
	background: var(--sec-surface);
}
.comment-section-header {
	padding: 10px 16px;
	background: var(--sec-surface-muted);
	border-bottom: 1px solid var(--sec-border-light);
	font-weight: 600;
	font-size: 0.875em;
	border-radius: 8px 8px 0 0;
}
.srcm-comment-badge {
	display: inline-block;
	min-width: 20px;
	padding: 1px 6px;
	border-radius: 10px;
	background: var(--sec-accent);
	color: var(--sec-on-accent);
	font-size: 0.6875em;
	font-weight: 600;
	margin-inline-end: 4px;
}
.srcm-comment-preview {
	font-size: 0.75em;
	color: var(--sec-text);
}
.srcm-comment-time {
	font-size: 0.6875em;
	color: var(--sec-text-faint);
}
.srcm-comment-link {
	text-decoration: none;
}
.srcm-comment-link:hover .srcm-comment-preview {
	text-decoration: underline;
}

.sec-comment-textarea {
	width: 100%;
	min-height: 72px;
	min-width: 280px;
	max-width: 100%;
	box-sizing: border-box;
	resize: vertical;
	font: inherit;
	line-height: 1.4;
	padding: 8px 10px;
	border: 1px solid var(--sec-border);
	border-radius: 6px;
	background: var(--sec-surface);
	color: inherit;
}
.sec-comment-card {
	position: relative;
}
.sec-comment-card.sec-comment-editing {
	outline: 2px solid var(--sec-accent);
	outline-offset: 2px;
	border-radius: 8px;
}
.sec-comment-edited-badge {
	display: inline-block;
	margin-inline-start: 6px;
	font-size: 0.6875em;
	color: var(--sec-text-subtle);
	text-decoration: none;
	border-bottom: 1px dotted var(--sec-border);
}
.sec-comment-edited-badge:hover {
	color: var(--sec-accent-hover);
}
.sec-edit-panel-title {
	font-size: 0.75em;
	font-weight: 600;
	color: var(--sec-text-muted);
	margin: 0 0 6px;
}
.sec-edit-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 8px;
}
.sec-edit-save,
.sec-edit-cancel {
	font: inherit;
	font-size: 0.75em;
	padding: 4px 12px;
	cursor: pointer;
	border-radius: 4px;
	border: 1px solid var(--sec-border);
	background: var(--sec-surface);
	color: inherit;
}
.sec-edit-save {
	background: var(--sec-accent);
	border-color: var(--sec-accent);
	color: var(--sec-on-accent);
}
.sec-edit-status {
	font-size: 0.6875em;
	color: var(--sec-status);
}
.sec-edit-status.ok {
	color: var(--sec-success);
}
.sec-edit-status.error {
	color: var(--sec-error);
}
.sec-edit-saved-chip {
	display: inline-block;
	margin-inline-start: 8px;
	padding: 2px 8px;
	border-radius: 10px;
	background: var(--sec-success-bg);
	color: var(--sec-success);
	font-size: 0.6875em;
	font-weight: 600;
}
.sec-task-priority-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 0.6875em;
	font-weight: 600;
}
.sec-task-priority-low {
	background: var(--sec-priority-low-bg);
	color: var(--sec-priority-low-text);
}
.sec-task-priority-medium {
	background: var(--sec-priority-medium-bg);
	color: var(--sec-priority-medium-text);
}
.sec-task-priority-high {
	background: var(--sec-priority-high-bg);
	color: var(--sec-priority-high-text);
}
.sec-task-priority-critical {
	background: var(--sec-priority-critical-bg);
	color: var(--sec-priority-critical-text);
}
.sec-task-comment-count {
	font-size: 0.75em;
	text-decoration: none;
	color: var(--sec-accent);
	white-space: nowrap;
}
.scm-mod-card {
	border: 1px solid var(--sec-border-light);
	border-radius: 8px;
	padding: 12px 14px;
	margin: 0 0 12px;
	background: var(--sec-surface);
}
.scm-mod-card-head {
	font-size: 0.8125em;
	font-weight: 600;
	color: var(--sec-text);
	margin-bottom: 8px;
}
.scm-mod-type {
	display: inline-block;
	font-size: 0.6875em;
	padding: 2px 8px;
	border-radius: 10px;
	background: var(--sec-mod-type-bg);
	color: var(--sec-mod-type-text);
	margin-inline-start: 8px;
}
.scm-mod-diff {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
@media (max-width: 720px) {
	.scm-mod-diff {
		grid-template-columns: 1fr;
	}
}
.scm-mod-before label,
.scm-mod-after label {
	display: block;
	font-size: 0.6875em;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--sec-text-faint);
	margin-bottom: 4px;
}
.scm-mod-before .scm-mod-value {
	color: var(--sec-text-subtle);
	text-decoration: line-through;
	opacity: 0.85;
}
.scm-mod-after .scm-mod-value {
	color: var(--sec-text);
	font-weight: 500;
}
.scm-mod-value {
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 0.8125em;
}
.scm-history-header {
	margin: 0 0 16px;
	padding: 12px 14px;
	background: var(--sec-surface-muted);
	border: 1px solid var(--sec-border-light);
	border-radius: 8px;
}
.scm-history-filters {
	margin: 12px 0;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}
.scm-history-pagination {
	margin: 16px 0 8px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}
.eec-comment-cell {
	min-width: 320px;
	width: 28%;
	vertical-align: top;
}
.eec-comment-cell .sec-comment-card,
.eec-comment-cell .sec-comment-edit-wrap,
.eec-comment-cell .sec-edit-panel {
	min-width: 280px;
	max-width: 100%;
}

.srcm-reply-cell {
	min-width: 200px;
	max-width: 320px;
}
.srcm-reply-summary {
	margin-bottom: 4px;
}
.srcm-reply-toggle {
	font: inherit;
	font-size: 0.6875em;
	color: var(--sec-accent);
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	text-decoration: underline;
}
.srcm-reply-panel {
	display: none;
	margin-top: 6px;
	padding: 8px;
	border: 1px solid var(--sec-border-light);
	border-radius: 6px;
	background: var(--sec-reply-panel-bg);
}
.srcm-reply-panel.open {
	display: block;
}
.srcm-reply-thread {
	max-height: 140px;
	overflow-y: auto;
	margin-bottom: 8px;
}
.srcm-reply-item {
	margin-bottom: 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--sec-border-light);
	font-size: 0.75em;
}
.srcm-reply-item:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}
.srcm-reply-meta {
	font-size: 0.6875em;
	color: var(--sec-text-faint);
	margin-bottom: 2px;
}
.srcm-reply-text {
	color: var(--sec-text);
	white-space: pre-wrap;
	word-break: break-word;
}
.srcm-reply-textarea {
	width: 100%;
	max-width: 100%;
	min-height: 52px;
	resize: vertical;
	font: inherit;
	font-size: 0.75em;
	box-sizing: border-box;
	margin-bottom: 6px;
	border: 1px solid var(--sec-border);
	border-radius: 6px;
	padding: 6px 8px;
	background: var(--sec-surface);
	color: inherit;
}
.srcm-reply-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
.srcm-reply-send {
	font: inherit;
	font-size: 0.75em;
	padding: 4px 10px;
	cursor: pointer;
}
.srcm-reply-status {
	font-size: 0.6875em;
	color: var(--sec-status);
}
.srcm-reply-status.error {
	color: var(--sec-error);
}
.srcm-reply-status.ok {
	color: var(--sec-success);
}
.srcm-reply-empty {
	font-size: 0.6875em;
	color: var(--sec-text-faint);
	font-style: italic;
}
.srcm-reply-more {
	font-size: 0.6875em;
	color: var(--sec-status);
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px dashed var(--sec-border-light);
}
.srcm-empty-cell {
	font-size: 0.6875em;
	color: var(--sec-text-faint);
	font-style: italic;
}
