/* ============================================================
   Supporto iPad — visualizzatore 3D/AR (model-viewer)
   ============================================================ */

.ar-viewer {
  margin: clamp(8px, 2vw, 20px) auto clamp(40px, 7vw, 80px);
}

.ar-viewer__inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(10px, 2vw, 20px);
  box-shadow: 0 1px 2px rgba(20, 18, 16, 0.05), 0 20px 40px -28px rgba(20, 18, 16, 0.25);
}

.ar-viewer model-viewer {
  width: 100%;
  height: clamp(320px, 46vw, 520px);
  border-radius: var(--r-md);
  --poster-color: transparent;
}

.ar-viewer__ar-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--on-accent, #fff);
  background: var(--accent);
  border: none;
  border-radius: var(--r-pill);
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(20, 18, 16, 0.5);
  transition: transform 0.2s var(--ease);
}
.ar-viewer__ar-btn:hover {
  transform: translateY(-1px);
}

.ar-viewer__progress {
  display: block;
  width: 60%;
  max-width: 240px;
  height: 4px;
  margin: 0 auto;
  background: color-mix(in srgb, var(--muted) 20%, transparent);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.ar-viewer__progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
model-viewer[loaded] .ar-viewer__progress {
  display: none;
}

.ar-viewer__hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 14px;
}
