/* BEWA onboarding first-launch + sheet permessi (bewa-native.js) */
/* Nasconde le header fisse del tema durante il walkthrough per evitare sovrapposizioni */
html.bewa-ob-active .appHeader,
html.bewa-ob-active .extraHeader,
html.bewa-ob-active #search.appHeader {
  display: none !important;
}

#bewa-onboarding {
  position: fixed; inset: 0; z-index: 200000;
  background: #f6f4f1;
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity .25s ease;
}
#bewa-onboarding.show { opacity: 1; }
.bewa-ob-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px 0;
  min-height: 44px;
}
.bewa-ob-back {
  border: 0; background: none; color: #111; font-size: 34px; font-weight: 300; line-height: 1;
  padding: 0 12px 4px 4px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.bewa-ob-back:active { opacity: 0.5; }
.bewa-ob-skip {
  border: 0; background: none; color: #8e8e93; font-size: 16px; font-weight: 500;
  padding: 8px 4px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.bewa-ob-body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 32px; text-align: center;
  background: transparent;
}
.bewa-ob-logo {
  width: 112px; height: 112px; border-radius: 26px; object-fit: cover;
  margin-bottom: 24px; background: transparent;
}
.bewa-ob-logo.wide {
  width: 220px; height: auto; border-radius: 0;
  background: transparent; box-shadow: none; object-fit: contain;
  border: 0; padding: 0; outline: none;
}
.bewa-ob-ico {
  width: 96px; height: 96px; border-radius: 50%;
  background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.bewa-ob-ico i { font-size: 40px; line-height: 1; }
.bewa-ob-title { font-size: 24px; font-weight: 700; letter-spacing: -.4px; color: #111; margin-bottom: 10px; }
.bewa-ob-text { font-size: 16px; line-height: 1.5; color: #6c6c70; max-width: 320px; }
.bewa-ob-permrow {
  width: 100%; max-width: 340px; background: #fff; border-radius: 14px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 10px; text-align: left;
  border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.bewa-ob-permrow:active { background: #f0ede8; }
.bewa-ob-permico {
  width: 40px; height: 40px; border-radius: 12px; background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bewa-ob-permico i { font-size: 20px; }
.bewa-ob-permbody { flex: 1; min-width: 0; }
.bewa-ob-permlabel { font-size: 16px; font-weight: 600; color: #111; }
.bewa-ob-permsub { font-size: 13px; color: #8e8e93; margin-top: 1px; }
.bewa-ob-badge {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; flex-shrink: 0;
  background: #e5e5ea; color: #6c6c70;
}
.bewa-ob-badge.granted { background: rgba(52,199,89,.15); color: #1a7f3c; }
.bewa-ob-badge.denied { background: rgba(255,59,48,.12); color: #c0392b; }
.bewa-ob-foot { padding: 0 24px calc(20px + env(safe-area-inset-bottom, 0px)); }
.bewa-ob-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 18px; }
.bewa-ob-dots span {
  width: 7px; height: 7px; border-radius: 50%; background: #d1cfc9; transition: all .2s;
}
.bewa-ob-dots span.on { width: 22px; border-radius: 4px; background: #000; }
.bewa-ob-cta {
  width: 100%; border: 0; border-radius: 14px; background: #000; color: #fff;
  font-size: 17px; font-weight: 600; padding: 15px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bewa-ob-cta:active { opacity: .8; }

/* Tasto notifiche push dentro lo step "Non perdere nessun appuntamento" */
.bewa-ob-pushcta { width: 100%; max-width: 340px; margin-top: 22px; }
.bewa-ob-pushcta .bewa-ob-permrow { margin-bottom: 0; }

/* ── Sheet permessi (BewaNative.sheet) ── */
.bewa-perm-sheet-ov {
  position: fixed; inset: 0; z-index: 200001;
  background: rgba(0,0,0,.4);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s ease;
}
.bewa-perm-sheet-ov.open { opacity: 1; }
.bewa-perm-sheet {
  width: 100%; max-width: 560px; background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 12px 22px calc(26px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  transform: translateY(100%); transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.bewa-perm-sheet-ov.open .bewa-perm-sheet { transform: translateY(0); }
.bewa-perm-sheet-handle { width: 38px; height: 5px; border-radius: 3px; background: #e5e5ea; margin: 0 auto 16px; }
.bewa-perm-sheet-icon { font-size: 44px; margin-bottom: 10px; }
.bewa-perm-sheet-title { font-size: 20px; font-weight: 700; color: #111; margin-bottom: 8px; }
.bewa-perm-sheet-text { font-size: 15px; line-height: 1.5; color: #6c6c70; margin-bottom: 18px; }
.bewa-perm-sheet-cta {
  width: 100%; border: 0; border-radius: 14px; background: #000; color: #fff;
  font-size: 17px; font-weight: 600; padding: 14px; margin-bottom: 8px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bewa-perm-sheet-cta:active { opacity: .8; }
.bewa-perm-sheet-cancel {
  width: 100%; border: 0; border-radius: 14px; background: #f0ede8; color: #111;
  font-size: 16px; font-weight: 500; padding: 13px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ── Toast BewaNative ── */
.bewa-native-toast {
  position: fixed; bottom: 34px; left: 50%; z-index: 200002;
  transform: translateX(-50%) translateY(16px);
  background: rgba(0,0,0,.85); color: #fff;
  padding: 10px 20px; border-radius: 999px; font-size: 14px;
  opacity: 0; transition: opacity .2s, transform .2s;
  pointer-events: none; white-space: nowrap; max-width: 92vw;
  overflow: hidden; text-overflow: ellipsis;
}
.bewa-native-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
