/* ==================== BEGEHUNG (Inspection) ==================== */

.as-begehung-upload {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
}

.as-begehung-analyze-btn {
	align-self: flex-start;
	border-radius: var(--td-action-radius, 24px);
}

/* Analysis Error */
.as-analysis-error {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 24px;
	margin-top: 16px;
	border: 1px solid var(--td-critical-color, #dc2626);
	border-radius: var(--td-icon-radius, 12px);
	background: var(--td-critical-bg, #fef2f2);
	text-align: center;
}

.as-analysis-error-icon {
	font-size: 32px;
	color: var(--td-critical-color, #dc2626);
}

.as-analysis-error p {
	margin: 0;
	color: var(--td-heading-color, #101828);
	font-size: var(--td-body-size, 13px);
}

/* Analysis Result */
.as-analysis-result {
	margin-top: 16px;
	border: var(--td-card-border, 1px solid #e5e7eb);
	border-radius: var(--td-card-radius, 16px);
	padding: 20px;
	background: var(--td-card-bg, #fff);
	box-shadow: var(--td-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.05));
}

.as-analysis-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.as-analysis-stats {
	display: flex;
	gap: 6px;
	margin-left: auto;
}

/* Suggestion Grid (fresh analysis results) */
.as-suggestion-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.as-suggestion-card {
	border: var(--td-card-border, 1px solid #e5e7eb);
	border-radius: var(--td-card-radius, 16px);
	overflow: hidden;
	background: var(--td-card-bg, #fff);
	box-shadow: var(--td-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.05));
	transition: opacity 0.2s, border-color 0.2s, box-shadow 0.2s;
	animation: as-card-appear 0.3s ease-out;
}

/* Horizontal card layout: image left, content right */
.as-suggestion-card-h {
	display: flex;
	flex-direction: row;
	align-items: stretch;
}

.as-suggestion-image-h {
	flex: 0 0 160px;
	min-height: 120px;
	overflow: hidden;
	background: #f9fafb;
	display: block;
}

.as-suggestion-image-h img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.as-suggestion-card-h .as-suggestion-body {
	flex: 1;
	min-width: 0;
}

/* Mobile: stack image above text */
@media (max-width: 600px) {
	.as-suggestion-card-h {
		flex-direction: column;
	}

	.as-suggestion-image-h {
		flex: none;
		aspect-ratio: 1 / 1;
		max-height: 300px;
	}

	.as-suggestion-image-h img {
		object-position: center;
	}
}

.as-suggestion-top-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.as-suggestion-card:hover {
	box-shadow: var(--td-card-shadow-hover, 0 4px 12px rgba(0, 0, 0, 0.08));
}

@keyframes as-card-appear {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.as-suggestion-accepted {
	opacity: 0.7;
	border-color: var(--td-success-color, #89b63f);
}

.as-suggestion-rejected {
	opacity: 0.5;
}

.as-suggestion-image {
	width: 100%;
	height: 140px;
	overflow: hidden;
	background: #f9fafb;
}

.as-suggestion-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.as-suggestion-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.as-suggestion-title {
	margin: 0;
	font-size: var(--td-body-size, 13px);
	font-weight: var(--td-heading-weight, 700);
	color: var(--td-heading-color, #101828);
}

.as-suggestion-description {
	margin: 0;
	font-size: var(--td-label-size, 12px);
	color: var(--td-text-color, #6b7280);
	line-height: 1.5;
}

.as-suggestion-subcategory {
	font-size: var(--td-label-size, 12px);
	color: var(--td-text-color, #6b7280);
}

.as-suggestion-risk {
	display: flex;
	gap: 8px;
}

.as-suggestion-edit-input {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #e5e7eb;
	border-radius: var(--td-icon-radius, 12px);
	font-size: var(--td-body-size, 13px);
	font-family: inherit;
	transition: border-color 0.15s;
}

.as-suggestion-edit-input:focus {
	outline: none;
	border-color: var(--td-info-color, #2563eb);
}

.as-suggestion-title-input {
	font-weight: var(--td-heading-weight, 700);
}

.as-suggestion-desc-input {
	resize: none;
	min-height: 40px;
	overflow: hidden;
}

.as-suggestion-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}

.as-edit-btn {
	margin-left: auto;
	padding: 4px 8px;
}

.as-edit-btn .material-icons {
	font-size: 16px;
}

.as-suggestion-status-label {
	margin-top: 4px;
}

.as-btn-sm {
	padding: 4px 12px;
	font-size: var(--td-label-size, 12px);
	border-radius: var(--td-action-radius, 24px);
}

/* ==================== Inspection History ==================== */
.as-inspection-history {
	margin-top: var(--td-section-gap, 48px);
	padding-top: 0;
}

.as-inspection-history-title {
	margin: 0 0 16px;
	font-size: var(--td-heading-size, 18px);
	font-weight: var(--td-heading-weight, 700);
	color: var(--td-heading-color, #101828);
}

.as-inspection-item {
	border: var(--td-card-border, 1px solid #e5e7eb);
	border-radius: var(--td-card-radius, 16px);
	margin-bottom: 12px;
	overflow: hidden;
	background: var(--td-card-bg, #fff);
	box-shadow: var(--td-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.05));
	transition: box-shadow 0.2s, transform 0.2s;
}

.as-inspection-item:hover {
	box-shadow: var(--td-card-shadow-hover, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.as-inspection-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 20px;
	cursor: pointer;
	transition: background-color 0.15s;
}

.as-inspection-header:hover {
	background: #f9fafb;
}

.as-inspection-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.as-inspection-date {
	font-weight: var(--td-heading-weight, 700);
	font-size: var(--td-body-size, 13px);
	color: var(--td-heading-color, #101828);
}

.as-inspection-author {
	font-size: var(--td-label-size, 12px);
	color: var(--td-text-color, #6b7280);
}

.as-inspection-counts {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-left: auto;
	font-size: var(--td-label-size, 12px);
	flex-wrap: wrap;
	justify-content: flex-end;
}

.as-inspection-count-item {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: var(--td-text-color, #6b7280);
}

.as-inspection-count-icon {
	font-size: 16px;
}

.as-inspection-chevron {
	font-size: 20px;
	color: var(--td-muted-color, #9ca3af);
	transition: transform 0.2s;
}

.as-inspection-expanded .as-inspection-chevron {
	transform: rotate(180deg);
}

.as-inspection-body {
	padding: 0 20px 16px;
	border-top: 1px solid #e5e7eb;
}

.as-inspection-images {
	display: flex;
	gap: 8px;
	padding: 12px 0;
	overflow-x: auto;
}

.as-inspection-image-thumb {
	flex-shrink: 0;
	width: 80px;
	height: 60px;
	border-radius: var(--td-icon-radius, 12px);
	overflow: hidden;
	transition: opacity 0.15s;
}

.as-inspection-image-thumb:hover {
	opacity: 0.8;
}

.as-inspection-image-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ==================== Inspection Suggestion Cards (in history) ==================== */
.as-inspection-suggestions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 8px;
}

.as-insp-sug-card {
	border: var(--td-card-border, 1px solid #e5e7eb);
	border-radius: var(--td-icon-radius, 12px);
	padding: 16px;
	transition: border-color 0.15s, opacity 0.2s;
	background: var(--td-card-bg, #fff);
}

.as-insp-sug-card:hover {
	border-color: #d1d5db;
}

.as-insp-sug-accepted {
	border-left: 3px solid var(--td-success-color, #89b63f);
	opacity: 0.75;
}

.as-insp-sug-rejected {
	border-left: 3px solid #d1d5db;
	opacity: 0.55;
}

.as-insp-sug-top {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}

.as-insp-sug-title {
	margin: 0 0 4px;
	font-size: var(--td-body-size, 13px);
	font-weight: var(--td-heading-weight, 700);
	color: var(--td-heading-color, #101828);
	line-height: 1.4;
}

.as-insp-sug-desc {
	margin: 0 0 8px;
	font-size: var(--td-label-size, 12px);
	color: var(--td-text-color, #6b7280);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.as-insp-sug-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 6px;
	flex-wrap: wrap;
}

.as-insp-sug-risk {
	display: flex;
	gap: 6px;
}

.as-insp-sug-actions {
	display: flex;
	gap: 8px;
	margin-left: auto;
}

.as-btn-xs {
	padding: 4px 12px;
	font-size: var(--td-label-size, 12px);
	border-radius: var(--td-action-radius, 24px);
}

.as-badge-sm {
	font-size: var(--td-small-size, 11px);
	padding: var(--td-badge-padding, 2px 8px);
	border-radius: var(--td-badge-radius, 96px);
}

/* ==================== RISK MATRIX ==================== */

.as-risk-matrix {
	display: inline-block;
}

.as-risk-matrix-row {
	display: flex;
	gap: 2px;
	margin-bottom: 2px;
}

.as-risk-matrix-header-row {
	margin-bottom: 4px;
}

.as-risk-matrix-corner {
	width: 36px;
	height: 28px;
	flex-shrink: 0;
}

.as-risk-matrix-col-header {
	width: 54px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: var(--rd-fontweights-open-sans-1);
	font-size: var(--rd-fontsize-3);
	color: var(--rd-text-secondary);
}

.as-risk-matrix-row-header {
	width: 36px;
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: var(--rd-fontweights-open-sans-1);
	font-size: var(--rd-fontsize-3);
	color: var(--rd-text-secondary);
	flex-shrink: 0;
}

.as-risk-matrix-cell {
	width: 54px;
	height: 54px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	cursor: pointer;
	transition: opacity 0.15s, box-shadow 0.15s;
	gap: 2px;
}

.as-risk-matrix-cell:hover {
	opacity: 0.85;
}

.as-risk-matrix-cell:focus-visible {
	outline: 2px solid var(--rd-primary-active);
	outline-offset: 1px;
}

.as-risk-matrix-cell--selected {
	box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.5);
}

.as-risk-matrix-cell-id {
	font-weight: var(--rd-fontweights-open-sans-1);
	font-size: 13px;
	color: rgba(0, 0, 0, 0.7);
}

.as-risk-matrix-cell-score {
	font-size: 11px;
	color: rgba(0, 0, 0, 0.5);
}

.as-risk-matrix-axis-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 4px;
	padding-left: 36px;
	font-size: 11px;
	color: var(--rd-text-secondary);
}

.as-risk-matrix-y-label {
	font-size: 11px;
}

/* Risk matrix trigger button (inline in form) */
.as-risk-matrix-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	padding: 6px 12px;
	border: 1px dashed var(--rd-border-color);
	border-radius: 8px;
	font-size: var(--rd-fontsize-3);
	color: var(--rd-text-secondary);
	transition: border-color 0.15s;
}

.as-risk-matrix-trigger:hover {
	border-color: var(--rd-primary-active);
}

/* ==================== PROCESSING VIEW ==================== */

.as-processing-view {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
	text-align: center;
	min-height: 300px;
}

.as-processing-visual {
	margin-bottom: 24px;
}

.as-processing-ring {
	animation: os-spin 2.5s linear infinite;
}

.as-processing-icon {
	animation: none;
}

.as-processing-title {
	font-size: var(--rd-fontsize-1);
	font-weight: 600;
	margin: 0 0 8px 0;
	color: var(--rd-text-primary);
}

.as-processing-sub {
	font-size: var(--rd-fontsize-3);
	color: var(--rd-text-secondary);
	max-width: 360px;
	line-height: 1.5;
	margin: 0 0 16px 0;
}

.as-processing-elapsed {
	font-size: var(--rd-fontsize-4);
	color: var(--rd-text-tertiary);
	margin: 0;
}

.as-processing-failed .as-processing-title {
	color: var(--rd-danger-primary);
}

.as-processing-failed .as-processing-sub {
	margin-bottom: 24px;
}

/* ==================== PRESET PICKER ==================== */

.as-preset-picker {
	min-width: 400px;
}

.as-preset-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 400px;
	overflow-y: auto;
}

.as-preset-item {
	padding: 12px 16px 12px 44px;
	border: 1px solid var(--rd-border-primary);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	position: relative;
}

.as-preset-item::before {
	content: "";
	position: absolute;
	left: 14px;
	top: 16px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid var(--rd-border-primary);
	transition: border-color 0.15s, background 0.15s;
}

.as-preset-item:hover {
	border-color: var(--rd-primary-active);
}

.as-preset-item:hover::before {
	border-color: var(--rd-primary-active);
}

.as-preset-item-selected {
	border-color: var(--rd-primary-active);
	background: var(--rd-bg-selected, rgba(59, 130, 246, 0.05));
}

.as-preset-item-selected::before {
	border-color: var(--rd-primary-active);
	background: var(--rd-primary-active);
	box-shadow: inset 0 0 0 3px #fff;
}

.as-preset-item-title {
	font-weight: 600;
	margin-bottom: 4px;
}

.as-preset-item-meta {
	font-size: 13px;
	color: var(--rd-text-secondary);
}

.as-preset-item-desc {
	font-size: 13px;
	color: var(--rd-text-secondary);
	margin-top: 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.as-preset-group-header {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--rd-text-muted, #6c757d);
	margin: 16px 0 8px;
	padding-bottom: 4px;
	border-bottom: 1px solid var(--rd-border-color, #dee2e6);
}

.as-preset-group-header:first-child {
	margin-top: 0;
}

/* ==================== INSPECTION V2: Location Walk-Through ==================== */

/* Inspection Tab */
.as-inspection-tab {
	padding: 0;
}

.as-inspection-tab-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.as-back-btn {
	margin-bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.as-back-btn .material-icons {
	font-size: 18px;
}

.as-subsection-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--rd-text-secondary);
	margin: 0 0 8px 0;
	/* text-transform: uppercase; */
	letter-spacing: 0.5px;
}

/* Draft Items */
.as-drafts-section {
	margin-bottom: 20px;
}

.as-draft-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: var(--rd-bg-warning-subtle, #fffbeb);
	border: 1px solid var(--rd-border-warning, #fbbf24);
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s;
	margin-bottom: 8px;
}

.as-draft-item:hover {
	background: var(--rd-bg-warning-subtle-hover, #fef3c7);
}

.as-draft-info {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
}

.as-draft-date {
	font-size: 13px;
	color: var(--rd-text-secondary);
}

.as-draft-author {
	font-size: 13px;
	color: var(--rd-text-secondary);
}

.as-draft-stats {
	display: flex;
	gap: 12px;
	font-size: 13px;
	color: var(--rd-text-secondary);
}

/* Walkthrough */
.as-walkthrough {
	padding: 0;
}

.as-walkthrough-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.as-walkthrough-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0;
}

.as-walkthrough-hint {
	font-size: 13px;
	color: var(--rd-text-secondary);
	margin: 0 0 16px 0;
}

.as-walkthrough-entries {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 16px;
}

/* Hierarchical entry wrapper */
.as-walkthrough-entry-wrapper {
	border-bottom: 1px solid var(--rd-border-light);
	padding-bottom: 4px;
}

.as-walkthrough-entry-wrapper:last-child {
	border-bottom: none;
}

/* Parent entries that have an Unterbereiche toggle: no bottom border,
   the toggle + child group provide visual separation instead. */
.as-walkthrough-entry-wrapper.as-entry-has-children {
	border-bottom: none;
	padding-bottom: 0;
}

.as-hierarchy-toggle {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	background: none;
	border: none;
	padding: 4px 0 4px 4px;
	cursor: pointer;
	font-size: 11px;
	color: var(--rd-text-tertiary);
}

.as-hierarchy-toggle:hover {
	color: var(--rd-text-primary);
}

.as-hierarchy-toggle .material-icons {
	font-size: 16px;
}

.as-hierarchy-child-count {
	font-size: 11px;
}

/* Visual grouping bracket for child entries */
.as-walkthrough-child-group {
	border-left: 2px solid var(--rd-border-light);
	margin-left: 8px;
	padding-left: 0;
}

.as-walkthrough-footer {
	display: flex;
	justify-content: flex-end;
	padding-top: 16px;
	border-top: 1px solid var(--rd-border-light);
}

/* Location Card */
.as-location-card {
	background: var(--rd-bg-surface);
}

.as-location-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	cursor: pointer;
	user-select: none;
}

.as-location-card-header:hover .as-location-card-name {
	color: var(--rd-primary-active, #d66181);
}

.as-location-card-title-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.as-location-card-chevron {
	font-size: 20px;
	color: var(--rd-text-secondary);
}

.as-location-card-name {
	font-size: 15px;
	font-weight: 600;
	margin: 0;
	transition: color 0.15s ease;
}

.as-location-card-status {
	display: flex;
	align-items: center;
}

.as-save-indicator {
	font-size: 12px;
	color: var(--rd-text-secondary);
}

.as-save-indicator.as-unsaved {
	color: var(--rd-text-warning, #d97706);
}

.as-save-indicator.as-saved {
	color: var(--rd-text-success, #059669);
}

.as-location-card-body {
	padding: 0 0 12px 28px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.as-location-card-collapsed .as-location-card-body {
	display: none;
}

.as-location-card-label {
	font-size: 13px;
	font-weight: 500;
	color: var(--rd-text-secondary);
	margin-bottom: 4px;
	display: block;
}

.as-location-card-textarea {
	resize: vertical;
	min-height: 60px;
	width: 100%;
}

.as-location-card-charcount {
	font-size: 11px;
	color: var(--rd-text-tertiary);
	text-align: right;
	display: block;
	margin-top: 2px;
}

/* Inspection Files (styled like driver license check) */
.as-inspection-files .pc_ufiles_uploadlink {
	background-image: none;
	margin-top: 0;
	height: unset;
}

.as-inspection-files .pc_ufiles_uploadlink:after {
	display: none;
}

.as-inspection-files .pc_ufiles_dropzoneContent {
	padding: 32px;
	text-align: center;
}

.as-inspection-files .pc_ufiles_label:before {
	content: "";
	background-color: var(--rd-primary-active);
	display: inline-block;
	width: 24px;
	height: 24px;
	mask-image: url("/src/img/2024/svg/icons/rd-photograph.svg");
	-webkit-mask-image: url("/src/img/2024/svg/icons/rd-photograph.svg");
	mask-size: contain;
	-webkit-mask-size: contain;
	mask-position: 50%;
	-webkit-mask-position: 50%;
	mask-repeat: no-repeat;
	-webkit-mask-repeat: no-repeat;
}

/* Add Location */
.as-walkthrough-add-location {
	margin-bottom: 16px;
}

.as-add-location-form {
	display: flex;
	gap: 8px;
	align-items: center;
}

.as-add-location-form input {
	flex: 1;
}

/* Inspection Results - Location Groups */
.as-result-location-group {
	margin-bottom: 20px;
}

.as-result-location-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.as-result-location-name {
	font-size: 15px;
	font-weight: 600;
	margin: 0;
}

.as-result-cross-location {
	border-top: 2px solid var(--rd-primary-active, #d66181);
	padding-top: 16px;
	margin-top: 8px;
}

.as-cross-location-icon {
	color: var(--rd-primary-active, #d66181);
	font-size: 20px;
}

.as-suggestion-note {
	border-left: 3px solid var(--rd-info-color, #3b82f6);
	opacity: 0.8;
}

/* History - Entry-based view */
.as-history-entry {
	padding: 12px 0;
	border-bottom: 1px solid var(--rd-border-light);
}

.as-history-entry:last-child {
	border-bottom: none;
}

.as-history-entry-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.as-history-entry-name {
	font-size: 14px;
	font-weight: 600;
	margin: 0;
}

.as-history-entry-note {
	font-size: 13px;
	color: var(--rd-text-secondary);
	margin: 0 0 8px 0;
	font-style: italic;
}

.as-history-cross-location {
	border-top: 2px solid var(--rd-primary-active, #d66181);
	padding-top: 12px;
	margin-top: 8px;
}

.as-history-cross-location .material-icons {
	color: var(--rd-primary-active, #d66181);
	font-size: 18px;
}

/* Empty state hint */
.as-empty-hint {
	font-size: 13px;
	color: var(--rd-text-secondary);
	margin-top: 8px;
}

/* ── Assessment Creation Dialog ── */

.as-creation-dialog .modal_dialog_top_title {
	padding-bottom: 32px;
}

/* Icon area: grey background with bottom border */
.as-creation-choices .as-creation-icon {
	background-image: none;
	background-color: #F4F6F8;
	border-bottom: 1px solid #CCC;
	aspect-ratio: auto;
	height: 157px;
	position: relative;
	border-radius: var(--rd-borderradius-border-md) var(--rd-borderradius-border-md) 0 0;
}

/* Render SVG icons as colored masks via ::after pseudo-element */
.as-creation-choices .as-creation-icon::after {
	content: "";
	display: block;
	width: 66px;
	height: 66px;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: var(--rd-primary-active, #d66181);
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.as-creation-choices .as-creation-icon[data-key="blank"]::after {
	-webkit-mask-image: url("/src/img/2026/Icon/Unfilled/document-add.svg");
	mask-image: url("/src/img/2026/Icon/Unfilled/document-add.svg");
}

.as-creation-choices .as-creation-icon[data-key="preset"]::after {
	-webkit-mask-image: url("/src/img/2026/Icon/Unfilled/template.svg");
	mask-image: url("/src/img/2026/Icon/Unfilled/template.svg");
}

.as-creation-choices .as-creation-icon[data-key="import"]::after {
	-webkit-mask-image: url("/src/img/2026/Icon/Unfilled/upload.svg");
	mask-image: url("/src/img/2026/Icon/Unfilled/upload.svg");
}

.as-creation-choices .as-creation-icon[data-key="maternity"]::after {
	-webkit-mask-image: url("/src/img/2026/Icon/Unfilled/heart.svg");
	mask-image: url("/src/img/2026/Icon/Unfilled/heart.svg");
}

/* Disabled creation choice (e.g. coming soon) */
.qmCreationChoice.qmCreationChoice--disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.qmCreationChoiceBadge {
	display: inline-block;
	margin: 0 24px 16px;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 12px;
	background: var(--rd-gray-100, #f3f4f6);
	color: var(--rd-gray-500, #6b7280);
}

/* ── Biostoff Import Review Page ── */

.as-import-review {
	max-width: 960px;
	margin: 0 auto;
	padding: 24px;
}

.as-import-review__header {
	margin-bottom: 24px;
}

.as-import-review__header h2 {
	margin: 0 0 8px;
	font-size: 22px;
}

.as-import-review__subtitle {
	color: var(--rd-gray-600, #4b5563);
	font-size: 14px;
	margin: 0;
}

.as-import-review__meta {
	background: var(--rd-gray-50, #f9fafb);
	border: 1px solid var(--rd-gray-200, #e5e7eb);
	border-radius: var(--rd-borderradius-border-md);
	padding: 16px;
	margin-bottom: 24px;
}

.as-import-review__meta .rd-input-row {
	margin-bottom: 8px;
}

.as-import-review__meta .rd-input-row:last-child {
	margin-bottom: 0;
}

.as-import-review__section {
	margin-bottom: 24px;
}

.as-import-review__section h3 {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 8px;
}

.as-import-review__hint {
	font-size: 13px;
	color: var(--rd-gray-500, #6b7280);
	margin: 0 0 12px;
}

.as-import-review__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.as-import-review__table th {
	text-align: left;
	font-weight: 600;
	padding: 6px 8px;
	border-bottom: 2px solid var(--rd-gray-200, #e5e7eb);
}

.as-import-review__table td {
	padding: 6px 8px;
	border-bottom: 1px solid var(--rd-gray-100, #f3f4f6);
	vertical-align: middle;
}

.as-import-review__table--compact th,
.as-import-review__table--compact td {
	padding: 4px 6px;
}

.as-import-review__hazards {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.as-import-review__hazard {
	border: 1px solid var(--rd-gray-200, #e5e7eb);
	border-radius: var(--rd-borderradius-border-md);
	overflow: hidden;
}

.as-import-review__hazard-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	cursor: pointer;
	background: var(--rd-gray-50, #f9fafb);
	transition: background 0.15s;
}

.as-import-review__hazard-header:hover {
	background: var(--rd-gray-100, #f3f4f6);
}

.as-import-review__hazard-toggle {
	font-size: 14px;
	width: 16px;
	flex-shrink: 0;
}

.as-import-review__hazard-title {
	flex: 1;
	min-width: 0;
}

.as-import-review__hazard-title .rd-input--inline {
	border: none;
	background: transparent;
	font-size: 14px;
	font-weight: 500;
	padding: 2px 4px;
	width: 100%;
}

.as-import-review__hazard-title .rd-input--inline:focus {
	background: white;
	border: 1px solid var(--rd-primary-active, #d66181);
	border-radius: 4px;
}

.as-import-review__hazard-badges {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.as-import-review__hazard-body {
	padding: 16px;
	border-top: 1px solid var(--rd-gray-200, #e5e7eb);
}

.as-import-review__hazard-body h4 {
	font-size: 13px;
	font-weight: 600;
	margin: 16px 0 8px;
}

.as-import-review__hazard-body h4:first-child {
	margin-top: 0;
}

.as-import-review__hazard-detail {
	margin-bottom: 12px;
}

.as-import-review__flag {
	font-size: 12px;
	padding: 2px 0;
	color: var(--rd-warning-600, #d97706);
}

.as-import-review__actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	padding-top: 24px;
	border-top: 1px solid var(--rd-gray-200, #e5e7eb);
}

/* Badges for import review */
.as-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 600;
	border-radius: 10px;
	white-space: nowrap;
}

.as-badge--protection {
	background: var(--rd-blue-100, #dbeafe);
	color: var(--rd-blue-700, #1d4ed8);
}

.as-badge--agents {
	background: var(--rd-green-100, #dcfce7);
	color: var(--rd-green-700, #15803d);
}

.as-badge--measures {
	background: var(--rd-orange-100, #ffedd5);
	color: var(--rd-orange-700, #c2410c);
}

.as-badge--matched {
	background: var(--rd-green-100, #dcfce7);
	color: var(--rd-green-700, #15803d);
}

.as-badge--fuzzy {
	background: var(--rd-yellow-100, #fef9c3);
	color: var(--rd-yellow-700, #a16207);
}

.as-badge--new {
	background: var(--rd-purple-100, #f3e8ff);
	color: var(--rd-purple-700, #7e22ce);
}

.as-badge--unknown {
	background: var(--rd-gray-100, #f3f4f6);
	color: var(--rd-gray-500, #6b7280);
}

/* Small button variants for inline use */
.rd-btn-icon--sm {
	width: 20px;
	height: 20px;
	font-size: 10px;
}

.rd-btn-icon--danger {
	color: var(--rd-red-500, #ef4444);
	background: none;
	border: none;
	cursor: pointer;
	padding: 2px;
	border-radius: 4px;
}

.rd-btn-icon--danger:hover {
	background: var(--rd-red-50, #fef2f2);
}

