/* =============================================================================
 *  extra.css — tematizarea PhotoSwipe 5 (light/dark) + caption mereu vizibil (Task 5c, 2026-06-21).
 *
 *  PhotoSwipe expune variabile CSS pe .pswp; le legam de paleta site-ului (css/theme.css,
 *  data-theme pe <html>) ca lightbox-ul sa urmeze tema light/dark a paginii — nu un negru fix.
 * ========================================================================== */

.pswp {
	/* Fundal = fundalul paginii (off-white cald pe light, near-black pe dark). */
	--pswp-bg: var(--bg-primary, #100f0d);
	--pswp-placeholder-bg: var(--bg-secondary, #1a1815);
	/* Iconite (close, zoom, sageti, counter): accent bronz/auriu, vizibil pe ambele teme. */
	--pswp-icon-color: var(--accent, #c9a978);
	--pswp-icon-color-secondary: var(--bg-primary, #100f0d);
	--pswp-error-text-color: var(--text-primary, #c9c4bb);
}

/* Bara de sus (counter + butoane) sa nu fie estompata: o tinem lizibila pe ambele teme. */
.pswp__top-bar { background: linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,0)); }
[data-theme="light"] .pswp__top-bar { background: linear-gradient(to bottom, rgba(0,0,0,.06), rgba(0,0,0,0)); }

/* Pe tema LIGHT scoatem conturul inchis (#4f4f4f, default PS5) din jurul iconitelor
   (sagetile stanga/dreapta + butonul X): pe fundal deschis arata ca un border negru —
   mai curat/minimalist fara el. Pe dark il pastram (da definitie iconitelor peste poze). */
[data-theme="light"] .pswp { --pswp-icon-stroke-width: 0; }
.pswp__counter { color: var(--text-primary, #c9c4bb); text-shadow: none; }

/* -------- Caption MEREU VIZIBIL (descriere + ©), centrat jos -------- */
/* Element custom injectat din galerie-ps5.js (registerElement name:'custom-caption'). */
.pswp__custom-caption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
	text-align: center;
	font: 13px/1.4 Arial, Helvetica, sans-serif;
	color: var(--text-primary, #c9c4bb);
	background: color-mix(in srgb, var(--bg-secondary, #1a1815) 82%, transparent);
	pointer-events: none; /* nu blocheaza swipe-ul pe poza */
	z-index: 10;
}
.pswp__custom-caption:empty { display: none; } /* fara descriere -> nimic */

/* Browsere fara color-mix: fallback simplu (overlay semi-transparent). */
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
	.pswp__custom-caption { background: rgba(0,0,0,.55); color: #f2efe9; }
}
