html.wsb-attachment-preview-open,
body.wsb-attachment-preview-open {
	overflow-y: hidden !important;
}

.wsb-attachment-preview-modal,
.wsb-attachment-preview-modal *,
.wsb-attachment-preview-modal *::before,
.wsb-attachment-preview-modal *::after {
	box-sizing: border-box;
}

.wsb-update-attachments > ul > li {
	display: block;
	min-width: 0;
	overflow: hidden;
	border: 1px solid #d4e2dc;
	border-radius: 10px;
	background: #fff;
}

.wsb-update-attachments > ul > li:focus-within {
	border-color: #0f6b52;
	box-shadow: 0 0 0 2px rgba(15, 107, 82, .1);
}

.wsb-attachment-primary {
	display: grid;
	grid-template-columns: 50px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-width: 0;
	min-height: 64px;
	margin: 0;
	padding: 7px;
	border: 0;
	border-radius: 0;
	color: #19332b;
	background: transparent;
	box-shadow: none;
	font: inherit;
	text-align: left;
}

button.wsb-attachment-primary {
	cursor: zoom-in;
}

button.wsb-attachment-primary:hover,
button.wsb-attachment-primary:focus-visible {
	color: #0f6b52;
	background: #f4faf7;
	outline: 0;
}

.wsb-attachment-primary img,
.wsb-attachment-primary .wsb-attachment-type {
	grid-column: 1;
	width: 50px;
	max-width: 50px;
	height: 50px;
	margin: 0;
	border-radius: 7px;
}

.wsb-attachment-primary img {
	display: block;
	object-fit: cover;
}

.wsb-attachment-primary .wsb-attachment-copy {
	grid-column: 2;
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.wsb-attachment-action-label {
	grid-column: 3;
	justify-self: end;
	padding: 4px 7px;
	border-radius: 999px;
	color: #0f6b52;
	background: #e7f4ef;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
}

.wsb-update-attachments > ul > li > .wsb-attachment-download {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 7px 10px;
	border: 0;
	border-top: 1px solid #e1ebe7;
	border-radius: 0;
	color: #0f6b52;
	background: #f8fbfa;
	box-shadow: none;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
}

.wsb-update-attachments > ul > li > .wsb-attachment-download:hover,
.wsb-update-attachments > ul > li > .wsb-attachment-download:focus-visible {
	color: #094c3b;
	background: #edf7f3;
	outline: 2px solid rgba(15, 107, 82, .18);
	outline-offset: -2px;
}

.wsb-attachment-preview-modal[hidden] {
	display: none !important;
}

.wsb-attachment-preview-modal {
	position: fixed;
	z-index: 1000000;
	inset: 0;
	display: grid;
	align-items: center;
	justify-items: center;
	padding: clamp(10px, 2vw, 24px);
	background: rgba(4, 12, 10, .86);
	overscroll-behavior: contain;
	touch-action: none;
}

.wsb-attachment-preview-dialog {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	width: min(1040px, 100%);
	max-height: min(92dvh, 900px);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	touch-action: auto;
}

.wsb-attachment-preview-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	min-width: 0;
	padding: 12px 14px;
	border-bottom: 1px solid #dfe9e5;
	background: #fff;
}

.wsb-attachment-preview-header h2 {
	min-width: 0;
	margin: 0;
	color: #15382d;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.wsb-attachment-preview-close,
.wsb-attachment-preview-download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 9px 14px;
	border: 1px solid #bfd3cb;
	border-radius: 9px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
}

.wsb-attachment-preview-close {
	flex: 0 0 auto;
	color: #193b30;
	background: #f5f9f7;
	cursor: pointer;
}

.wsb-attachment-preview-close:hover,
.wsb-attachment-preview-close:focus-visible {
	background: #e9f3ef;
	outline: 3px solid rgba(15, 107, 82, .2);
	outline-offset: 1px;
}

.wsb-attachment-preview-stage {
	display: grid;
	place-items: center;
	min-width: 0;
	min-height: 220px;
	overflow: auto;
	padding: clamp(8px, 2vw, 20px);
	color: #fff;
	background: #101815;
	overscroll-behavior: contain;
}

.wsb-attachment-preview-stage img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: calc(92dvh - 150px);
	margin: auto;
	object-fit: contain;
}

.wsb-attachment-preview-status {
	margin: 0;
	padding: 20px;
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.wsb-attachment-preview-status:empty {
	display: none;
}

.wsb-attachment-preview-footer {
	display: flex;
	justify-content: flex-end;
	padding: 10px 14px;
	border-top: 1px solid #dfe9e5;
	background: #fff;
}

.wsb-attachment-preview-download {
	color: #fff;
	background: #0f6b52;
}

.wsb-attachment-preview-download:hover,
.wsb-attachment-preview-download:focus-visible {
	color: #fff;
	background: #0b5944;
	outline: 3px solid rgba(15, 107, 82, .24);
	outline-offset: 1px;
}

@media (max-width: 640px) {
	.wsb-attachment-primary {
		display: grid;
		grid-template-columns: 42px minmax(0, 1fr);
		gap: 9px;
		min-height: 56px;
		padding: 6px;
	}

	.wsb-attachment-primary img,
	.wsb-attachment-primary .wsb-attachment-type {
		width: 42px;
		max-width: 42px;
		height: 42px;
	}

	.wsb-attachment-action-label {
		grid-column: 2;
		justify-self: start;
	}

	.wsb-update-attachments > ul > li > .wsb-attachment-download {
		min-height: 44px;
	}

	.wsb-attachment-preview-modal {
		align-items: stretch;
		padding: 8px;
	}

	.wsb-attachment-preview-dialog {
		width: 100%;
		max-height: calc(100dvh - 16px);
		border-radius: 11px;
	}

	.wsb-attachment-preview-header {
		padding: 9px 10px;
	}

	.wsb-attachment-preview-header h2 {
		font-size: 14px;
	}

	.wsb-attachment-preview-stage {
		min-height: 0;
		padding: 8px;
	}

	.wsb-attachment-preview-stage img {
		max-height: calc(100dvh - 148px);
	}

	.wsb-attachment-preview-footer {
		padding: 8px 10px;
	}

	.wsb-attachment-preview-download {
		width: 100%;
	}
}
