/**
 * Admin slideshow styles for Voting Controls page.
 */

#photo-comp-slideshow-modal {
	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);
	animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.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);
}

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

.slideshow-controls-overlay {
	position: absolute;
	bottom: 20px;
	right: 20px;
	display: flex;
	gap: 0.75rem;
}

.slideshow-controls-overlay .button {
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.3);
	text-shadow: none;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
	font-size: 1.1rem;
	padding: 0.75rem 1.5rem;
}

.slideshow-controls-overlay .button:hover {
	background: rgba(0, 0, 0, 0.9);
	border-color: #fff;
	color: #fff;
}

.slideshow-controls-overlay .button-primary {
	background: #2271b1;
	border-color: #2271b1;
}

.slideshow-controls-overlay .button-primary:hover {
	background: #135e96;
	border-color: #135e96;
}

.photo-comp-qr-card {
	display: flex;
	align-items: center;
	gap: 24px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	padding: 24px;
	max-width: 1100px;
	margin-top: 20px;
}

.photo-comp-qr-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 560px;
	aspect-ratio: 1 / 1;
}

.photo-comp-qr-canvas canvas,
.photo-comp-qr-canvas img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.photo-comp-qr-details h2 {
	margin-top: 0;
	margin-bottom: 8px;
}

.photo-comp-qr-details p {
	margin: 0 0 8px;
}

.photo-comp-qr-details a {
	word-break: break-all;
}

/* ==========================================================================
   VOTING CONTROLS PAGE - REDESIGNED LAYOUT
   ========================================================================== */

.photo-comp-voting-controls {
	max-width: 960px;
}

/* ==========================================================================
   Competition Status Bar
   ========================================================================== */

.competition-status-bar {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 20px 24px;
	margin: 20px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
}

.status-bar-title {
	flex: 1;
	min-width: 200px;
}

.status-bar-title h2 {
	margin: 0;
	font-size: 1.3em;
	color: #1d2327;
}

.status-bar-controls {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
}

.status-control {
	display: flex;
	align-items: center;
	gap: 10px;
}

.status-control-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #646970;
}

.status-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
}

.status-pill .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.status-pill-success {
	background: #d4edda;
	color: #155724;
}

.status-pill-warning {
	background: #fff3cd;
	color: #856404;
}

.status-bar-warning {
	flex-basis: 100%;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 12px;
	background: #fff8e5;
	border: 1px solid #f0c33c;
	border-radius: 4px;
	font-size: 13px;
	color: #856404;
	margin-top: 4px;
}

.status-bar-warning .dashicons {
	color: #dba617;
}

/* ==========================================================================
   Category Tabs Bar
   ========================================================================== */

.category-tabs-bar {
	display: flex;
	gap: 8px;
	margin: 0 0 16px 0;
	flex-wrap: wrap;
}

.category-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	text-decoration: none;
	color: #50575e;
	font-size: 13px;
	font-weight: 500;
	transition: all 0.15s ease;
	position: relative;
}

.category-tab:hover {
	background: #fff;
	border-color: #2271b1;
	color: #2271b1;
}

.category-tab.active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.category-tab.is-voted .tab-check {
	color: #00a32a;
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.category-tab.active.is-voted .tab-check {
	color: #90ee90;
}

.category-tab .tab-count {
	background: rgba(0, 0, 0, 0.1);
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
}

.category-tab.active .tab-count {
	background: rgba(255, 255, 255, 0.2);
}

.category-tab .tab-voting-indicator {
	width: 8px;
	height: 8px;
	background: #00a32a;
	border-radius: 50%;
	animation: pulse 1.5s infinite;
}

.category-tab.active .tab-voting-indicator {
	background: #90ee90;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

/* ==========================================================================
   Category Control Panel
   ========================================================================== */

.category-control-panel {
	background: linear-gradient(135deg, #f0f6fc 0%, #fff 100%);
	border: 2px solid #2271b1;
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 16px;
	box-shadow: 0 2px 8px rgba(34, 113, 177, 0.15);
}

.control-panel-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid #dcdcde;
}

.control-panel-title h3 {
	margin: 0 0 4px 0;
	font-size: 1.4em;
	color: #1d2327;
}

.control-panel-meta {
	color: #646970;
	font-size: 13px;
}

.control-panel-status {
	flex-shrink: 0;
}

.status-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
}

.status-badge .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.status-badge-voting {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.status-badge-ready {
	background: #e7f3ff;
	color: #0a4b78;
	border: 1px solid #b8daff;
}

.status-badge-setup {
	background: #fff3cd;
	color: #856404;
	border: 1px solid #ffeeba;
}

.control-panel-body {
	display: flex;
	gap: 32px;
	flex-wrap: wrap;
}

.control-section {
	flex: 1;
	min-width: 280px;
}

.section-header {
	margin-bottom: 12px;
}

.section-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #646970;
}

.section-content {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.duration-presets {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.duration-presets .button {
	padding: 6px 12px;
	min-width: auto;
	font-size: 12px;
}

.duration-presets .button.active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.slideshow-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.slideshow-buttons .button .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	line-height: 18px;
	position: relative;
	top: 4px;
	margin-right: 4px;
}

.voting-button .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	line-height: 18px;
	position: relative;
	top: 11px;
	margin-right: 4px;
}

.voting-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
}

.voting-section .section-header {
	text-align: center;
}

.voting-section .section-content {
	display: flex;
	align-items: center;
	justify-content: center;
}

.voting-button.button-hero {
	padding: 16px 40px;
	font-size: 16px;
	font-weight: 600;
	height: auto;
	border-radius: 6px;
	border-width: 2px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.2s ease;
}

