/* ============ COOKIE CONSENT BANNER ============
 * Banner Garante-compliant per nivents.com.
 * - Posizione: bottom fixed, pieno-larghezza su mobile, max 540px su desktop
 * - Z-index alto per stare sopra a qualsiasi contenuto/modal
 * - Brand colors: navy bg, magenta CTA, gold accent
 */

.nv-cookie {
  position: fixed;
  z-index: 9999;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: rgba(15, 23, 42, 0.96);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
          backdrop-filter: saturate(140%) blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 22px 22px 18px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  transform: translateY(120%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
  pointer-events: none;
}
.nv-cookie.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 720px) {
  .nv-cookie {
    left: auto;
    right: 24px;
    bottom: 24px;
    max-width: 460px;
  }
}

.nv-cookie__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.nv-cookie__body {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.nv-cookie__body a {
  color: #FF2E5C;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 46, 92, 0.55);
}
.nv-cookie__body a:hover {
  color: #FFC02E;
  border-bottom-color: rgba(255, 192, 46, 0.6);
}

.nv-cookie__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nv-cookie__btn {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 11px 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .12s ease, opacity .15s ease;
}
.nv-cookie__btn:active { transform: scale(0.97); }

.nv-cookie__btn--accept {
  background: linear-gradient(135deg, #FF2E5C 0%, #D9264E 100%);
  color: #fff;
}

.nv-cookie__btn--reject {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nv-cookie__btn--customize {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  flex: 0 0 100%;
  font-weight: 500;
  font-size: 12px;
  padding: 6px;
}
.nv-cookie__btn--customize:hover {
  color: #FFC02E;
}

/* ============ SETTINGS MODAL (Personalizza) ============ */
.nv-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.nv-cookie-modal.is-open {
  display: flex;
}

.nv-cookie-modal__card {
  background: #1B2438;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  max-width: 520px;
  width: 100%;
  padding: 26px 24px 20px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  max-height: 86vh;
  overflow-y: auto;
}

.nv-cookie-modal__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}
.nv-cookie-modal__sub {
  margin: 0 0 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
}

.nv-cookie-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.nv-cookie-row:last-of-type { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }

.nv-cookie-row__text { flex: 1; }
.nv-cookie-row__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #fff;
}
.nv-cookie-row__desc {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.nv-cookie-row__pill {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.16);
  color: #4ade80;
  white-space: nowrap;
}

/* Switch */
.nv-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  align-self: center;
}
.nv-switch input { display: none; }
.nv-switch__track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  transition: background .2s;
}
.nv-switch__track::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.nv-switch input:checked + .nv-switch__track {
  background: #FF2E5C;
}
.nv-switch input:checked + .nv-switch__track::before {
  transform: translateX(20px);
}

.nv-cookie-modal__actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.nv-cookie-modal__actions button {
  flex: 1;
  padding: 11px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.nv-cookie-modal__actions .nv-cookie__btn--accept { flex: 2; }
