/**
 * Slideshow styles for in-person voting presentations.
 */

.photo-comp-slideshow-container {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 1rem;
}

/* Control Panel */
.slideshow-controls {
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 1.5rem;
	margin-bottom: 1rem;
}

.slideshow-controls h2 {
	margin: 0 0 1rem 0;
	font-size: 1.5rem;
	color: #333;
}

.control-buttons {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

.control-buttons .button {
	padding: 0.5rem 1rem;
	font-size: 1rem;
	cursor: pointer;
}

.control-buttons .button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.slideshow-settings {
	display: grid;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.slideshow-settings label {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-weight: 600;
	color: #555;
}

.slideshow-settings input[type="number"] {
	max-width: 150px;
	padding: 0.5rem;
	font-size: 1rem;
	border: 1px solid #ddd;
	border-radius: 3px;
}

.slideshow-settings small {
	font-weight: normal;
	color: #666;
	font-size: 0.875rem;
}

.slideshow-status {
	border-top: 1px solid #ddd;
	padding-top: 1rem;
}

.slideshow-status p {
	margin: 0.25rem 0;
	font-size: 1rem;
}

.status-message {
	font-weight: 600;
	color: #333;
}

.image-counter {
	color: #666;
}

.image-counter .current-image {
	font-weight: 700;
	color: #0073aa;
}

/* Full-screen Display Area */
.slideshow-display {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: #000;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.slideshow-image-container {
	position: relative;
	width: 100%;
	height: calc(100vh - 40px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	box-sizing: border-box;
}

.slideshow-current-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
	margin: 0 auto;
	box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.slideshow-image-info {
	position: absolute;
	bottom: 20px;
	left: 20px;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-size: 1.5rem;
	font-weight: 700;
	text-align: center;
	backdrop-filter: blur(10px);
}

.slideshow-image-info .image-number {
	display: block;
}

/* Progress Meter - shared container */
.slideshow-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 8px;
	background: rgba(255, 255, 255, 0.2);
}

.slideshow-progress .progress-bar {
	height: 100%;
	background: #0073aa;
	transition: width 100ms linear;
}

/* Progress Meter - Thin Line */
.slideshow-progress.meter-line {
	height: 3px;
	background: rgba(255, 255, 255, 0.1);
}

.slideshow-progress.meter-line .progress-bar {
	background: #fff;
	box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Progress Meter - Dots */
.slideshow-progress.meter-dots {
	height: 20px;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.slideshow-progress.meter-dots .progress-bar {
	display: none;
}

.slideshow-progress.meter-dots .meter-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	transition: background 0.2s ease, transform 0.2s ease;
	flex-shrink: 0;
}

.slideshow-progress.meter-dots .meter-dot.filled {
	background: #0073aa;
	transform: scale(1.4);
}

.slideshow-progress.meter-dots .meter-dot.filling {
	background: rgba(0, 115, 170, 0.5);
	transform: scale(1.2);
}

/* Progress Meter - Radial */
.slideshow-progress.meter-radial {
	width: 100%;
	height: 44px;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
}

.slideshow-progress.meter-radial .progress-bar {
	display: none;
}

.slideshow-progress.meter-radial svg {
	width: 44px;
	height: 44px;
	filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}

.slideshow-progress.meter-radial .meter-ring {
	transition: stroke-dashoffset 100ms linear;
}

.slideshow-exit {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0;
}

.slideshow-exit:hover {
	background: rgba(255, 0, 0, 0.8);
	border-color: #fff;
	transform: scale(1.1);
}

.slideshow-exit .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
	line-height: 32px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
	.slideshow-controls {
		padding: 1rem;
	}

	.slideshow-controls h2 {
		font-size: 1.25rem;
	}

	.control-buttons {
		flex-direction: column;
	}

	.control-buttons .button {
		width: 100%;
	}

	.slideshow-image-info {
		font-size: 1.2rem;
		padding: 0.5rem 1rem;
		bottom: 10px;
		left: 10px;
	}

	.slideshow-exit {
		width: 50px;
		height: 50px;
	}

	.slideshow-exit .dashicons {
		font-size: 24px;
		width: 24px;
		height: 24px;
		line-height: 24px;
	}
}

/* Animation for image transitions */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.slideshow-current-image {
	animation: fadeIn 0.5s ease-in-out;
}

/* Loading state */
.slideshow-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-size: 1.5rem;
}
