/* Images Upload: "Add image" button under editor textarea */

.uploadingimages-under-textarea {
	clear: both;
	display: block;
	width: 100%;
	margin-top: 8px;
	box-sizing: border-box;
}

/* Quick Reply + qrabbct: textarea and smilies are floated — force block below both columns */
#qr_postform .uploadingimages-under-textarea {
	clear: both;
	width: 100%;
}

.uploadingimages-hint {
	margin: 0 0 6px 0;
	font-size: 0.95em;
	color: #666;
}

.uploadingimages-preview-title {
	margin: 0 0 6px 0;
	font-weight: 700;
}

.uploadingimages-uploads {
	border: 1px solid #3e6378;
    width: max-content;
    padding: 5px;
    border-radius: 5px;
}

.uploadingimages-uploads-title {
	border-radius: 3px;
    margin: 0px 0px 8px 0px;
    font-weight: 700;
    color: #a52a2a;
    margin-top: -14px;
    border: 1px solid #3e6378;
    background-color: #ECF1F3;
    padding: 0px 3px 2px 3px;
    width: max-content;
}

.uploadingimages-uploads-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 8px 0;
}

.uploadingimages-upload-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.uploadingimages-upload-name {
	flex: 0 1 auto;
	max-width: 260px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #333;
	font-size: 11px;
	font-weight: 600;
}

.uploadingimages-progress {
	flex: 0 0 auto;
	height: 12px;
	width: 100px;
	background: #eee;
	border: 1px solid #c7c3bf;
	border-radius: 3px;
	overflow: hidden;
}

.uploadingimages-progress > span {
	display: block;
	height: 100%;
	width: 0%;
	background: #2c9948;
	transition: width 120ms linear;
}

.uploadingimages-preview-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 8px 0;
}

.uploadingimages-thumb {
	position: relative;
	width: var(--uploadingimages-thumb-size, 64px);
	height: var(--uploadingimages-thumb-size, 64px);
	border: 1px solid #c7c3bf;
	border-radius: 3px;
	overflow: hidden;
	background: #fff;
}

.uploadingimages-thumb-link {
	display: block;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

.uploadingimages-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.uploadingimages-thumb .uploadingimages-del {
	position: absolute;
	top: 2px;
	right: 2px;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	line-height: 1;
}

.uploadingimages-thumb .uploadingimages-del i {
	color: #9b2d30;
	font-size: 18px;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 50%;
}

.uploadingimages-thumb .uploadingimages-del:focus,
.uploadingimages-thumb .uploadingimages-del:focus-visible {
	outline: none;
}

.uploadingimages-add-image {
	color: #105289;
    border-radius: 3px;
    border: 1px solid #C7C3BF;
    display: inline-block;
    cursor: pointer;
    font-size: .959em;
    padding: 0.2em 0.45em;
    text-decoration: none;
    font-weight: 600;
    border-color: #C7C3BF;
    background-color: #E9E9E9;
    background-image: linear-gradient(to bottom, #FFFFFF 0%, #E9E9E9 100%);
    box-shadow: 0 0 0 1px #FFFFFF inset;
    
}

.uploadingimages-add-image:hover {
	color: #817f7d;
    border-radius: 3px;
    display: inline-block;
    cursor: pointer;
    font-size: .959em;
    padding: 0.2em 0.45em;
    text-decoration: none;
    font-weight: 600;
    border-color: #105289;
    background-color: #E9E9E9;
    background-image: linear-gradient(to bottom, #FFFFFF 0%, #E9E9E9 100%);
    box-shadow: 0 0 0 1px #FFFFFF inset;
   
}

.uploadingimages-add-image:focus {
	outline: none;
	border: none;
	box-shadow: none;
}

.uploadingimages-add-image.is-loading {
	opacity: 0.7;
	cursor: wait;
}

.uploadingimages-add-image.is-loading .uploadingimages-btn-label::after {
	content: '';
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-left: 6px;
	border: 2px solid rgba(0, 0, 0, 0.25);
	border-top-color: rgba(0, 0, 0, 0.65);
	border-radius: 50%;
	animation: uploadingimages-spin 0.7s linear infinite;
	vertical-align: -1px;
}

@keyframes uploadingimages-spin {
	to { transform: rotate(360deg); }
}

.uploadingimages-status {
	margin-top: 6px;
	font-size: 0.95em;
}

.uploadingimages-status.is-error {
	color: #bc2a4d;
}

.uploadingimages-status.is-success {
	color: #228822;
}

/* prosilver: ссылка postlink под кликабельным превью ([url][img][/img]) — без синей полосы */
.postbody .content a.postlink:has(> img),
.postbody a.postlink:has(> img),
#preview .content a.postlink:has(> img) {
	border-bottom: none !important;
	border-bottom-color: transparent !important;
	text-decoration: none !important;
	display: inline-block;
	line-height: 0;
	vertical-align: bottom;
}

/* Lightbox: полное изображение с шахматным фоном (прозрачность PNG/GIF) */
body.uploadingimages-lightbox-open {
	overflow: hidden;
}

.uploadingimages-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.uploadingimages-lightbox[hidden] {
	display: none !important;
}

.uploadingimages-lightbox__backdrop {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(0, 0, 0, 0.72);
	cursor: pointer;
}

.uploadingimages-lightbox__panel {
	position: relative;
	z-index: 1;
	max-width: min(96vw, 1400px);
	max-height: 96vh;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.uploadingimages-lightbox__close {
	position: absolute;
	top: -12px;
	right: -12px;
	z-index: 2;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 1px solid #c7c3bf;
	border-radius: 50%;
	background: #fff;
	color: #333;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.uploadingimages-lightbox__close:hover {
	border-color: #105289;
	color: #105289;
}

.uploadingimages-lightbox__stage {
	overflow: auto;
	max-height: 96vh;
	padding: 10px;
	border-radius: 4px;
	background: transparent;
	box-shadow: none;
}

.uploadingimages-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: calc(96vh - 48px);
	width: auto;
	height: auto;
	margin: 0 auto;
}

.postbody .uploadingimages-plain-gallery-img,
#preview .uploadingimages-plain-gallery-img {
	cursor: pointer;
}

.uploadingimages-lightbox__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	width: 44px;
	height: 56px;
	margin: 0;
	padding: 0;
	border: 1px solid #c7c3bf;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.92);
	color: #105289;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.uploadingimages-lightbox__nav:hover {
	border-color: #105289;
	background: #fff;
}

.uploadingimages-lightbox__nav--prev {
	left: -56px;
}

.uploadingimages-lightbox__nav--next {
	right: -56px;
}

.uploadingimages-lightbox__counter {
	margin-top: 8px;
	text-align: center;
	font-size: 0.95em;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

@media (max-width: 900px) {
	.uploadingimages-lightbox__nav--prev {
		left: 4px;
	}

	.uploadingimages-lightbox__nav--next {
		right: 4px;
	}
}
