/* OUTDURO calendar photo album with voting (OUT-1344). Inherits the theme's fonts; override the variables to restyle. */
.ocpv {
	--ocpv-accent: #d2a66c; /* OUTDURO gold (brand book). */
	--ocpv-accent-text: #7a5c34; /* Brand "gold text": gold on a light background, AA contrast. */
	--ocpv-border: rgba( 0, 0, 0, 0.14 );
	--ocpv-muted: rgba( 0, 0, 0, 0.6 );
	--ocpv-radius: 8px;
	--ocpv-dark: #111;
	max-width: 1100px;
	margin: 0 auto;
}
.ocpv [hidden] { display: none !important; }
.ocpv h2 { margin: 1.6em 0 0.4em; }
.ocpv-intro { max-width: 760px; margin: 0 0 1.25em; }
.ocpv-when { font-weight: 700; }
/* Countdown to the start (before voting opens) or to the end of voting. */
.ocpv-countdown {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em 0.8em;
	margin: 0.4em 0 0;
}
.ocpv-countdown-label { font-weight: 700; }
.ocpv-countdown-time { display: inline-flex; gap: 0.35em; font-variant-numeric: tabular-nums; }
.ocpv-cd-part {
	display: inline-flex;
	align-items: baseline;
	gap: 0.15em;
	background: #000;
	color: var( --ocpv-accent );
	border-radius: 6px;
	padding: 0.25em 0.5em;
	line-height: 1.2;
}
.ocpv-cd-part b { font-size: 1.15em; }
.ocpv-cd-part small { font-size: 0.78em; opacity: 0.8; }
.ocpv-note { color: var( --ocpv-muted ); font-size: 0.92em; }

/* One photo at a time. */
.ocpv-vote { scroll-margin-top: 90px; }
.ocpv-card { margin: 0; }
.ocpv-frame {
	background: var( --ocpv-dark );
	border-radius: var( --ocpv-radius );
	display: flex;
	align-items: center;
	justify-content: center;
	height: min( 72vh, 760px );
	overflow: hidden;
}
.ocpv-frame img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}
.ocpv-card figcaption {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em 1em;
	justify-content: space-between;
	padding: 0.6em 0.1em 0;
}
.ocpv-credit { font-weight: 700; }
.ocpv-place { color: var( --ocpv-muted ); }
.ocpv-actions {
	display: grid;
	grid-template-columns: auto auto 1fr;
	gap: 0.6em;
	margin: 0.9em 0 0.4em;
}
.ocpv-btn {
	font: inherit;
	font-weight: 700;
	font-size: 1.05em;
	padding: 0.8em 1em;
	border-radius: var( --ocpv-radius );
	border: 2px solid var( --ocpv-dark );
	background: #fff;
	color: var( --ocpv-dark );
	cursor: pointer;
	min-height: 52px;
	transition: background 0.12s, color 0.12s, transform 0.06s;
}
.ocpv-btn:active { transform: scale( 0.98 ); }
.ocpv-btn:focus-visible { outline: 3px solid var( --ocpv-accent ); outline-offset: 2px; }
.ocpv-nav { border-color: var( --ocpv-border ); color: var( --ocpv-muted ); }
.ocpv-btn:disabled { cursor: default; transform: none; }
.ocpv-nav:disabled { opacity: 0.4; }
/* Before voting opens: 👍 is locked (Previous / Next still browse the photos). */
.ocpv.is-upcoming .ocpv-btn[data-vote] { opacity: 0.35; }
.ocpv.is-upcoming .ocpv-mine { color: var( --ocpv-accent-text ); font-weight: 700; }
/* A rated photo: the chosen button stays coloured, the other fades (votes are final). */
.ocpv-actions.is-rated .ocpv-btn[data-vote]:not( [aria-pressed=true] ) { opacity: 0.35; }
.ocpv-up[aria-pressed=true] { background: #1d7a3a; border-color: #1d7a3a; color: #fff; }

.ocpv-progress { text-align: center; margin: 0.3em 0; }
.ocpv-mine { text-align: center; color: var( --ocpv-muted ); margin: 0; min-height: 1.2em; }
/* Every photo rated: the message takes the main photo's place. */
.ocpv-progress.is-done {
	font-size: 1.2em;
	font-weight: 700;
	padding: 1.6em 1em;
	border: 2px solid var( --ocpv-dark );
	border-radius: var( --ocpv-radius );
	margin: 0 0 0.5em;
}
.ocpv.is-done .ocpv-tile { cursor: default; }
.ocpv-msg { text-align: center; color: #b3261e; margin: 0; min-height: 1.2em; }

/* Top 12. */
.ocpv-top-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 240px, 1fr ) );
	gap: 0.75em;
}
.ocpv-top-item button {
	display: grid;
	grid-template-columns: auto 72px 1fr;
	align-items: center;
	gap: 0.6em;
	width: 100%;
	padding: 0.5em;
	border: 1px solid var( --ocpv-border );
	border-radius: var( --ocpv-radius );
	background: #fff;
	color: inherit;
	font: inherit;
	text-align: left;
	text-transform: none; /* The theme uppercases buttons; keep names and @handles as written. */
	letter-spacing: normal;
	font-weight: 400;
	line-height: 1.3;
	height: auto;
	cursor: pointer;
}
.ocpv-top-item button:hover { border-color: var( --ocpv-dark ); }
.ocpv-rank {
	font-weight: 800;
	font-size: 1.2em;
	min-width: 1.6em;
	text-align: center;
	color: var( --ocpv-accent-text );
}
.ocpv-top-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; display: block; }
.ocpv-top-info { display: flex; flex-direction: column; min-width: 0; font-size: 0.92em; line-height: 1.3; }
.ocpv-top-info strong, .ocpv-top-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ocpv-votes { color: var( --ocpv-muted ); }

/* All photos. */
.ocpv-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 150px, 1fr ) );
	gap: 6px;
}
.ocpv-tile {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1;
	padding: 0;
	border: 0;
	border-radius: 4px;
	overflow: hidden;
	background: #eee;
	cursor: pointer;
}
.ocpv-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ocpv-tile.is-current { outline: 3px solid var( --ocpv-accent ); outline-offset: -3px; }
.ocpv-badge {
	position: absolute;
	right: 6px;
	bottom: 6px;
	font-size: 1.1em;
	line-height: 1;
	filter: drop-shadow( 0 1px 2px rgba( 0, 0, 0, 0.6 ) );
}

@media ( max-width: 600px ) {
	.ocpv-frame { height: 62vh; border-radius: 0; margin: 0 -15px; }
	.ocpv-actions { grid-template-columns: 1fr 1fr; }
	.ocpv-up { grid-column: 1 / -1; grid-row: 1; }
	.ocpv-prev { grid-column: 1; grid-row: 2; }
	.ocpv-skip { grid-column: 2; grid-row: 2; }
	.ocpv-grid { grid-template-columns: repeat( 3, 1fr ); gap: 3px; }
}
/* The photo form section (ProductSection) above the voting, while the photo call is open. */
.ocpv .ocp-product-section { max-width: 760px; margin: 0 0 1.5em; }
