/*  cBB Attachments StyleSheet
    --------------------------------------------------------------
	Style:	All
	Copyright (c) 2024 CaniDev ( https://www.canidev.com )
    --------------------------------------------------------------
*/

.attachbox dd:has(.attachment-preview.bordered):not(:first-of-type) {
	border-top: none;
}

.attachment-preview,
.attachment-preview * {
	box-sizing: border-box;
}

.attachment-preview {
	border-radius: 5px;
	min-width: 300px;
	padding: 6px;
}

.attachment-preview.bordered {
	border: 1px solid #e7e7e7;
}

.inline-attachment .attachment-preview {
	font-size: 0.8em;
}

.inline-attachment .attachment-preview.bordered {
	background-color: #fff;
}

.attachment-preview .file-info {
	align-items: center;
	border-radius: 5px;
	display: flex;
	font-size: 12px;
	gap: 10px;
	padding: 4px 8px;
	text-align: initial;
}

.attachment-preview .file-info:not(:last-child) {
	margin-bottom: 5px;
}

.attachment-preview .picture {
    border-radius: 4px;
	overflow: hidden;
	height: 60px;
	width: 60px;
}

.attachment-preview .picture.iconic {
	align-items: center;
	display: flex;
	justify-content: center;
}

.attachment-preview .picture img {
	height: auto;
	width: 100%;
}

.attachment-preview .picture.iconic img {
    height: 50px;
	width: auto;
}

.attachment-preview .id3-tags {
	flex: auto;
}

.attachment-preview .id3-title {
	font-weight: bold;
}

.attachment-preview .id3-info {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 5px;
}

.attachment-preview .id3-info span {
	display: inline-block;
	white-space: nowrap;
}

.attachment-preview .id3-info .fa {
	font-size: 1.2em;
}

.attachment-preview .download-button {
	font-size: 20px;
	padding-left: 15px;
}

.attachment-preview audio {
	height: 45px;
	width: 100%;
}

.attachment-preview video {
	height: auto;
	max-width: 100%;
}

.attachment-preview embed,
.attachment-preview iframe {
	height: 400px;
	width: 100%;
}

/* Style overwrite
--------------------------------- */
.attachbox:has(embed) {
	width: auto;
}

dl.attachbox:has(embed) {
    width: 100%;
}

.inline-attachment {
	margin: 5px 0;
}

/* Dark theme
--------------------------------- */
.dark-theme  .attachment-preview.bordered {
	border-color: #444;
}

.dark-theme .inline-attachment .attachment-preview.bordered {
	background-color: #252525;
}

/* Responsive
--------------------------------- */
@media screen and (max-width: 375px) {
	.attachment-preview .file-info {
		flex-direction: column;
	}
}
    