.ct-attachment {
	position: relative;

	.thumbnail {
		display: flex;
		flex-direction: column;
		align-items: center;
		position: relative;
		cursor: pointer;

		img {
			border-radius: 3px;
			max-width: 100%;
		}
	}

	&:not([data-type="no-frame"]) .thumbnail {
		padding: 8px;
		border-radius: 3px;
		border: 1px dashed #c1c4ca;
	}

	.upload-button {
		width: 100%;
		padding: 5px 0;
		border-radius: 3px;
		box-shadow: none;
		background: rgba(0, 0, 0, 0.02);
		border: 1px dashed #c1c4ca;

		&:hover {
			background: #fbfbfc;
		}

		&:active {
			transform: none;
		}
	}

	.actions {
		position: absolute;
		top: var(--actions-spacing, 18px);
		right: var(--actions-spacing, 18px);
		overflow: hidden;
		border-radius: 3px;
		background: #fff;
		opacity: 0;
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);

		button {
			width: 34px;
			height: 29px;
			line-height: 29px;
			min-height: initial;
			padding: 0;
			border: none;
			border-radius: 0;
			background: transparent;

			&:hover {
				color: #fff;
				background: var(--accentColor);
			}
			
			&:last-child {
				border-left: 1px solid rgba(0, 0, 0, 0.1);
			}

			&:before {
				font-family: 'dashicons';
				font-size: 15px;
			}
		}

		.edit-button {
			&:before {
				content: "\f464";
			}
		}

		.remove-button {
			&:before {
				content: "\f335";
			}
		}
	}

	&:hover .actions {
		opacity: 1;
	}

	&[data-type="small"],
	&[data-type="no-frame"] {
		--actions-spacing: 10px;
	}

	// small height
	&[data-type="small"] {
		.thumbnail {
			justify-content: center;
			
			img {
				min-height: 32px;
				max-height: 100px;
			}
		}
	}
}
