:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input, textarea, select {
  user-select: text;
  font-size: 16px !important;
}

body {
  background-color: #090d16;
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: none;
  padding-top: max(12px, var(--sat));
  padding-bottom: calc(92px + var(--sab));
}

.ios-blur {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.kcal-ring-svg {
  transform: rotate(-90deg);
}

.kcal-ring-bg {
  stroke: rgba(148, 163, 184, 0.16);
  fill: none;
  stroke-width: 10;
}

.kcal-ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.55s cubic-bezier(.4, 0, .2, 1), stroke 0.3s ease;
}

#barcodeReader {
  border-radius: 16px;
  overflow: hidden;
  background: #020617;
}

#barcodeReader video {
  border-radius: 16px;
  object-fit: cover;
  width: 100% !important;
}

/* Selettore a doppia rotella stile Yazio / iOS */
.yazio-wheel-wrap {
  position: relative;
  height: 168px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, black 26%, black 74%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 26%, black 74%, transparent 100%);
}

.yazio-wheel-col {
  height: 168px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  padding-top: 63px;
  padding-bottom: 63px;
}

.yazio-wheel-item {
  height: 42px;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.yazio-wheel-item.active {
  color: #f8fafc;
  font-weight: 800;
  transform: scale(1.05);
}

.yazio-wheel-band {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 63px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.16), rgba(59, 130, 246, 0.10));
  border: 1px solid rgba(16, 185, 129, 0.42);
  pointer-events: none;
  z-index: 1;
}
