:root{
  --vr-accent: #009D9D;
}

.vr-consent{
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 2147483647;
  padding: 0;
  font-family: Outfit, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #fff;
  animation: vrConsentSlideUp .28s ease-out both;
}

.vr-consent__panel{
  border-radius: 18px;
  border: 2px solid rgba(0,157,157,0.40);
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 22px 90px rgba(0,0,0,0.82);
  padding: 30px 22px 24px;
}

/* MOBILE: lascia spazio al bottone chatbot in basso a destra */
@media (max-width: 759px){
  .vr-consent{
    right: 108px; /* spazio per la bolla chat */
  }

  /* Mobile: più invasivo e con CTA enorme */
  .vr-consent__panel{
    padding: 34px 22px 26px;
  }
  .vr-consent__actions{
    flex-direction: column;
    gap: 12px;
    justify-content: stretch;
    align-items: stretch;
  }
  .vr-consent__btn--accept{
    order: 0;
    min-width: 100%;
    height: 74px;
    font-size: 17px;
  }
  .vr-consent__btn[data-action="deny"]{
    order: 1;
    height: 54px;
  }
}

.vr-consent__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.vr-consent__title{
  margin: 0;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.vr-consent__text{
  margin: 6px 0 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
}

.vr-consent__links{
  margin-top: 12px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  font-size: 14px;
}

.vr-consent__links a{
  color: rgba(255,255,255,0.86);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.vr-consent__links a:hover{ color:#fff; text-decoration-thickness: 2px; }

.vr-consent__actions{
  display:flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.vr-consent__btn{
  height: 58px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  font-weight: 750;
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, filter .12s ease;
}
.vr-consent__btn:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.26);
  transform: translateY(-1px);
}
.vr-consent__btn:active{ transform: translateY(0); }

.vr-consent__btn--accept{
  border-color: rgba(0,157,157,0.65);
  background: linear-gradient(180deg, rgba(0,157,157,0.92) 0%, rgba(0,157,157,0.66) 100%);
  color:#fff;
  min-width: 160px;
  font-weight: 850;
  box-shadow: 0 22px 90px rgba(0,157,157,0.18), 0 18px 70px rgba(0,0,0,0.70);
}
.vr-consent__btn--accept:hover{
  filter: brightness(1.06);
  border-color: rgba(0,157,157,0.95);
}

@media (min-width: 760px){
  .vr-consent{
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: auto;
    display:flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 0 calc(20px + env(safe-area-inset-bottom)) 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .vr-consent__panel{
    margin-left: 22px;
    margin-bottom: 22px;
    width: min(1020px, calc(100% - 260px)); /* lascia spazio al chatbot a destra */
    border-radius: 26px;
    border: 2px solid rgba(0,157,157,0.55);
    background:
      radial-gradient(1200px 260px at 0% 50%, rgba(0,157,157,0.30) 0%, rgba(0,157,157,0.14) 42%, rgba(0,0,0,0) 74%),
      rgba(0,0,0,0.90);
    box-shadow: 0 26px 110px rgba(0,0,0,0.90);
    padding: 40px 40px 34px;
  }

  .vr-consent__grid{
    max-width: none;
    margin: 0;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 22px;
  }

  .vr-consent__title{ font-size: 26px; font-weight: 950; }
  .vr-consent__text{ font-size: 18px; line-height: 1.65; }
  .vr-consent__links{ font-size: 14px; margin-top: 12px; }

  .vr-consent__actions{
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 14px;
  }

  .vr-consent__btn{
    height: 66px;
    padding: 0 26px;
    font-size: 18px;
  }

  .vr-consent__btn--accept{
    padding: 0 32px;
    min-width: 280px;
    box-shadow: 0 22px 90px rgba(0,157,157,0.18), 0 18px 70px rgba(0,0,0,0.70);
    animation: vrConsentPulse 1.2s ease-in-out infinite;
  }
}

@keyframes vrConsentSlideUp{
  from{ transform: translateY(16px); opacity: 0; }
  to{ transform: translateY(0); opacity: 1; }
}

@keyframes vrConsentPulse{
  0%, 100%{ filter: brightness(1); }
  50%{ filter: brightness(1.08); }
}
