/* Cookie consent banner + modal — shared across all pages */

#gx-consent-banner,
#gx-consent-modal {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #1C1E21;
  box-sizing: border-box;
}

#gx-consent-banner *,
#gx-consent-modal * {
  box-sizing: border-box;
}

/* ---- Banner (bottom-right card) ---- */
#gx-consent-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #FFFFFF;
  color: #1C1E21;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  z-index: 9998;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#gx-consent-banner.visible {
  opacity: 1;
  transform: translateY(0);
}
#gx-consent-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #39FF6A;
}
.gx-consent-inner {
  padding: 20px 22px 22px 26px;
}
.gx-consent-text {
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 16px;
  color: #1C1E21;
}
.gx-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
#gx-consent-banner button {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.2;
}
#gx-consent-banner button:focus-visible {
  outline: 2px solid #39FF6A;
  outline-offset: 2px;
}
#gx-consent-banner .gx-consent-accept {
  background: #1C1E21;
  color: #ffffff;
  border: 2px solid #1C1E21;
}
#gx-consent-banner .gx-consent-accept:hover {
  background: transparent;
  color: #39FF6A;
  border-color: #39FF6A;
}
#gx-consent-banner .gx-consent-reject {
  background: transparent;
  color: #1C1E21;
  border: 1.5px solid rgba(0,0,0,0.18);
}
#gx-consent-banner .gx-consent-reject:hover {
  border-color: #39FF6A;
  background: rgba(57,255,106,0.06);
}
#gx-consent-banner .gx-consent-customize {
  background: transparent;
  color: #1C1E21;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px 6px;
}
#gx-consent-banner .gx-consent-customize:hover {
  color: #2DD954;
}

/* Dark variant — applied when body[data-theme="dark"] or .gx-dark-page is set, or auto-detected */
#gx-consent-banner.gx-dark {
  background: #1C1E21;
  color: #F5F5F3;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
#gx-consent-banner.gx-dark .gx-consent-text {
  color: #F5F5F3;
}
#gx-consent-banner.gx-dark .gx-consent-accept {
  background: #F5F5F3;
  color: #1C1E21;
  border-color: #F5F5F3;
}
#gx-consent-banner.gx-dark .gx-consent-accept:hover {
  background: transparent;
  color: #39FF6A;
  border-color: #39FF6A;
}
#gx-consent-banner.gx-dark .gx-consent-reject {
  color: #F5F5F3;
  border-color: rgba(255,255,255,0.22);
}
#gx-consent-banner.gx-dark .gx-consent-customize {
  color: #F5F5F3;
}

/* ---- Modal ---- */
#gx-consent-modal {
  position: fixed;
  inset: 0;
  background: rgba(15,16,18,0.55);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#gx-consent-modal.visible {
  display: flex;
}
.gx-modal-card {
  background: #FFFFFF;
  color: #1C1E21;
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}
.gx-modal-card.gx-dark {
  background: #1C1E21;
  color: #F5F5F3;
}
.gx-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
}
.gx-modal-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}
.gx-modal-close {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.gx-modal-close:hover { color: #39FF6A; }
.gx-modal-close:focus-visible {
  outline: 2px solid #39FF6A;
  outline-offset: 2px;
}
.gx-modal-intro {
  font-size: 13px;
  line-height: 1.55;
  margin: 6px 0 18px;
  color: inherit;
  opacity: 0.75;
}
.gx-category {
  padding: 16px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.gx-modal-card.gx-dark .gx-category {
  border-top-color: rgba(255,255,255,0.08);
}
.gx-category:first-of-type { border-top: 0; padding-top: 6px; }
.gx-category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.gx-category-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}
.gx-category-desc {
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.75;
  margin: 6px 0 0;
}

/* Toggle switch */
.gx-switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.18s ease;
}
.gx-modal-card.gx-dark .gx-switch {
  background: rgba(255,255,255,0.2);
}
.gx-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.18s ease;
}
.gx-switch[aria-checked="true"] {
  background: #39FF6A;
}
.gx-switch[aria-checked="true"]::after {
  transform: translateX(16px);
  background: #1C1E21;
}
.gx-switch[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}
.gx-switch:focus-visible {
  outline: 2px solid #39FF6A;
  outline-offset: 3px;
}

