.dco-image-attachment {
	line-height: 0;
}

.dco-attachment-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 6px;
}

.dco-attachment-gallery .dco-attachment.dco-image-attachment {
	margin: 0;
}

.comment-form-attachment {
	position: relative;
}

.comment-form-attachment > span:not(.required) {
	display: block;
}

.comment-form-attachment span.comment-form-attachment__drop-area {
	display: none;
}

.comment-form-attachment__input--hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
}

.comment-form-attachment__select {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 8px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 4px;
	background: #fff;
	color: inherit;
	cursor: pointer;
	line-height: 1.2;
}

.comment-form-attachment__select svg {
	display: block;
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.comment-form-attachment__select:hover,
.comment-form-attachment__select:focus {
	border-color: currentColor;
}

.comment-form-attachment.dragenter .comment-form-attachment__drop-area {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 20px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 20px;
}

.comment-form-attachment__drop-area-inner {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;
	padding: 20px;
	border: 2px dashed;
	border-radius: 20px;
}

.comment-form-attachment__preview {
	display: grid;
	gap: 10px;
	margin-top: 10px;
}

.comment-form-attachment__preview[hidden] {
	display: none;
}

.comment-form-attachment__preview-item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	padding: 8px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.02);
	margin-bottom: 10px;
}

.comment-form-attachment__preview-media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 56px;
	overflow: hidden;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.06);
}

.comment-form-attachment__preview-media img,
.comment-form-attachment__preview-media video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.comment-form-attachment__preview-media audio {
	width: 100%;
	max-width: 72px;
}

.comment-form-attachment__preview-icon {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.comment-form-attachment__preview-body {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.comment-form-attachment__preview-name,
.comment-form-attachment__preview-size {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.comment-form-attachment__preview-name {
	font-size: 14px;
	font-weight: 600;
}

.comment-form-attachment__preview-size {
	font-size: 12px;
	opacity: 0.72;
}

.comment-form-attachment__preview-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 7px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 4px;
	background: #fff;
	color: inherit;
	cursor: pointer;
	line-height: 1.2;
}

.comment-form-attachment__preview-remove svg {
	display: block;
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.comment-form-attachment__preview-remove:hover,
.comment-form-attachment__preview-remove:focus {
	border-color: currentColor;
}

@media (max-width: 480px) {
	.comment-form-attachment__preview-item {
		grid-template-columns: 56px minmax(0, 1fr);
	}

	.comment-form-attachment__preview-media {
		width: 56px;
		height: 48px;
	}
}

/* Fix of possible conflicts with theme styles. */
.dco-image-attachment img {
	max-width: 100% !important;
	height: auto !important;
}
