/*
	Фотогалерея и загрузка дополнительных изображений к статьям.
	Оформление не меняет гостевые страницы вне галереи и статей.
*/

/* ---------- Гостевая фотогалерея ---------- */

.album-grid,
.photo-grid {
	margin-bottom: 10px;
}

.album-card,
.photo-card {
	margin-bottom: 22px;
}

.album-cover {
	display: block;
	color: inherit;
	text-decoration: none;
}

.album-cover:hover,
.album-cover:focus {
	color: inherit;
	text-decoration: none;
}

.album-cover img {
	display: block;
	width: 100%;
	height: 150px;
	object-fit: cover;
	background: #f2f2f2;
	border: 1px solid #e3e3e3;
	box-sizing: border-box;
}

.album-cover h6 {
	margin: 7px 0 2px;
	font-size: 14px;
	line-height: 1.35;
}

.album-count,
.album-meta {
	color: #666;
	font-size: 12px;
}

.album-cover-empty {
	display: block;
	height: 150px;
	line-height: 150px;
	text-align: center;
	background: #f2f2f2;
	border: 1px solid #e3e3e3;
	color: #888;
}

.photo-open {
	position: relative;
	display: block;
	overflow: hidden;
	background: #f2f2f2;
	line-height: 0;
	cursor: zoom-in;
}

.photo-open img {
	display: block;
	width: 100%;
	height: auto;
}

.photo-zoom {
	position: absolute;
	right: 6px;
	bottom: 6px;
	padding: 3px 7px;
	background: rgba(0, 0, 0, 0.65);
	color: #ffffff;
	font-size: 11px;
	line-height: 1.3;
	border-radius: 3px;
	opacity: 0;
	transition: opacity 0.15s ease;
	pointer-events: none;
}

.photo-open:hover .photo-zoom,
.photo-open:focus .photo-zoom {
	opacity: 1;
}

.photo-caption {
	margin: 6px 0 2px;
	text-align: right;
	font-size: 13px;
	line-height: 1.4;
}

.photo-author {
	margin: 0;
	text-align: right;
	color: #777;
	font-size: 12px;
}

/* ---------- Управление альбомами ---------- */

.album-admin {
	padding-bottom: 20px;
}

.album-help {
	margin: 12px 0 22px;
	padding: 10px 14px;
	background: #f5f9fb;
	border-left: 4px solid #149dcc;
	font-size: 13px;
	line-height: 1.55;
}

.album-help ol {
	margin: 6px 0 0 18px;
	padding: 0;
}

.album-help li {
	margin-bottom: 4px;
}

.album-flash {
	margin-top: 10px;
}

.album-add-form {
	margin-bottom: 24px;
}

.album-add-form input[type="text"] {
	width: 320px;
	max-width: 100%;
}

.album-admin-back {
	margin: 6px 0 12px;
}

.album-admin-card {
	margin-bottom: 24px;
	padding: 10px;
	background: #ffffff;
	border: 1px solid #e3e3e3;
	box-sizing: border-box;
}

.album-admin-cover {
	display: block;
	margin-bottom: 8px;
}

.album-admin-cover img {
	display: block;
	width: 100%;
	height: 150px;
	object-fit: cover;
	background: #f2f2f2;
}

.album-admin-card h4 {
	margin: 0 0 3px;
	font-size: 15px;
	line-height: 1.35;
}

.album-admin-links {
	margin: 8px 0 0;
}

.album-admin-tools {
	margin: 10px 0 18px;
	padding: 12px;
	background: #f7f7f7;
	border: 1px solid #e3e3e3;
}

.album-tool {
	display: inline-block;
	vertical-align: top;
	margin: 0 24px 12px 0;
}

.album-tool label {
	font-size: 12px;
	font-weight: bold;
	display: block;
	margin-bottom: 3px;
}

.album-rename-form input[type="text"] {
	width: 280px;
	max-width: 100%;
	margin-bottom: 6px;
}

.album-delete-form .checkbox {
	margin: 2px 0 8px;
	font-size: 12px;
	font-weight: normal;
}

.album-upload-form {
	margin-bottom: 24px;
	padding: 12px;
	background: #f7f7f7;
	border: 1px solid #e3e3e3;
}

.album-upload-form label {
	font-weight: bold;
	font-size: 12px;
	display: block;
	margin-bottom: 3px;
}

.album-upload-form input[type="text"] {
	width: 100%;
	box-sizing: border-box;
}

.album-upload-form .help-block {
	margin-bottom: 10px;
}

/* ---------- Карточка фотографии в редакторе ---------- */

.photo-admin-card {
	margin-bottom: 20px;
	padding: 10px;
	background: #ffffff;
	border: 1px solid #dddddd;
	box-sizing: border-box;
}

.photo-admin-number {
	margin: 0 0 6px;
	font-weight: bold;
}

.photo-admin-thumb {
	display: block;
	margin-bottom: 8px;
	background: #f2f2f2;
}

.photo-admin-thumb img {
	display: block;
	width: 100%;
	height: 160px;
	object-fit: cover;
}

.photo-order-actions {
	margin: 0 0 8px;
}

.photo-edit-form label {
	display: block;
	margin: 7px 0 2px;
	font-size: 12px;
	font-weight: bold;
}

.photo-edit-form input[type="text"],
.photo-edit-form textarea {
	width: 100%;
	box-sizing: border-box;
}

.photo-edit-form input[type="file"] {
	margin-bottom: 8px;
	max-width: 100%;
}

.photo-delete-form {
	margin-top: 8px;
}

.album-warning {
	color: #b94a48;
	font-size: 12px;
}

/* ---------- Дополнительные изображения статьи ---------- */

/* Большие фото из текста не должны вылезать за колонку статьи. */
.article-body img,
.article-body video {
	max-width: 100%;
	height: auto;
}

.article-extra-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -6px;
}

.article-extra-item {
	width: 33.333%;
	padding: 0 6px 14px;
	box-sizing: border-box;
}

.article-extra-item label {
	display: block;
	margin-bottom: 3px;
	font-size: 12px;
	font-weight: bold;
}

.article-extra-item code {
	font-size: 11px;
	background: #f2f2f2;
	padding: 1px 4px;
}

.article-extra-thumb {
	display: block;
	max-width: 100%;
	max-height: 140px;
	margin: 5px 0;
	border: 1px solid #dddddd;
}

.article-extra-current {
	margin: 4px 0 6px;
	padding: 6px;
	background: #f7f7f7;
	border: 1px solid #e3e3e3;
}

.article-extra-current .checkbox {
	margin: 3px 0 0;
	font-size: 12px;
	font-weight: normal;
}

.article-tag-help {
	margin: 0 0 10px;
	padding: 8px 10px;
	background: #f7f7f7;
	border-left: 3px solid #149dcc;
	font-size: 12px;
	line-height: 1.5;
	color: #555;
}

.article-tag-help code {
	background: #ffffff;
	border: 1px solid #e3e3e3;
	padding: 0 3px;
	color: #333;
}

/* ---------- Узкие экраны и режим для слабовидящих ---------- */

html.bvi-active .article-extra-item {
	width: 100%;
}

html.bvi-active .album-cover img,
html.bvi-active .album-admin-cover img,
html.bvi-active .photo-admin-thumb img {
	height: auto;
}

@media (max-width: 767px) {
	.article-extra-item {
		width: 100%;
	}

	.album-tool {
		display: block;
		margin-right: 0;
	}

	.album-cover img,
	.album-admin-cover img {
		height: auto;
	}

	.photo-admin-thumb img {
		height: auto;
	}
}
