.df-container,
._df_book,
.df-element {
	position: relative;
}

/* Photo download — theme burgundy #5d0000 */

.df-photo-fab {
	position: absolute;
	left: 50%;
	bottom: 72px;
	z-index: 99999;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 11px 20px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: linear-gradient(180deg, #7a1010 0%, #5d0000 55%, #450000 100%);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: 0 8px 28px rgba(93, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
	pointer-events: auto;
	white-space: nowrap;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.df-photo-fab:hover,
.df-photo-fab:focus {
	background: linear-gradient(180deg, #921515 0%, #6d0000 55%, #520000 100%);
	transform: translateX(-50%) translateY(-1px);
	box-shadow: 0 10px 32px rgba(93, 0, 0, 0.55), 0 3px 10px rgba(0, 0, 0, 0.28);
	outline: 2px solid rgba(255, 255, 255, 0.35);
	outline-offset: 2px;
}

.df-photo-fab-icon {
	font-size: 15px;
	line-height: 1;
	opacity: 0.95;
}

.df-photo-download-panel {
	position: absolute;
	left: 50%;
	bottom: 124px;
	z-index: 99998;
	transform: translateX(-50%);
	width: min(96%, 880px);
	max-height: 190px;
	padding: 12px 14px 14px;
	border-radius: 14px;
	background: linear-gradient(165deg, #3a0808 0%, #2a0505 100%);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
	pointer-events: auto;
	box-sizing: border-box;
}

.df-photo-download-panel--closed {
	display: none;
}

.df-photo-download-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.df-photo-download-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	flex: 1;
}

.df-photo-download-title .fa-images {
	color: #e8b4b4;
	font-size: 14px;
}

.df-photo-panel-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.df-photo-panel-close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.df-photo-download-list {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 10px;
	overflow-x: auto;
	overflow-y: hidden;
	padding-bottom: 2px;
	scrollbar-width: thin;
	scrollbar-color: #5d0000 transparent;
}

.df-photo-page-label {
	flex: 0 0 auto;
	color: #ffe8e8;
	font-size: 11px;
	font-weight: 700;
	padding-right: 4px;
}

.df-photo-item {
	position: relative;
	flex: 0 0 auto;
	width: 96px;
	height: 72px;
	border-radius: 10px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.35);
	border: 2px solid rgba(255, 255, 255, 0.18);
	cursor: pointer;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.df-photo-thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.df-photo-download-btn {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 5px 0;
	background: rgba(93, 0, 0, 0.92);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	text-align: center;
	line-height: 1.2;
}

.df-photo-item:hover {
	border-color: rgba(255, 220, 220, 0.65);
	transform: translateY(-1px);
}

.df-photo-loading,
.df-photo-empty {
	color: #ffe8e8;
	font-size: 12px;
	line-height: 1.45;
	padding: 8px 4px;
	white-space: normal;
}

@media (max-width: 767px) {
	.df-photo-fab {
		bottom: 64px;
		padding: 9px 14px;
		font-size: 12px;
		max-width: 92vw;
		white-space: normal;
		text-align: center;
	}

	.df-photo-fab-text {
		max-width: 200px;
	}

	.df-photo-download-panel {
		bottom: 112px;
		max-height: 155px;
	}

	.df-photo-item {
		width: 76px;
		height: 58px;
	}
}
