/* Fotowettbewerb Plugin - Jury-Oberflaeche
   Alle Selektoren im Namespace .pc- , keine globalen Theme-Styles ueberschreiben. */

.pc-jury-app {
	max-width: 1100px;
	margin: 0 auto;
}

.pc-jury-identity {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	color: #16406e;
	background: #eaf1fb;
	border: 1px solid #c7dafc;
	border-radius: 999px;
	padding: 0.3rem 0.9rem;
	margin: 0 0 0.75rem;
}

.pc-jury-intro {
	font-size: 1.05rem;
}

.pc-jury-counter {
	position: sticky;
	top: 0;
	z-index: 5;
	background: #1e6fd9;
	color: #fff;
	padding: 0.6rem 1rem;
	border-radius: 6px;
	font-weight: 600;
	margin-bottom: 1rem;
	text-align: center;
}

.pc-jury-search-label {
	font-weight: 600;
	display: block;
	margin-bottom: 0.3rem;
}

.pc-jury-search {
	width: 100%;
	max-width: 320px;
	min-height: 44px;
	padding: 0.5rem 0.7rem;
	border: 1px solid #8c8c8c;
	border-radius: 4px;
	margin-bottom: 1.25rem;
	box-sizing: border-box;
}

.pc-jury-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) );
	gap: 1.1rem;
	margin-bottom: 1.5rem;
}

.pc-jury-card {
	border: 2px solid #d5d5d5;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
}

.pc-jury-card.is-selected {
	border-color: #1e6fd9;
	box-shadow: 0 0 0 3px rgba( 30, 111, 217, 0.25 );
}

.pc-jury-card__image-wrap {
	position: relative;
}

.pc-jury-card img {
	width: 100%;
	height: 170px;
	object-fit: cover;
	display: block;
	cursor: zoom-in;
}

.pc-jury-card__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #1e6fd9;
	color: #fff;
	border-radius: 999px;
	padding: 0.15rem 0.6rem;
	font-size: 0.8rem;
	font-weight: 700;
}

.pc-jury-card__badge::before {
	content: "✓ ";
}

.pc-jury-card__body {
	padding: 0.7rem 0.8rem 0.9rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex-grow: 1;
}

.pc-jury-card__title {
	font-size: 0.95rem;
	margin: 0;
	min-height: 1.2em;
}

.pc-jury-card__uid {
	font-size: 0.75rem;
	color: #666;
	margin: 0;
}

.pc-jury-card__select-btn {
	margin-top: auto;
	min-height: 44px;
	border: 2px solid #1e6fd9;
	background: #fff;
	color: #1e6fd9;
	border-radius: 4px;
	font-weight: 600;
	cursor: pointer;
}

.pc-jury-card.is-selected .pc-jury-card__select-btn {
	background: #1e6fd9;
	color: #fff;
}

.pc-jury-card__select-btn:focus,
.pc-jury-search:focus,
.pc-button:focus {
	outline: 3px solid #1e6fd9;
	outline-offset: 2px;
}

.pc-jury-actions {
	text-align: center;
	margin-bottom: 2rem;
}

.pc-jury-modal,
.pc-jury-lightbox {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.6 );
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 1rem;
}

/*
 * Ohne diese Regel gewinnt ".pc-jury-modal { display: flex }" gegen die
 * Browser-Standardregel "[hidden] { display: none }" (beide Selektoren haben
 * dieselbe Spezifitaet 0-1-0-0, und bei Gleichstand setzt sich Autoren-CSS
 * gegen User-Agent-CSS durch). Dadurch war der Dialog IMMER sichtbar, auch
 * wenn JavaScript das hidden-Attribut gesetzt hatte. Diese Regel hat durch
 * das zusaetzliche Attribut-Selektor eine hoehere Spezifitaet (0-2-0-0) und
 * stellt das erwartete Verhalten wieder her.
 */
.pc-jury-modal[hidden],
.pc-jury-lightbox[hidden] {
	display: none;
}

.pc-jury-modal__content {
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem;
	max-width: 480px;
	width: 100%;
}

.pc-jury-modal__list {
	padding-left: 1.2rem;
}

.pc-jury-modal__actions {
	display: flex;
	gap: 0.75rem;
	justify-content: flex-end;
	margin-top: 1.25rem;
}

.pc-jury-lightbox img {
	max-width: 90vw;
	max-height: 85vh;
	object-fit: contain;
}

.pc-jury-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	min-height: 44px;
	min-width: 44px;
	background: #fff;
	border: none;
	border-radius: 4px;
	font-weight: 700;
	cursor: pointer;
}

@media ( max-width: 480px ) {
	.pc-jury-grid {
		grid-template-columns: repeat( auto-fill, minmax( 150px, 1fr ) );
	}
	.pc-jury-card img {
		height: 130px;
	}
}
