.defect-gallery-outer {
	overflow: visible;
}

/* Positioning applies the header's z-index so its dropdowns stay above the sticky toolbar. */
.defect-gallery-outer .site-header {
	position: relative;
}

.defect-gallery-shell {
	background: #f3f5f1;
	margin-top: 0 !important;
	padding-bottom: 34px;
	padding-top: 46px;
	overflow: visible;
}

.defect-gallery-shell .wrap {
	max-width: 1360px;
	width: calc(100% - 44px);
}

.defect-gallery-app {
	color: #27342d;
	margin: 0 auto;
	padding: 0 0 28px;
}

.defect-gallery-app * {
	box-sizing: border-box;
}

.visually-hidden {
	border: 0;
	clip: rect(0 0 0 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.defect-gallery-bar {
	align-items: center;
	background: #fff;
	border: 1px solid #d9e1dc;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(20, 35, 26, .06);
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	justify-content: space-between;
	margin-bottom: 14px;
	padding: 16px 18px;
}

.defect-gallery-heading {
	flex: 1 1 320px;
	min-width: 0;
}

.defect-gallery-header-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-end;
}

.defect-gallery-app a.defect-gallery-return {
	align-items: center;
	background: #1f5733;
	border: 1px solid #1f5733;
	border-radius: 6px;
	color: #fff;
	display: inline-flex;
	gap: 8px;
	min-height: 38px;
	padding: 8px 10px;
	text-decoration: none;
}

.defect-gallery-app a.defect-gallery-return:hover {
	background: #12311d;
	border-color: #12311d;
}

.defect-gallery-app a.defect-gallery-return:focus-visible {
	outline: 3px solid #397bba;
	outline-offset: 3px;
}

.defect-gallery-return-arrow {
	flex-shrink: 0;
	font-size: 14px;
	line-height: 1;
}

.defect-gallery-return-brand {
	min-width: 0;
}

.defect-gallery-return-brand img {
	margin: 0;
	display: block;
	height: auto;
	max-width: 100%;
	width: 180px;
}

.defect-gallery-admin-link {
	flex-shrink: 0;
}

.defect-gallery-kicker {
	color: #69766f;
	font-size: 13px;
	margin: 0 0 4px;
	padding: 0;
}

.defect-gallery-app h1 {
	color: #1f4f38;
	font-size: 28px;
	line-height: 1.12;
	margin: 0;
}

.defect-gallery-tools {
	align-items: center;
	background: #fff;
	border: 1px solid #d9e1dc;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(20, 35, 26, .06);
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
	margin-bottom: 12px;
	padding: 12px;
	position: sticky;
	top: 8px;
	z-index: 40;
}

.defect-gallery-app .defect-search-wrap {
	display: block;
	margin: 0;
	min-width: 0;
	position: relative;
	width: 100%;
}

.defect-gallery-app input.defect-gallery-search[type="search"] {
	appearance: none;
	background: #fff;
	border: 1px solid #bdc9c2;
	border-radius: 6px;
	box-shadow: none;
	box-sizing: border-box;
	color: #26342d;
	display: block;
	font-size: 16px !important;
	height: 44px;
	line-height: 1.25 !important;
	margin: 0;
	padding: 10px 12px 10px 42px;
	width: 100%;
	-webkit-appearance: none;
}

.defect-gallery-app .defect-search-icon {
	align-items: center;
	bottom: 0;
	color: #66766c;
	display: flex;
	font-size: 14px;
	left: 14px;
	line-height: 1;
	pointer-events: none;
	position: absolute;
	top: 0;
	width: 16px;
	z-index: 1;
}

.defect-gallery-buckets {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.defect-gallery-bucket,
.defect-gallery-button {
	align-items: center;
	background: #f5f7f2;
	border: 1px solid #c9d3cc;
	border-radius: 6px;
	color: #24362b;
	cursor: pointer;
	display: inline-flex;
	font-family: Tahoma, Arial, Helvetica, Sans-serif;
	font-size: 14px;
	font-weight: 700;
	gap: 8px;
	line-height: 1.1;
	margin: 0;
	min-height: 44px;
	padding: 9px 12px;
	text-decoration: none;
	text-transform: none;
}

.defect-gallery-bucket[aria-pressed="true"] {
	background: #1f4f38;
	border-color: #1f4f38;
	color: #fff;
}

.defect-gallery-status {
	color: #627168;
	font-size: 14px;
	margin: 0 0 10px;
	min-height: 20px;
}

.defect-group-bar {
	align-items: center;
	display: none;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 12px;
}

.defect-group-bar.is-visible {
	display: flex;
}

.defect-group-bar-text {
	color: #536159;
	font-size: 14px;
	line-height: 1.35;
}

.defect-gallery-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.defect-card {
	background: #fff;
	border: 1px solid #d9e1dc;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(24, 36, 29, .07);
	cursor: pointer;
	display: grid;
	grid-template-rows: auto 1fr;
	min-width: 0;
	overflow: hidden;
	padding: 0;
	text-align: left;
	transition: border-color 160ms ease, box-shadow 160ms ease;
	width: 100%;
}

.defect-card:hover,
.defect-card:focus {
	border-color: #78927f;
	box-shadow: 0 6px 16px rgba(24, 36, 29, .1);
	outline: none;
}

.defect-card-image {
	aspect-ratio: 4 / 3;
	background: #e9ece7;
	display: block;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.defect-card-image img {
	display: block;
	height: 100%;
	margin: 0;
	object-fit: cover;
	width: 100%;
}

.defect-card-body {
	align-items: center;
	display: flex;
	gap: 8px;
	justify-content: space-between;
	min-height: 54px;
	padding: 10px 12px;
}

.defect-card-name {
	color: #203729;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.25;
	margin: 0;
}

.defect-card-group-mark {
	align-items: center;
	background: #eef3ef;
	border: 1px solid #d4ded7;
	border-radius: 999px;
	color: #506057;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 700;
	height: 24px;
	justify-content: center;
	min-width: 24px;
	padding: 0 7px;
}

.defect-card.is-group .defect-card-image::before {
	background: rgba(31, 79, 56, .88);
	border-radius: 999px;
	color: #fff;
	content: attr(data-count);
	font-size: 11px;
	font-weight: 800;
	height: 26px;
	left: 10px;
	line-height: 1;
	min-width: 26px;
	padding: 8px 7px 0;
	position: absolute;
	text-align: center;
	top: 10px;
	z-index: 1;
}

.defect-card.is-group .defect-card-name {
	color: #1f4f38;
}

.defect-modal {
	align-items: center;
	display: none;
	inset: 0;
	justify-content: center;
	padding: 16px;
	position: fixed;
	z-index: 9000;
}

.defect-modal.is-visible {
	display: flex;
}

.defect-modal-backdrop {
	background: rgba(16, 26, 21, .54);
	inset: 0;
	position: absolute;
}

.defect-modal-panel {
	background: #fff;
	border: 1px solid #d5ded8;
	border-radius: 8px;
	box-shadow: 0 22px 56px rgba(20, 35, 26, .28);
	height: calc(100vh - 32px);
	height: calc(100dvh - 32px);
	max-width: 1320px;
	overflow: hidden;
	padding: 16px;
	position: relative;
	width: min(100%, 1320px);
	z-index: 1;
}

#defectModalContent {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

.defect-focus-header {
	align-items: flex-start;
	border-bottom: 1px solid #e1e7e3;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 12px;
	padding-bottom: 12px;
}

.defect-focus-heading {
	min-width: 0;
}

.defect-focus-title {
	color: #1f4f38;
	font-size: 26px;
	line-height: 1.15;
	margin: 0 0 5px;
}

.defect-focus-path {
	color: #627168;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	margin: 0;
	text-transform: uppercase;
}

.defect-modal-header-actions {
	align-items: center;
	display: flex;
	flex: 0 1 auto;
	gap: 8px;
	justify-content: flex-end;
	min-width: 0;
}

.defect-modal-nav {
	align-items: center;
	background: #f7f8f4;
	border: 1px solid #dce3de;
	border-radius: 7px;
	display: flex;
	gap: 6px;
	min-width: 0;
	padding: 5px;
}

.defect-modal-nav .defect-icon-button {
	background: transparent;
	border-color: transparent;
	min-height: 34px;
	min-width: 34px;
	padding: 7px 8px;
}

.defect-modal-nav .defect-icon-button:hover,
.defect-modal-nav .defect-icon-button:focus {
	background: #edf3ee;
	border-color: #b8c6bd;
}

.defect-modal .defect-jump-select {
	appearance: none;
	background-color: #fff;
	background-image: url("/assets/img/caret-down-555-28.png");
	background-position: right 8px center;
	background-repeat: no-repeat;
	border: 1px solid #bdc9c2;
	border-radius: 6px;
	box-shadow: none !important;
	color: #26342d;
	font-family: Tahoma, Arial, Helvetica, Sans-serif;
	font-size: 14px;
	font-weight: 700;
	height: 36px;
	line-height: 1.2 !important;
	margin: 0;
	max-width: 280px;
	min-width: 190px;
	padding: 7px 34px 7px 10px;
	width: auto;
}

.defect-modal .defect-jump-select:hover,
.defect-modal .defect-jump-select:focus {
	border-color: #78927f;
	outline: 2px solid #b6c7bb;
	outline-offset: 1px;
}

.defect-modal-position {
	color: #5a6960;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	min-width: 42px;
	text-align: center;
	white-space: nowrap;
}

.defect-focus-layout {
	display: grid;
	gap: 18px;
	grid-template-columns: minmax(0, 1.7fr) minmax(290px, .5fr);
	min-height: 0;
	flex: 1 1 auto;
}

.defect-viewer {
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
}

.defect-image-stage {
	background: #eff2ed;
	border: 1px solid #d5ded8;
	border-radius: 7px;
	cursor: zoom-in;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	position: relative;
	touch-action: none;
	width: 100%;
}

.defect-viewer-watermark {
	aspect-ratio: 390 / 275;
	background: #717973;
	bottom: 1.8%;
	left: 50%;
	mask: url("/assets/img/spib-lettermark.svg") center / contain no-repeat;
	opacity: .24;
	pointer-events: none;
	position: absolute;
	transform: translateX(-50%);
	width: 16%;
	z-index: 1;
	-webkit-mask: url("/assets/img/spib-lettermark.svg") center / contain no-repeat;
}

.defect-image-stage.is-zoomed {
	background: #17211b;
	cursor: grab;
}

.defect-image-stage.is-dragging {
	cursor: grabbing;
}

.defect-image-stage img {
	display: block;
	height: 100%;
	margin: 0;
	object-fit: contain;
	transform-origin: center center;
	transition: transform 120ms ease;
	width: 100%;
}

.defect-viewer-controls {
	align-items: center;
	border-bottom: 0;
	border-top: 1px solid #e2e8e4;
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: space-between;
	margin-top: 10px;
	padding-top: 10px;
}

.defect-image-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.defect-icon-button {
	align-items: center;
	background: #fff;
	border: 1px solid #b8c6bd;
	border-radius: 6px;
	color: #25372c;
	cursor: pointer;
	display: inline-flex;
	font-family: Tahoma, Arial, Helvetica, Sans-serif;
	font-size: 14px;
	font-weight: 700;
	gap: 7px;
	justify-content: center;
	line-height: 1;
	margin: 0;
	min-height: 36px;
	min-width: 36px;
	padding: 8px 10px;
	text-decoration: none;
	text-transform: none;
}

.defect-icon-button:hover,
.defect-icon-button:focus {
	background: #edf3ee;
	outline: 2px solid #b6c7bb;
	outline-offset: 1px;
}

.defect-icon-button[disabled] {
	color: #8b968f;
	cursor: not-allowed;
	opacity: .62;
}

.defect-close-button {
	min-width: 38px;
}

.defect-download-button {
	background: transparent;
	border-color: #d2dcd6;
	color: #516059;
}

.defect-zoom-control {
	align-items: center;
	color: #56665d;
	display: flex;
	font-size: 13px;
	gap: 8px;
	line-height: 1;
	min-width: min(100%, 290px);
}

.defect-zoom-control input {
	accent-color: #1f4f38;
	margin: 0;
	width: 160px;
}

.defect-zoom-value {
	color: #3f4f47;
	font-size: 12px;
	min-width: 40px;
	text-align: right;
}

.defect-gallery-button {
	background: #fff;
	border-color: #b8c6bd;
	min-height: 38px;
	padding: 7px 10px;
}

.defect-gallery-button[disabled] {
	color: #8b968f;
	cursor: not-allowed;
	opacity: .62;
}

.defect-gallery-button:hover,
.defect-gallery-button:focus {
	background: #edf3ee;
	outline: 2px solid #b6c7bb;
	outline-offset: 1px;
}

.defect-thumbs[hidden] {
	display: none;
}

.defect-thumbs {
	flex: 0 0 auto;
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
	margin-top: 10px;
	max-height: 88px;
	overflow: auto;
}

.defect-thumb {
	aspect-ratio: 4 / 3;
	background: #fff;
	border: 2px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	overflow: hidden;
	padding: 0;
}

.defect-thumb[aria-current="true"] {
	border-color: #b46a1f;
}

.defect-thumb img {
	display: block;
	height: 100%;
	margin: 0;
	object-fit: cover;
	width: 100%;
}

.defect-definition {
	background: #f7f8f4;
	border: 1px solid #dce3de;
	border-radius: 7px;
	overflow: auto;
	padding: 15px;
}

.defect-definition h2 {
	color: #203729;
	font-size: 18px;
	line-height: 1.2;
	margin: 0 0 8px;
}

.defect-definition p {
	color: #374840;
	font-size: 15px;
	line-height: 1.52;
	margin: 0;
}

.defect-image-caption {
	color: #596960;
	font-size: 13px;
	line-height: 1.35;
	margin: 0;
}

.defect-image-caption {
	margin-top: 8px;
}

.defect-empty {
	background: #fff;
	border: 1px solid #d9e1dc;
	border-radius: 8px;
	color: #526058;
	display: none;
	padding: 24px;
	text-align: center;
}

.defect-empty.is-visible {
	display: block;
}

@media (max-width: 860px) {
	.defect-gallery-header-actions {
		justify-content: flex-start;
		margin-top: 16px;
	}

	.defect-gallery-bar {
		display: block;
	}

	.defect-gallery-tools,
	.defect-focus-layout {
		grid-template-columns: 1fr;
	}

	.defect-focus-header {
		align-items: stretch;
		flex-direction: column;
	}

	.defect-modal-header-actions,
	.defect-modal-nav {
		width: 100%;
	}

	.defect-modal .defect-jump-select {
		flex: 1 1 auto;
		min-width: 0;
		width: 100%;
	}

	.defect-focus-title {
		font-size: 22px;
	}

	.defect-gallery-app h1 {
		font-size: 25px;
	}

	.defect-gallery-bar,
	.defect-gallery-tools,
	.defect-modal-panel {
		padding: 13px;
	}

	.defect-gallery-buckets {
		justify-content: flex-start;
	}

	.defect-gallery-shell {
		padding-top: 28px;
	}
}

@media (max-width: 560px) {
	.defect-gallery-header-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.defect-gallery-header-actions > a {
		justify-content: center;
	}

	.defect-gallery-return {
		order: -1;
	}

	.defect-gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}

	.defect-gallery-shell .wrap {
		width: calc(100% - 22px);
	}

	.defect-gallery-bucket {
		flex: 1 1 auto;
		justify-content: center;
	}

	.defect-image-stage {
		aspect-ratio: auto;
	}

	.defect-modal {
		padding: 10px;
	}

	.defect-modal-panel {
		height: calc(100vh - 20px);
		height: calc(100dvh - 20px);
	}

	.defect-viewer-controls {
		align-items: flex-start;
		display: block;
	}

	.defect-image-actions {
		margin-top: 10px;
	}

	.defect-zoom-control {
		min-width: 0;
		width: 100%;
	}

	.defect-zoom-control input {
		flex: 1 1 auto;
		width: auto;
	}
}