.voting-button.button-hero:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.voting-button.button-hero:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.voting-button.voting-close {
	background: #d63638;
	border-color: #b32d2e;
	color: #fff;
}

.voting-button.voting-close:hover {
	background: #b32d2e;
	border-color: #8a2324;
}

.voting-button.voting-open {
	background: #00a32a;
	border-color: #008a20;
}

.voting-button.voting-open:hover {
	background: #008a20;
	border-color: #006818;
}

.control-panel-hint {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 20px 0 0 0;
	padding: 12px 16px;
	background: #f6f7f7;
	border-radius: 4px;
	font-size: 13px;
	color: #646970;
}

.control-panel-hint .dashicons {
	flex-shrink: 0;
}

.control-panel-hint .dashicons-info {
	color: #2271b1;
}

.control-panel-hint .dashicons-warning {
	color: #dba617;
}

.control-panel-hint:has(.dashicons-warning) {
	background: #fff8e5;
	border: 1px solid #f0c33c;
}

/* ==========================================================================
   Quick Actions Bar
   ========================================================================== */

.quick-actions-bar {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	margin-bottom: 20px;
}

.quick-actions-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 12px 16px;
	background: transparent;
	border: none;
	font-size: 13px;
	font-weight: 600;
	color: #50575e;
	cursor: pointer;
	text-align: left;
}

.quick-actions-toggle:hover {
	color: #2271b1;
}

.quick-actions-toggle .dashicons {
	transition: transform 0.2s ease;
}

.quick-actions-toggle[aria-expanded="true"] .dashicons {
	transform: rotate(90deg);
}

.quick-actions-content {
	padding: 16px;
	border-top: 1px solid #dcdcde;
}

.quick-actions-buttons {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.quick-actions-buttons .button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	position: relative;
	top: 3px;
	margin-right: 4px;
}

.qr-code-panel {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #dcdcde;
}

.qr-code-container {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.qr-code-canvas {
	width: 600px;
	height: 600px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.qr-code-canvas canvas,
.qr-code-canvas img {
	width: 100% !important;
	height: 100% !important;
}

.qr-code-password {
	text-align: center;
	padding: 16px 20px;
	margin-bottom: 16px;
	background: #f0f6fc;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
}

.qr-code-password-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}

.qr-code-password-value {
	display: block;
	font-size: 48px;
	font-weight: 700;
	color: #1d2327;
	letter-spacing: 2px;
}

.qr-code-details h4 {
	margin: 0 0 8px 0;
	font-size: 14px;
}

.qr-code-details p {
	margin: 0 0 12px 0;
}

.qr-code-details a {
	word-break: break-all;
}

.copy-url-btn .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	position: relative;
	top: 2px;
	margin-right: 4px;
}

/* ==========================================================================
   Competition Complete Panel
   ========================================================================== */

.competition-complete-panel {
	background: linear-gradient(135deg, #d4edda 0%, #fff 100%);
	border: 2px solid #00a32a;
	border-radius: 8px;
	padding: 32px;
	margin-bottom: 16px;
	text-align: center;
}

.complete-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 24px;
}

.complete-header .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #00a32a;
}

.complete-header h2 {
	margin: 0;
	font-size: 1.6em;
	color: #155724;
}

.complete-body {
	max-width: 680px;
	margin: 0 auto;
}

.complete-competition {
	font-size: 1.2em;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 16px;
}

.complete-categories {
	list-style: none;
	padding: 0;
	margin: 0 0 24px 0;
	text-align: left;
}

.complete-category-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 4px;
	margin-bottom: 4px;
}

.complete-category-item .dashicons {
	color: #00a32a;
}

.complete-category-item .category-count {
	color: #646970;
	font-size: 12px;
}

.complete-category-item .category-slideshow-actions {
	margin-left: auto;
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.complete-category-item .category-slideshow-actions .button .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	line-height: 14px;
	position: relative;
	top: 2px;
	margin-right: 2px;
}

.complete-slideshow-section {
	margin-bottom: 16px;
	display: flex;
	justify-content: center;
}

.complete-actions {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center;
}

.results-status {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}

.results-label {
	font-weight: 600;
	color: #646970;
}

.results-links {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}

.results-links .button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	position: relative;
	top: 3px;
	margin-right: 4px;
}

/* ==========================================================================
   Legacy styles retained for backward compatibility
   ========================================================================== */

/* Focus Panel for Competition Night Workflow - DEPRECATED, kept for reference */
.photo-comp-focus-panel {
	background: linear-gradient(135deg, #f0f6fc 0%, #fff 100%);
	border: 2px solid #2271b1;
	border-radius: 8px;
	padding: 24px;
	margin: 20px 0;
	max-width: 900px;
	box-shadow: 0 2px 8px rgba(34, 113, 177, 0.15);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
	.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;
	}

	.slideshow-controls-overlay {
		flex-direction: column;
		bottom: 10px;
		right: 10px;
	}

	.slideshow-controls-overlay .button {
		font-size: 0.95rem;
		padding: 0.5rem 1rem;
	}

	.photo-comp-qr-card {
		flex-direction: column;
		align-items: flex-start;
	}

	.photo-comp-qr-image {
		max-width: 440px;
	}

	.focus-panel-header {
		flex-direction: column;
		gap: 12px;
	}

	.focus-panel-controls {
		flex-direction: column;
		gap: 16px;
	}

	.control-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.duration-presets {
		margin-right: 0;
		margin-bottom: 8px;
	}
}
