/* Protezione Visualizzazione e Blocco Esfiltrazione Immagini e Testi */

*, *::before, *::after {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

input, textarea, select {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  user-select: text !important;
}

img {
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  user-drag: none !important;
  pointer-events: none !important;
}

.photo-shield {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: transparent;
  pointer-events: none;
  cursor: default;
}

/* Solo le fotografie nelle gallerie mostrano il cursore lente per aprire il visualizzatore */
#galleriesGrid .photo-shield,
figure.photo-item .photo-shield,
.lightbox-img-wrapper .photo-shield {
  pointer-events: auto;
  cursor: zoom-in;
}

@media print {
  html, body {
    display: none !important;
    visibility: hidden !important;
  }
}

/* Toast Notifica Sicurezza e Copyright */
.security-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(18, 18, 24, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 196, 57, 0.45);
  color: #fafafa;
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 15px rgba(255, 196, 57, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.security-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* UI/UX Barra Filtri Categorie */
.filter-container {
  margin-top: 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 30;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 10px 16px;
}

.filter-container::-webkit-scrollbar {
  display: none;
}

.category-filter-dock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(18, 18, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 31;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a1a1aa !important;
  background: transparent;
  border: 1px solid transparent !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.cat-pill:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px);
}

/* Stato Attivo: testo scuro ultra-leggibile su sfondo bianco luminoso */
.cat-pill.active {
  color: #09090b !important;
  background: #fafafa !important;
  border-color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.cat-pill:active {
  transform: translateY(1px);
}

/* Responsività Touch: preserva riga singola su mobile con scorrimento touch */
@media (max-width: 1024px) {
  .filter-container {
    justify-content: flex-start;
  }
  .category-filter-dock {
    max-width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    border-radius: 9999px;
    padding: 6px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .category-filter-dock::-webkit-scrollbar {
    display: none;
  }
}
