/* Cookie consent ad-hoc — Liberato Gibboni */

.lg-consent[hidden] {
  display: none !important;
}

.lg-consent__banner {
  position: fixed;
  left: 50%;
  top: max(16px, env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 10050;
  width: min(720px, calc(100vw - 24px));
  pointer-events: none;
}

.lg-consent__banner-inner {
  pointer-events: auto;
  display: grid;
  gap: 16px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 10, 16, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color: #e8edf7;
}

.lg-consent__copy h2 {
  margin: 0 0 8px;
  font-family: Syne, system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.lg-consent__copy p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(232, 237, 247, 0.82);
}

.lg-consent__copy a {
  color: #8eb0ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lg-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.lg-consent__btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.lg-consent__btn:active {
  transform: scale(0.98);
}

.lg-consent__btn--primary {
  background: #305eff;
  color: #fff;
}

.lg-consent__btn--primary:hover {
  background: #4a74ff;
}

.lg-consent__btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #e8edf7;
}

.lg-consent__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.11);
}

.lg-consent__panel {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
}

.lg-consent__panel[hidden] {
  display: none !important;
}

.lg-consent__panel-card {
  width: min(520px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0c1018;
  color: #e8edf7;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.lg-consent__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.lg-consent__panel-head h2 {
  margin: 0;
  font-family: Syne, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
}

.lg-consent__icon-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.lg-consent__panel-intro {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: rgba(232, 237, 247, 0.72);
  line-height: 1.5;
}

.lg-consent__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.lg-consent__row span {
  display: grid;
  gap: 4px;
}

.lg-consent__row strong {
  font-size: 0.95rem;
}

.lg-consent__row small {
  font-size: 0.82rem;
  color: rgba(232, 237, 247, 0.62);
  line-height: 1.45;
}

.lg-consent__row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #305eff;
  flex: 0 0 auto;
}

.lg-consent__row--locked {
  cursor: default;
  opacity: 0.92;
}

.lg-consent__actions--panel {
  margin-top: 16px;
}

.lg-consent__links {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: rgba(232, 237, 247, 0.55);
  text-align: center;
}

.lg-consent__links a {
  color: #8eb0ff;
}

.lg-consent__fab {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  z-index: 10040;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(8, 10, 16, 0.9);
  color: #e8edf7;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.lg-consent__fab-icon {
  display: block;
  width: 22px;
  height: 22px;
}

.lg-consent__fab:hover {
  border-color: rgba(48, 94, 255, 0.5);
  background: rgba(20, 28, 48, 0.96);
  transform: translateY(-1px);
}

.lg-consent__fab:active {
  transform: scale(0.96);
}

.lg-consent--pending .lg-consent__fab {
  display: none;
}

.lg-consent__footer-btn {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 640px) {
  .lg-consent__banner {
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }

  .lg-consent__actions {
    flex-direction: column-reverse;
  }

  .lg-consent__btn {
    width: 100%;
    justify-content: center;
  }
}
