/* Banner consenso cookie / privacy — allineato al design del sito */

.cookie-consent {
  position: fixed;
  z-index: 10080;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  max-width: 34rem;
  margin: 0 auto;
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 12px;
  background: linear-gradient(
    165deg,
    rgba(6, 18, 32, 0.97) 0%,
    rgba(4, 12, 24, 0.96) 100%
  );
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 240, 255, 0.08);
  color: #e8f4ff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent__title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 240, 255, 0.9);
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

.cookie-consent__text {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(210, 235, 250, 0.9);
}

.cookie-consent__text a {
  color: rgba(160, 250, 255, 0.98);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__text a:hover {
  color: #f0ffff;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-consent__btn {
  flex: 1 1 auto;
  min-width: 7.5rem;
  padding: 0.62rem 0.85rem;
  border-radius: 8px;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.cookie-consent__btn--accept {
  border: none;
  color: #041019;
  background: linear-gradient(165deg, #94f3ff 0%, #00d7eb 100%);
}

.cookie-consent__btn--accept:hover {
  filter: brightness(1.06);
}

.cookie-consent__btn--reject {
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: rgba(200, 235, 255, 0.92);
  background: rgba(8, 20, 34, 0.65);
}

.cookie-consent__btn--reject:hover {
  border-color: rgba(0, 240, 255, 0.55);
  background: rgba(10, 26, 42, 0.85);
}

.cookie-consent__btn:focus-visible {
  outline: 2px solid rgba(0, 240, 255, 0.9);
  outline-offset: 2px;
}

html[data-theme="light"] .cookie-consent {
  border-color: rgba(0, 106, 120, 0.28);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 252, 253, 0.97) 100%
  );
  box-shadow:
    0 12px 36px rgba(0, 70, 90, 0.14),
    0 0 0 1px rgba(0, 106, 120, 0.08);
  color: #14303b;
}

html[data-theme="light"] .cookie-consent__title {
  color: #006a78;
}

html[data-theme="light"] .cookie-consent__text {
  color: rgba(20, 55, 70, 0.88);
}

html[data-theme="light"] .cookie-consent__text a {
  color: #006a78;
}

html[data-theme="light"] .cookie-consent__btn--reject {
  border-color: rgba(0, 106, 120, 0.3);
  color: #0d2833;
  background: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .cookie-consent__btn--accept {
  background: linear-gradient(165deg, #5ec8d4 0%, #008a9a 100%);
  color: #fff;
}

@media (max-width: 480px) {
  .cookie-consent {
    left: 0.65rem;
    right: 0.65rem;
    bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
    padding: 0.9rem;
  }

  .cookie-consent__btn {
    flex: 1 1 100%;
  }
}