.gx-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.gx-modal-card.gx-dark .gx-modal-actions {
  border-top-color: rgba(255,255,255,0.08);
}
.gx-modal-actions button {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.gx-modal-actions button:focus-visible {
  outline: 2px solid #39FF6A;
  outline-offset: 2px;
}
.gx-modal-save {
  background: transparent;
  color: inherit;
  border: 1.5px solid rgba(0,0,0,0.18);
}
.gx-modal-card.gx-dark .gx-modal-save {
  border-color: rgba(255,255,255,0.22);
}
.gx-modal-save:hover {
  border-color: #39FF6A;
  background: rgba(57,255,106,0.08);
}
.gx-modal-accept-all {
  background: #1C1E21;
  color: #ffffff;
  border: 2px solid #1C1E21;
}
.gx-modal-card.gx-dark .gx-modal-accept-all {
  background: #F5F5F3;
  color: #1C1E21;
  border-color: #F5F5F3;
}
.gx-modal-accept-all:hover {
  background: transparent;
  color: #39FF6A;
  border-color: #39FF6A;
}

/* Cookie preferences link in footer */
.gx-cookie-pref-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
  flex-basis: 100%;
}
.site-footer.dark .gx-cookie-pref-row,
.adaptly .gx-cookie-pref-row,
body[data-theme="dark"] .gx-cookie-pref-row {
  border-top-color: rgba(255,255,255,0.1);
}
/* Auto-detect dark footer: any .funding-block whose ancestor footer has dark text */
.gx-cookie-pref-row {
  border-top-color: rgba(127,127,127,0.18);
}
.gx-cookie-pref-row button,
.gx-cookie-pref-row a {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}
.gx-cookie-pref-row button:hover,
.gx-cookie-pref-row a:hover { color: #39FF6A; }
.gx-cookie-pref-row button:focus-visible,
.gx-cookie-pref-row a:focus-visible {
  outline: 2px solid #39FF6A;
  outline-offset: 2px;
  border-radius: 4px;
}
.gx-cookie-pref-row .gx-sep {
  color: inherit;
  font-size: 12px;
  text-decoration: none;
  cursor: default;
  margin: 0 8px;
}

/* Legal links sharing the social-icon row: Privacy Policy · Cookie preferences.
   The .social-row stays centered; this cluster is pushed to the right edge and
   vertically centered with it. */
.footer-social-bar {
  position: relative;
}
.gx-footer-legal {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gx-footer-legal a,
.gx-cookie-pref {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: #9E9E9E;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.gx-footer-legal a:hover,
.gx-cookie-pref:hover { color: #39FF6A; }
.gx-footer-legal a:focus-visible,
.gx-cookie-pref:focus-visible {
  outline: 2px solid #39FF6A;
  outline-offset: 2px;
  border-radius: 4px;
}
.gx-footer-legal .gx-sep {
  color: #9E9E9E;
  font-size: 12px;
  text-decoration: none;
  cursor: default;
}
/* Narrow screens: drop the cluster below the centered icons instead of risking
   overlap at the right edge. */
@media (max-width: 600px) {
  .footer-social-bar {
    text-align: center;
  }
  .gx-footer-legal {
    position: static;
    transform: none;
    justify-content: center;
    margin-top: 14px;
  }
}

/* Mobile */
@media (max-width: 520px) {
  #gx-consent-banner {
    right: 16px;
    left: 16px;
    bottom: 16px;
    width: auto;
  }
  .gx-consent-actions { gap: 6px; }
  #gx-consent-banner button { font-size: 12.5px; padding: 8px 12px; }
}
