/* ============================================================
   Element Human — cookie consent banner + preferences modal
   Pairs with js/eh-consent.js. Fully self-contained: no
   dependency on styles.css / wedge-lp.css tokens so it renders
   identically on every page family.
   ============================================================ */

/* ---------- Banner (bottom bar) ---------- */
.ehc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  display: flex;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ehc-banner.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ehc-banner__card {
  max-width: 680px;
  width: 100%;
  background: linear-gradient(180deg, rgba(19, 30, 44, 0.97) 0%, rgba(12, 21, 32, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 22px 24px 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}
.ehc-banner__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #F0F0F5;
  letter-spacing: -0.005em;
}
.ehc-banner__body {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
}
.ehc-banner__policy {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ehc-banner__policy:hover { color: #fff; }

/* CPRA links row (us_ca only) — required notice links with the same
   visual weight as body text; deliberately not styled as buttons so
   the Accept/Reject pair stays the symmetric primary choice. */
.ehc-banner__cpra {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ehc-cpra-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ehc-cpra-link:hover { color: #fff; }
.ehc-cpra-sep { color: rgba(255, 255, 255, 0.3); }
.ehc-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.ehc-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 9px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ehc-btn--primary {
  background: linear-gradient(135deg, #007AFF, #00A0FF);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}
.ehc-btn--primary:hover {
  box-shadow: 0 6px 24px rgba(0, 122, 255, 0.5);
  transform: translateY(-1px);
}
.ehc-btn--ghost {
  background: transparent;
  color: #F0F0F5;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.ehc-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.05);
}
.ehc-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px 4px;
  margin-left: auto;
}
.ehc-link:hover { color: #F0F0F5; }

/* ---------- Preferences modal ---------- */
.ehc-prefs {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}
.ehc-prefs.is-open {
  opacity: 1;
  pointer-events: auto;
}
.ehc-prefs__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 20, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.ehc-prefs__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(19, 30, 44, 0.98) 0%, rgba(12, 21, 32, 1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 32px 28px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  transform: translateY(14px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.ehc-prefs.is-open .ehc-prefs__panel { transform: translateY(0); }
.ehc-prefs__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.ehc-prefs__close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.ehc-prefs__title {
  margin: 0 0 18px;
  font-size: 19px;
  font-weight: 700;
  color: #F0F0F5;
  letter-spacing: -0.01em;
}

/* ---------- Category rows ---------- */
.ehc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.ehc-row:last-of-type { border-bottom: none; }
.ehc-row__text { display: flex; flex-direction: column; gap: 3px; }
.ehc-row__name {
  font-size: 14px;
  font-weight: 600;
  color: #F0F0F5;
}
.ehc-row__desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}
.ehc-row__locked {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(84, 228, 43, 0.8);
  white-space: nowrap;
}

/* ---------- Toggle ---------- */
.ehc-toggle {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}
.ehc-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ehc-toggle__track {
  display: block;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.2s ease;
  position: relative;
}
.ehc-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.ehc-toggle input:checked + .ehc-toggle__track {
  background: linear-gradient(135deg, #007AFF, #00A0FF);
}
.ehc-toggle input:checked + .ehc-toggle__track::after {
  transform: translateX(18px);
}
.ehc-toggle input:focus-visible + .ehc-toggle__track {
  outline: 2px solid #007AFF;
  outline-offset: 2px;
}

.ehc-prefs__actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .ehc-banner { padding: 10px; }
  .ehc-banner__card { padding: 18px 18px 16px; }
  .ehc-banner__actions { gap: 8px; }
  .ehc-btn { padding: 10px 16px; font-size: 13px; flex: 1; }
  .ehc-link { margin-left: 0; width: 100%; text-align: center; }
  .ehc-prefs { padding: 12px; }
  .ehc-prefs__panel { padding: 26px 20px 20px; }
  .ehc-prefs__actions { flex-direction: column; }
}
