.visore,
.visore * {
  box-sizing: border-box;
}

.visore {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  padding: 40px 20px;
}

.visore.visore--aperto {
  display: flex;
  align-items: center;
  justify-content: center;
}

.visore__velo {
  position: absolute;
  inset: 0;
  background: rgba(28, 20, 17, .62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.visore__box {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1040px;
  max-height: 100%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(20, 14, 12, .35);
  overflow: hidden;
  outline: none;

  transform: translateY(12px);
  opacity: 0;
  transition: transform .28s ease, opacity .28s ease;
}

.visore--aperto .visore__box {
  transform: none;
  opacity: 1;
}

.visore__titolo {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.visore__chiudi {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.visore__chiudi:hover {
  background: #f2ede8;
  color: var(--color-text-primary);
}

.visore__chiudi {
  background: rgba(255, 255, 255, .9);
}

.visore__chiudi .material-symbols-rounded {
  font-size: 26px;
}

.visore__area {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  touch-action: pan-y;
}

.visore__area img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.visore__freccia {
  position: absolute;
  top: 50%;
  margin-top: -22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #e2ddda;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.visore__freccia:hover {
  border-color: var(--color-blu-primary);
  color: var(--color-blu-primary);
  box-shadow: 0 2px 10px rgba(45, 36, 32, .12);
}

.visore__freccia .material-symbols-rounded {
  font-size: 26px;
}

.visore__freccia--prec { left: 14px; }
.visore__freccia--succ { right: 14px; }

.visore__pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px 18px;
  border-top: 1px solid #ebe7e5;
}

.visore__pallini {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visore__pallino {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 4px;
  background: #d1d5db;
  padding: 0;
  cursor: pointer;
  transition: all .35s ease;
}

.visore__pallino.is-attivo {
  width: 28px;
  background: var(--color-text-primary);
}

.visore__pallino:hover:not(.is-attivo) {
  background: #9ca3af;
}

.visore__contatore {
  font: 500 14px/1 'Open Sans', sans-serif;
  color: var(--color-text-secondary);
}

.visore--singola .visore__freccia,
.visore--singola .visore__pie {
  display: none;
}

@media (max-width: 768px) {

  .visore {
    padding: 16px 12px;
  }

  .visore__box {
    max-width: 100%;
  }

  .visore__area {
    padding: 18px;
  }

  .visore__area img {
    max-height: 66vh;
  }

  .visore__freccia {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }

  .visore__freccia--prec { left: 8px; }
  .visore__freccia--succ { right: 8px; }

  .visore__pie {
    padding: 12px 16px 14px;
  }
}

