/* Requested consent-banner redesign. Keep the captured consent engine intact. */
#silktide-wrapper #silktide-banner {
  --backgroundColor: var(--light);
  --textColor: var(--dark);
  --primaryColor: var(--dark-green);
  --focus: 0 0 0 2px var(--light), 0 0 0 4px var(--dark-green);
  inset: auto 0 max(16px, env(safe-area-inset-bottom));
  width: max-content;
  max-width: min(calc(100% - 32px), 60rem);
  margin-inline: auto;
  max-height: calc(100svh - 24px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 10px 14px 10px 24px;
  border: 1px solid var(--border-gray);
  border-radius: 999px;
  background: var(--backgroundColor);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  font-family: inherit;
}

#silktide-wrapper #silktide-banner:focus {
  border-radius: 999px;
}

#silktide-wrapper #silktide-banner p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

#silktide-wrapper #silktide-banner a {
  color: var(--dark-green);
  background: transparent;
  text-decoration: none;
}

#silktide-wrapper #silktide-banner .actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
}

#silktide-wrapper #silktide-banner .st-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border-gray);
  border-radius: 128px;
  background: var(--light);
  color: var(--dark-green);
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease;
}

#silktide-wrapper #silktide-banner .st-button:hover {
  border-color: var(--dark-green);
  background: var(--light-green);
  box-shadow: none;
}

#silktide-wrapper #silktide-banner .accept-all {
  border-color: var(--green);
  background: var(--green);
}

#silktide-wrapper #silktide-banner .accept-all:hover {
  border-color: var(--green-2);
  background: var(--green-2);
}

#silktide-wrapper #silktide-banner .st-button:focus-visible {
  box-shadow: var(--focus);
}

#silktide-wrapper #silktide-banner .actions-row {
  display: none;
}

#silktide-wrapper #silktide-banner a:hover {
  color: var(--black);
}

@media (max-width: 1024px), (pointer: coarse) and (max-width: 1366px) {
  #silktide-wrapper #silktide-banner {
    --edge-left: max(8px, env(safe-area-inset-left));
    --edge-right: max(8px, env(safe-area-inset-right));
    --edge-bottom: max(8px, env(safe-area-inset-bottom));
    inset: auto var(--edge-right) var(--edge-bottom) var(--edge-left);
    max-width: calc(100% - var(--edge-left) - var(--edge-right));
    max-height: calc(100dvh - var(--edge-bottom) - max(8px, env(safe-area-inset-top)));
    gap: 12px;
    padding: 8px 10px 8px 18px;
    overscroll-behavior: contain;
  }

  #silktide-wrapper #silktide-banner p {
    line-height: 18px;
    overflow-wrap: anywhere;
  }

  #silktide-wrapper #silktide-banner .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #silktide-wrapper #silktide-banner .st-button {
    min-width: 0;
    padding: 8px 12px;
    white-space: normal;
    touch-action: manipulation;
  }

  #silktide-wrapper #silktide-modal {
    --edge-left: max(8px, env(safe-area-inset-left));
    --edge-right: max(8px, env(safe-area-inset-right));
    margin-inline: var(--edge-left) var(--edge-right);
    max-width: min(40rem, calc(100% - var(--edge-left) - var(--edge-right)));
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
    padding: 14px;
    overscroll-behavior: contain;
  }

  #silktide-wrapper #silktide-modal header {
    gap: 8px;
    margin-bottom: 8px;
  }

  #silktide-wrapper #silktide-modal h2 {
    font-size: 20px;
  }

  #silktide-wrapper #silktide-modal p {
    font-size: 14px;
    line-height: 20px;
  }

  #silktide-wrapper #silktide-modal section {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 16px;
    padding: 4px 6px;
    overflow: auto;
    overscroll-behavior: contain;
  }

  #silktide-wrapper #silktide-modal .cookie-type-content {
    align-items: center;
    gap: 12px;
  }

  #silktide-wrapper #silktide-modal .switch {
    display: inline-grid;
    align-items: center;
    height: 44px;
  }

  #silktide-wrapper #silktide-modal .switch__dot {
    top: 7px;
  }

  #silktide-wrapper #silktide-modal .switch__off,
  #silktide-wrapper #silktide-modal .switch__on {
    top: 12px;
  }

  #silktide-wrapper #silktide-modal footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    margin-top: 12px;
  }

  #silktide-wrapper #silktide-modal .st-button {
    min-height: 44px;
    padding: 8px;
    font-size: 14px;
    touch-action: manipulation;
  }
}

@media (max-width: 599px) {
  #silktide-wrapper #silktide-banner,
  #silktide-wrapper #silktide-banner:focus {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 8px 12px;
    border-radius: 24px;
  }

  #silktide-wrapper #silktide-banner p {
    text-align: center;
  }

  #silktide-wrapper #silktide-modal footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #silktide-wrapper #silktide-modal .preferences-save-options {
    grid-column: 1 / -1;
  }
}

/* On short screens, give the expanded navigation the full viewport. */
@media (max-height: 500px) and (max-width: 991px) {
  body:has(#nav-menu-button[aria-expanded="true"]) #silktide-wrapper #silktide-banner {
    visibility: hidden;
  }
}

@media (max-height: 340px) and (max-width: 1024px) {
  #silktide-wrapper #silktide-modal section {
    flex: 0 0 auto;
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  #silktide-wrapper #silktide-banner {
    animation: none;
    opacity: 1;
    transform: none;
  }

  #silktide-wrapper #silktide-banner .st-button {
    transition: none;
  }
}
