/* Cookie controls intentionally use the marketplace style, independent of landing CTA/theme rules. */
#cookie-consent button,
#cookie-preferences button,
button.cookie-settings-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 24px;
  margin: 0;
  border: 1px solid #d8dfeb;
  border-radius: 999px;
  background: #fff;
  color: #2b3f57;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(71, 44, 173, 0.2);
  transform: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

#cookie-consent button:hover,
#cookie-preferences button:hover,
button.cookie-settings-toggle:hover {
  background: #10142d;
  border-color: #10142d;
  color: #fff;
  transform: none;
}

#cookie-consent button[data-cookie-accept],
#cookie-preferences button[data-cookie-accept] {
  background: #10142d;
  border-color: #10142d;
  color: #fff;
}

#cookie-consent button[data-cookie-accept]:hover,
#cookie-preferences button[data-cookie-accept]:hover {
  background: #252b48;
  border-color: #252b48;
}

#cookie-consent button:focus-visible,
#cookie-preferences button:focus-visible,
button.cookie-settings-toggle:focus-visible {
  outline: 3px solid #16743e;
  outline-offset: 3px;
}

button.cookie-settings-toggle {
  min-height: 44px;
  padding: 8px 14px;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: none;
}

#cookie-consent button[hidden],
#cookie-preferences button[hidden] { display: none !important; }

@media (max-width: 480px) {
  .cookie-consent-actions button { flex: 1 1 120px; padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  #cookie-consent button,
  #cookie-preferences button,
  button.cookie-settings-toggle { transition: none; }
}

/* Explicit centering overrides the landing's global reset and native-dialog defaults. */
#cookie-preferences {
  /* Bootstrap resets dialog to display:block, including when it is closed. */
  display: none;
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(760px, calc(100vw - 40px));
  max-height: 85dvh;
  padding: 0;
  border: 1px solid #e7ebf2;
  border-radius: 12px;
  background: #fff;
  color: #10142d;
  color-scheme: light;
  box-shadow: 0 18px 30px rgba(16, 20, 45, 0.2);
  overflow: hidden;
}
#cookie-preferences[open] { display: flex; flex-direction: column; }
#cookie-preferences::backdrop { background: rgba(16, 20, 45, 0.4); }
.cookie-dialog-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
}
.cookie-dialog-header h4 { margin: 0; }
.cookie-dialog-content { padding: 0 22px 22px; min-height: 0; overflow: auto; }
#cookie-preferences button.cookie-close {
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2b3f57;
  box-shadow: none;
}
#cookie-preferences button.cookie-close:hover { background: #f0f3f8; color: #10142d; }
#cookie-preferences button.cookie-close svg { display: block; }
@media (max-width: 767px) {
  .cookie-dialog-header { padding: 12px 16px; }
  .cookie-dialog-content { padding: 0 16px 16px; }
}

.cookie-footer-settings { text-align: center; padding: 12px 16px; }
button.cookie-settings-toggle, button.cookie-settings-toggle:hover { position: static; inset: auto; z-index: auto; min-height: 44px; padding: 10px 4px; border: 0; border-radius: 0; background: transparent; color: inherit; font-weight: 600; text-decoration: underline; box-shadow: none; }
