425 lines
6.6 KiB
CSS
425 lines
6.6 KiB
CSS
body {
|
|
font-family: sans-serif;
|
|
margin: 0;
|
|
padding: 0;
|
|
background: #fafafa;
|
|
}
|
|
|
|
header {
|
|
padding: 10px 15px;
|
|
background: #333;
|
|
color: white;
|
|
}
|
|
|
|
.gallery {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
|
gap: 8px;
|
|
padding: 10px;
|
|
}
|
|
|
|
.thumb {
|
|
cursor: pointer;
|
|
overflow: hidden;
|
|
border-radius: 4px;
|
|
border: 1px solid #ddd;
|
|
background: white;
|
|
position: relative;
|
|
aspect-ratio: 1 / 1;
|
|
}
|
|
|
|
.thumb img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
|
|
/* Icona play per i video */
|
|
.video-thumb {
|
|
position: relative;
|
|
}
|
|
|
|
.play-icon {
|
|
position: absolute;
|
|
bottom: 8px;
|
|
right: 8px;
|
|
background: rgba(0,0,0,0.6);
|
|
color: white;
|
|
padding: 4px 6px;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* Modal */
|
|
.modal {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.8);
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.modal.open {
|
|
display: flex;
|
|
}
|
|
|
|
/* 🔥 FIX IMPORTANTE: il modal ha dimensione fissa */
|
|
.modal-content {
|
|
width: 90vw;
|
|
height: 90vh;
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
/* 🔥 FIX: contenitore media sempre a dimensione piena */
|
|
#modalMediaContainer {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
/* 🔥 FIX: preview e full-res occupano lo stesso spazio */
|
|
#modalMediaContainer img,
|
|
#modalMediaContainer video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
display: block;
|
|
}
|
|
|
|
.modal-close {
|
|
position: absolute;
|
|
top: -10px;
|
|
right: -10px;
|
|
background: #fff;
|
|
border-radius: 50%;
|
|
width: 28px;
|
|
height: 28px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
font-weight: bold;
|
|
border: 1px solid #ccc;
|
|
}
|
|
|
|
/* Info Button */
|
|
.modal-info-btn {
|
|
position: absolute;
|
|
bottom: -10px;
|
|
right: 40px;
|
|
background: #fff;
|
|
border-radius: 50%;
|
|
width: 28px;
|
|
height: 28px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
border: 1px solid #ccc;
|
|
font-size: 16px;
|
|
z-index: 1500;
|
|
}
|
|
|
|
/* Info Panel */
|
|
.info-panel {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
width: 320px;
|
|
height: 100%;
|
|
background: #fff;
|
|
padding: 16px;
|
|
box-shadow: -2px 0 6px rgba(0,0,0,0.25);
|
|
overflow-y: auto;
|
|
z-index: 2000;
|
|
|
|
/* 🔥 Nasconde completamente il pannello */
|
|
transform: translateX(100%);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.info-panel.open {
|
|
/* 🔥 Mostra il pannello */
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.info-panel h3 {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.info-row {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.info-row b {
|
|
display: inline-block;
|
|
width: 110px;
|
|
}
|
|
|
|
.info-map {
|
|
width: 100%;
|
|
height: 250px;
|
|
margin-top: 15px;
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
border: 1px solid #ccc;
|
|
}
|
|
|
|
/* Leaflet */
|
|
.leaflet-container {
|
|
background: #ddd;
|
|
outline: none;
|
|
}
|
|
|
|
.map-btn {
|
|
margin-left: 10px;
|
|
padding: 6px 12px;
|
|
background: #fff;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.global-map {
|
|
display: none;
|
|
width: 100%;
|
|
height: calc(100vh - 60px);
|
|
z-index: 900;
|
|
}
|
|
|
|
.global-map.open {
|
|
display: block;
|
|
}
|
|
|
|
.gallery.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.global-map {
|
|
display: none;
|
|
width: 100%;
|
|
height: calc(100vh - 60px);
|
|
}
|
|
|
|
.global-map.open {
|
|
display: block;
|
|
}
|
|
|
|
/* ===============================
|
|
MARKER FOTO (singolo)
|
|
=============================== */
|
|
.photo-marker {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
position: relative;
|
|
box-shadow: 0 2px 6px rgba(0,0,0,0.25);
|
|
background: #fff;
|
|
}
|
|
|
|
.photo-marker img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
|
|
/* ===============================
|
|
CLUSTER FOTO (sovrapposizione)
|
|
=============================== */
|
|
.photo-cluster {
|
|
width: 56px;
|
|
height: 56px;
|
|
position: relative;
|
|
border-radius: 12px;
|
|
overflow: visible; /* serve per far uscire la miniatura dietro */
|
|
}
|
|
|
|
|
|
/* Miniatura dietro (sfocata + opacità) */
|
|
.cluster-back {
|
|
position: absolute;
|
|
top: 6px;
|
|
left: 6px;
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 10px;
|
|
object-fit: cover;
|
|
opacity: 0.5;
|
|
filter: blur(1px);
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
|
|
/* Miniatura davanti (principale) */
|
|
.cluster-front {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 10px;
|
|
object-fit: cover;
|
|
box-shadow: 0 2px 6px rgba(0,0,0,0.35);
|
|
}
|
|
/* ===============================
|
|
BOTTOM SHEET (Google Photos Web)
|
|
=============================== */
|
|
|
|
.bottom-sheet {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 140px;
|
|
background: rgba(255,255,255,0.95);
|
|
backdrop-filter: blur(6px);
|
|
border-top: 1px solid #ddd;
|
|
box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
|
|
display: none;
|
|
flex-direction: column;
|
|
z-index: 9999;
|
|
}
|
|
|
|
.bottom-sheet.open {
|
|
display: flex;
|
|
}
|
|
|
|
.sheet-header {
|
|
height: 12px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.sheet-header::before {
|
|
content: "";
|
|
width: 40px;
|
|
height: 4px;
|
|
background: #bbb;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.sheet-gallery {
|
|
display: flex;
|
|
flex-direction: row;
|
|
overflow-x: auto;
|
|
padding: 10px;
|
|
gap: 10px;
|
|
}
|
|
|
|
.sheet-gallery::-webkit-scrollbar {
|
|
height: 6px;
|
|
}
|
|
|
|
.sheet-gallery::-webkit-scrollbar-thumb {
|
|
background: #ccc;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.sheet-item {
|
|
width: 90px;
|
|
height: 90px;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
flex-shrink: 0;
|
|
box-shadow: 0 2px 6px rgba(0,0,0,0.25);
|
|
background: #eee;
|
|
}
|
|
|
|
.sheet-item img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.top-buttons {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.icon-btn {
|
|
background: none;
|
|
border: none;
|
|
font-size: 22px;
|
|
padding: 6px 10px;
|
|
cursor: pointer;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.icon-btn:hover {
|
|
background: rgba(0,0,0,0.1);
|
|
}
|
|
|
|
#optionsSheet .sheet-content {
|
|
padding: 20px;
|
|
}
|
|
|
|
#optionsSheet h3 {
|
|
margin-top: 20px;
|
|
margin-bottom: 10px;
|
|
font-size: 16px;
|
|
color: #444;
|
|
}
|
|
|
|
.sheet-btn {
|
|
width: 100%;
|
|
padding: 12px;
|
|
margin-bottom: 8px;
|
|
text-align: left;
|
|
background: #f5f5f5;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 15px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.sheet-btn:hover {
|
|
background: #e8e8e8;
|
|
}
|
|
|
|
.gallery-section-title {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
margin: 20px 10px 10px;
|
|
color: #444;
|
|
}
|
|
|
|
.gallery-section {
|
|
column-count: 3;
|
|
column-gap: 10px;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.gallery-section { column-count: 2; }
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.gallery-section { column-count: 1; }
|
|
}
|
|
|
|
.thumb {
|
|
break-inside: avoid;
|
|
margin-bottom: 10px;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 6px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.thumb img {
|
|
width: 100%;
|
|
display: block;
|
|
object-fit: cover;
|
|
}
|
|
|
|
|