/* Consent banner, preferences button and dialog, in the site's glass style. */
#advertising-consent,
#advertising-dialog,
#advertising-preferences {
  font-family: var(--font-sans, system-ui, sans-serif);
  color: var(--ink-soft, #aeb9d6);
  background: rgb(13 24 56 / 0.92);
  border: 1px solid rgb(140 165 255 / 0.28);
  font-size: 0.875rem;
  line-height: 1.55;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
#advertising-consent {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: min(56rem, calc(100% - 2rem));
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem 1.25rem 4.75rem;
  border-radius: 1.25rem;
  box-shadow:
    0 30px 70px -20px rgb(0 0 0 / 0.75),
    0 0 50px -20px rgb(61 107 255 / 0.45);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  animation: consent-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
#advertising-consent::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 1.35rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(140 165 255 / 0.3);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23dbe4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5'/%3E%3Cpath d='M8.5 8.5v.01'/%3E%3Cpath d='M16 15.5v.01'/%3E%3Cpath d='M12 12v.01'/%3E%3Cpath d='M11 17v.01'/%3E%3Cpath d='M7 14v.01'/%3E%3C/svg%3E")
      center / 20px no-repeat,
    linear-gradient(160deg, rgb(61 107 255 / 0.55), rgb(91 75 255 / 0.25));
}
@keyframes consent-in {
  from {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
#advertising-consent[hidden],
#advertising-preferences[hidden] {
  display: none;
}
.consent-copy {
  flex: 1;
}
#advertising-consent h2,
#advertising-dialog h2 {
  margin: 0 0 0.35rem;
  color: var(--ink, #f2f5ff);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-family: var(--font-serif, system-ui, sans-serif);
}
#advertising-dialog h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
#advertising-consent p,
#advertising-dialog p {
  margin: 0 0 0.5rem;
}
#advertising-consent p:last-child {
  margin-bottom: 0;
}
#consent-storage-status:empty {
  display: none;
}
#advertising-consent a,
#advertising-dialog a {
  color: var(--accent, #5ce1ff);
  font-weight: 600;
  text-decoration: none;
}
#advertising-consent a:hover,
#advertising-dialog a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.consent-actions {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem;
}
.consent-actions button,
#advertising-preferences {
  cursor: pointer;
  min-height: 44px;
  padding: 0.6rem 1.05rem;
  border: 1px solid rgb(140 165 255 / 0.28);
  border-radius: 0.65rem;
  background: rgb(22 34 70 / 0.8);
  color: var(--ink, #f2f5ff);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease,
    filter 0.2s ease;
}
.consent-actions button:hover,
#advertising-preferences:hover {
  border-color: rgb(140 165 255 / 0.55);
  transform: translateY(-1px);
}
.consent-actions button[data-consent="accept"],
.consent-actions button[data-consent="save"] {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #3d6bff, #5b4bff);
  box-shadow: 0 10px 26px -10px rgb(76 90 255 / 0.8);
}
.consent-actions button[data-consent="accept"]:hover,
.consent-actions button[data-consent="save"]:hover {
  filter: brightness(1.08);
}
.consent-actions button[data-consent="preferences"],
.consent-actions button[data-consent="close"] {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft, #aeb9d6);
}
.consent-actions button[data-consent="preferences"]:hover,
.consent-actions button[data-consent="close"]:hover {
  color: var(--ink, #f2f5ff);
}
.consent-actions button:focus-visible,
#advertising-preferences:focus-visible,
#advertising-dialog input:focus-visible {
  outline: 3px solid var(--ring, #5c8dff);
  outline-offset: 3px;
}
#advertising-preferences {
  position: fixed;
  z-index: 99;
  bottom: 1rem;
  left: 1rem;
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  border-radius: 999px;
}
#advertising-dialog {
  border-radius: 1.25rem;
  padding: 1.75rem;
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  box-shadow:
    0 40px 90px -20px rgb(0 0 0 / 0.8),
    0 0 60px -20px rgb(61 107 255 / 0.5);
}
#advertising-dialog::backdrop {
  background: rgb(3 6 16 / 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
#advertising-dialog label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: 0.75rem;
  min-height: 44px;
  margin: 1.1rem 0;
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgb(140 165 255 / 0.2);
  background: rgb(22 38 77 / 0.5);
  color: var(--ink, #f2f5ff);
  font-weight: 600;
  cursor: pointer;
}
#advertising-dialog input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgb(140 165 255 / 0.35);
  background: rgb(8 14 34 / 0.9);
  cursor: pointer;
  transition: background 0.2s ease;
}
#advertising-dialog input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 999px;
  background: #aeb9d6;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}
#advertising-dialog input:checked {
  background: linear-gradient(135deg, #3d6bff, #5b4bff);
  border-color: transparent;
}
#advertising-dialog input:checked::after {
  transform: translateX(1.25rem);
  background: #fff;
}
@media (max-width: 760px) {
  #advertising-consent {
    display: block;
    padding: 1.25rem;
  }
  #advertising-consent::before {
    display: none;
  }
  .consent-actions {
    margin-top: 0.75rem;
  }
  .consent-actions button {
    flex: 1 1 auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  #advertising-consent {
    animation: none;
  }
}
