/*  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;
	}
}
    

/* SpiderPiggy theme
--------------------------------- */
.attachment-preview.bordered,
.dark-theme .attachment-preview.bordered {
	border-color: #7d3159;
	background-color: #1b2028;
	box-shadow: 0 0 0 1px rgba(232, 72, 145, 0.08);
}

.inline-attachment .attachment-preview.bordered,
.dark-theme .inline-attachment .attachment-preview.bordered {
	background-color: #1b2028;
}

.attachment-preview .file-info,
.dark-theme .attachment-preview .file-info {
	background-color: #20252d;
	color: #d7dbe2;
}

.attachment-preview .picture.iconic {
	background-color: #241d24;
	border: 1px solid #64304d;
}

.attachment-preview .id3-title,
.attachment-preview .id3-title a {
	color: #f05a9d;
}

.attachment-preview .id3-title a:hover {
	color: #78cfff;
}

.attachment-preview .id3-info {
	color: #adb5c0;
}

.attachment-preview .download-button,
.attachment-preview .download-button a {
	color: #f05a9d;
}

.attachment-preview .download-button a:hover {
	color: #78cfff;
}