/* Tiled galleries (tao-core). Mosaic sizes come inline from gallery.php as percentages. */
.tiled-gallery { clear: both; margin: 0 -2px 1.5em; overflow: hidden; }
.tiled-gallery .gallery-row { display: flex; width: 100%; overflow: hidden; }
.tiled-gallery .gallery-group { display: flex; flex-direction: column; height: 100%; }
.tiled-gallery .tiled-gallery-item { position: relative; box-sizing: border-box; padding: 2px; margin: 0; overflow: hidden; }
.tiled-gallery .tiled-gallery-item a { display: block; width: 100%; height: 100%; border: 0; background: transparent; margin: 0; padding: 0; }
.tiled-gallery .tiled-gallery-item img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; margin: 0 !important; padding: 0; border: 0; box-shadow: none; }
.tiled-gallery.type-square { display: grid; grid-template-columns: repeat(3, 1fr); }
.tiled-gallery.type-square .tiled-gallery-item { aspect-ratio: 1; }
.tiled-gallery-caption { position: absolute; bottom: 2px; left: 2px; right: 2px; padding: 10px; overflow: hidden; background: rgba(255,255,255,.8); color: #333; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) {
	.tiled-gallery .gallery-row { flex-wrap: wrap; aspect-ratio: auto !important; }
	.tiled-gallery .gallery-group { width: 100% !important; height: auto; }
	.tiled-gallery .tiled-gallery-item { height: auto !important; }
	.tiled-gallery .tiled-gallery-item img { height: auto; }
	.tiled-gallery.type-square { grid-template-columns: repeat(2, 1fr); }
	.tiled-gallery.type-square .tiled-gallery-item img { height: 100%; }
}

/* Lightbox */
.tao-lb { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.92); }
.tao-lb[hidden] { display: none; }
.tao-lb__fig { margin: 0; max-width: 92vw; max-height: 90vh; text-align: center; }
.tao-lb__img { display: block; max-width: 92vw; max-height: 84vh; width: auto; height: auto; margin: 0 auto; }
.tao-lb__cap { color: #ddd; font-size: 14px; padding-top: 10px; }
.tao-lb__btn { position: absolute; border: 0; background: rgba(0,0,0,.4); color: #fff; font-size: 34px; line-height: 1; width: 52px; height: 52px; cursor: pointer; padding: 0; }
.tao-lb__btn:hover, .tao-lb__btn:focus { background: rgba(0,0,0,.8); color: #fff; }
.tao-lb__close { top: 10px; right: 10px; }
.tao-lb__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.tao-lb__next { right: 10px; top: 50%; transform: translateY(-50%); }
.tao-lb__count { position: absolute; top: 22px; left: 20px; color: #bbb; font-size: 13px; }
body.tao-lb-open { overflow: hidden; }

/* GPX maps (gpx.php / gpx.js) */
.tao-gpx { margin: 0 0 1.5em; }
.tao-gpx__map { width: 100%; height: 450px; background: #aad3df; z-index: 0; }
.tao-gpx__map:fullscreen { height: 100%; }
.tao-gpx__fs { font-size: 18px; line-height: 30px !important; text-decoration: none !important; }
.tao-gpx__profile { display: block; width: 100%; height: 200px; margin-top: 4px; }
.tao-gpx__profile .grid { stroke: #e5e5e5; stroke-width: 1; }
.tao-gpx__profile .lbl { font-size: 11px; fill: #666; font-family: Arial, sans-serif; }
.tao-gpx__profile .area { fill: rgba(51, 102, 204, .3); }
.tao-gpx__profile .line { fill: none; stroke: #3366cc; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.tao-gpx .wpgpxmaps_summary { margin-top: 10px; font-size: 14px; }
.tao-gpx .summarylabel { font-weight: 600; }
