/* PhotoTag – společné styly (fáze D, 1.3.0). Bulma zůstává základem, tady jen doplňky místo inline style=. */

/* Menu: jméno v pravé části nezalamovat zbytečně, na mobilu oddělit od položek */
.navbar-brand .navbar-item strong { letter-spacing: .02em; }
@media screen and (max-width: 1023px) {
	.navbar-menu .navbar-end { border-top: 1px solid var(--bulma-border-weak, #ededed); }
}

/* Filtry: <details> – na mobilu sbalené, na počítači je app.js otevře */
.filters > summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
}
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary::after { content: '▾'; transition: transform .15s; }
.filters[open] > summary::after { transform: rotate(180deg); }
.filters[open] > summary { margin-bottom: .75rem; }
.filters .tag-list { max-height: 12rem; overflow-y: auto; }

/* Mapy */
.map { width: 100%; border-radius: 8px; z-index: 0; }
.map--small { height: 240px; }
.map--picker { height: 360px; }
.map--full { height: calc(100vh - 13rem); min-height: 60vh; }
@media screen and (min-width: 1024px) {
	.map--small { height: 420px; }
	.map--picker { height: 420px; }
}
.map-popup { min-width: 200px; max-width: 240px; }
.map-popup img { display: block; width: 100%; height: 120px; object-fit: cover; border-radius: 6px; margin: .5rem 0; }

/* Karty míst: fotka v pevném poměru, aby stránka při načítání neposkakovala */
.location-card { height: 100%; display: flex; flex-direction: column; }
.location-card .card-content { flex-grow: 1; }
.location-card .card-image img, .photo-grid img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	background: var(--bulma-background, #f5f5f5);
}
.location-card .card-image .no-photo {
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--bulma-text-weak, #888);
	background: var(--bulma-background, #f5f5f5);
}
.location-card .title a { color: inherit; }

/* Detail a úprava: mřížka fotek */
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media screen and (min-width: 769px) { .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.photo-grid figure { margin: 0; }
.photo-grid img { border-radius: 6px; }
.photo-main img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 8px; display: block; margin: 0 auto; }

.break-all { word-break: break-all; }

/* Mobil: tlačítka formulářů přes celou šířku */
@media screen and (max-width: 768px) {
	.buttons.is-stacked-mobile { flex-direction: column; align-items: stretch; }
	.buttons.is-stacked-mobile > *, .buttons.is-stacked-mobile .button { width: 100%; margin-right: 0; }
	.section { padding: 1.5rem .75rem; }
}

/* Admin → Systém */
.info-label { width: 40%; }

/* Prohlížeč fotek na celou obrazovku (fáze E, app.js – data-lightbox) */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(10, 10, 10, .94);
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; user-select: none; }
.lightbox button, .lightbox a {
	position: absolute;
	color: #fff;
	background: rgba(0, 0, 0, .45);
	border: 0;
	border-radius: 999px;
	min-width: 44px;
	height: 44px;
	padding: 0 .9rem;
	font-size: 1.1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	text-decoration: none;
}
.lightbox button:focus-visible, .lightbox a:focus-visible { outline: 2px solid #fff; }
.lightbox .lightbox-close { top: .75rem; right: .75rem; font-size: 1.6rem; }
.lightbox .lightbox-prev { left: .5rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; }
.lightbox .lightbox-next { right: .5rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; }
.lightbox .lightbox-counter { position: absolute; top: 1.2rem; left: 1rem; color: #fff; font-size: .9rem; }
.lightbox .lightbox-original { bottom: .9rem; right: .75rem; font-size: .85rem; }
html.lightbox-open { overflow: hidden; }

/* Moje poloha na mapě (fáze F) */
.locate-control button {
	width: 34px;
	height: 34px;
	border: 0;
	background: #fff;
	font-size: 1.25rem;
	line-height: 34px;
	cursor: pointer;
	color: #1e88e5;
}
.locate-control button.is-loading { opacity: .5; cursor: progress; }
.locate-control button.is-watching { background: #1e88e5; color: #fff; }
.locate-control button:focus-visible { outline: 2px solid #1e88e5; outline-offset: 1px; }
