/* Cookie notice (TASK-2026-14189, Brad 2026-09-27: "simple bottom banner or simple popup";
 * "don't put this form upfront, make them dig for it").
 *
 * Two states of one element:
 *  - notice: a slim bar along the bottom of the screen. One sentence, OK/Accept,
 *    Settings. No overlay, never blocks the page, never steals focus.
 *  - panel (.eh-consent--panel): a small settings card, only when a visitor asks
 *    for Settings or reopens "Your Privacy Choices". A light scrim appears only then.
 *    Data-rights requests sit closed at the very bottom of the panel.
 *
 * Every rule is scoped to #eh-cookie-consent so host themes (Elementor, the PMS
 * site plugin) cannot restyle the buttons, headings or header of this control.
 */

#eh-cookie-consent,
#eh-cookie-consent *,
.eh-privacy-choices {
  box-sizing: border-box;
}

/* Neutralise host-theme element styles inside the control. */
#eh-cookie-consent * {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  float: none;
}

#eh-cookie-consent {
  --eh-brand-color: #1f3a8a;
  position: fixed;
  z-index: 99999;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 20px;
  background: #fff;
  color: #1f2937;
  border: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-align: left;
  animation: ehRise 0.25s ease-out;
}

@keyframes ehRise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  #eh-cookie-consent { animation: none; }
}

#eh-cookie-consent.eh-consent--hiding {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

/* Scrim: present in the DOM, visible only while the panel is open. */
.eh-consent__overlay {
  display: none;
}
.eh-consent__overlay--on {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(15, 23, 42, 0.18);
}

/* ---- Bar: only the message and the buttons show. ---- */
#eh-cookie-consent:not(.eh-consent--panel) .eh-consent__header,
#eh-cookie-consent:not(.eh-consent--panel) .eh-consent__categories,
#eh-cookie-consent:not(.eh-consent--panel) .eh-consent__links,
#eh-cookie-consent:not(.eh-consent--panel) .eh-consent__btn--save {
  display: none;
}
/* Opt-out bar: OK + Settings. Opt-in bar and the panel also offer Necessary only. */
#eh-cookie-consent:not(.eh-consent--optin):not(.eh-consent--panel) .eh-consent__btn--deny {
  display: none;
}

#eh-cookie-consent .eh-consent__body {
  flex: 1 1 320px;
}
#eh-cookie-consent .eh-consent__message {
  margin: 0;
}

#eh-cookie-consent .eh-consent__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#eh-cookie-consent .eh-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-weight: 600;
  cursor: pointer;
}
#eh-cookie-consent .eh-consent__btn:hover { background: #f9fafb; }
#eh-cookie-consent .eh-consent__btn--accept {
  background: var(--eh-brand-color);
  border-color: var(--eh-brand-color);
  color: #fff;
}
#eh-cookie-consent .eh-consent__btn--accept:hover { background: var(--eh-brand-color); filter: brightness(1.08); }
#eh-cookie-consent .eh-consent__btn--choices {
  border-color: transparent;
  background: transparent;
  padding: 6px 6px;
  font-weight: 500;
  color: #4b5563;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#eh-cookie-consent .eh-consent__btn--choices:hover { background: transparent; color: #111827; }

#eh-cookie-consent .eh-consent__link {
  color: #4b5563;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
#eh-cookie-consent .eh-consent__link:hover { color: #111827; }

#eh-cookie-consent .eh-consent__btn:focus-visible,
#eh-cookie-consent .eh-consent__close:focus-visible,
#eh-cookie-consent .eh-consent__link:focus-visible,
#eh-cookie-consent summary:focus-visible,
.eh-privacy-choices:focus-visible {
  outline: 2px solid var(--eh-brand-color, #1f3a8a);
  outline-offset: 2px;
}

/* ---- Panel: a small settings card. ---- */
#eh-cookie-consent.eh-consent--panel {
  display: block;
  left: 50%;
  right: auto;
  bottom: 24px;
  width: 420px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 16px 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  transform: translateX(-50%);
  animation: none;
}
#eh-cookie-consent.eh-consent--panel.eh-consent--hiding { transform: translateX(-50%) translateY(8px); }

#eh-cookie-consent.eh-consent--panel .eh-consent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
#eh-cookie-consent .eh-consent__title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}
/* The PMS theme forces `button { width: 100% !important }` on phones; size ours ourselves. */
#eh-cookie-consent button,
#eh-privacy-choices.eh-privacy-choices {
  width: auto !important;
}
#eh-cookie-consent .eh-consent__close { width: 32px !important; }
#eh-privacy-choices.eh-privacy-choices {
  min-height: 0 !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
}

/* The PMS theme restyles every [class*="title"] with !important; keep ours plain. */
#eh-cookie-consent .eh-consent__title,
#eh-cookie-consent .eh-consent__cat-title {
  font-family: inherit !important;
  text-transform: none !important;
}
#eh-cookie-consent .eh-consent__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #6b7280;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
#eh-cookie-consent .eh-consent__close:hover { background: #f3f4f6; color: #111827; }

#eh-cookie-consent.eh-consent--panel .eh-consent__message { color: #4b5563; font-size: 13px; }
#eh-cookie-consent.eh-consent--panel .eh-consent__categories { display: block; margin: 10px 0 14px; }
#eh-cookie-consent.eh-consent--panel .eh-consent__btn--choices { display: none; }
#eh-cookie-consent.eh-consent--panel .eh-consent__links { display: block; margin-top: 12px; }

#eh-cookie-consent .eh-consent__cat {
  display: block;
  border-top: 1px solid #f1f5f9;
  padding: 9px 0;
}
#eh-cookie-consent .eh-consent__cat:last-child { border-bottom: 1px solid #f1f5f9; }
#eh-cookie-consent .eh-consent__cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
}
#eh-cookie-consent .eh-consent__cat-header::-webkit-details-marker { display: none; }
#eh-cookie-consent .eh-consent__cat-header::marker { content: ""; }
#eh-cookie-consent .eh-consent__cat-title { flex: 1; font-weight: 600; color: #111827; }
#eh-cookie-consent .eh-consent__cat-active { color: #047857; font-size: 12px; font-weight: 600; }
#eh-cookie-consent .eh-consent__cat-chevron { display: none; }
#eh-cookie-consent .eh-consent__cat-desc { margin-top: 4px; color: #4b5563; font-size: 12px; }

#eh-cookie-consent .eh-consent__toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex: none;
}
#eh-cookie-consent .eh-consent__toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
#eh-cookie-consent .eh-consent__slider {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: #d1d5db;
  transition: background 0.2s;
  pointer-events: none;
}
#eh-cookie-consent .eh-consent__slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
#eh-cookie-consent .eh-consent__toggle input:checked + .eh-consent__slider { background: var(--eh-brand-color); }
#eh-cookie-consent .eh-consent__toggle input:checked + .eh-consent__slider::before { transform: translateX(16px); }
#eh-cookie-consent .eh-consent__toggle input:focus-visible + .eh-consent__slider {
  outline: 2px solid var(--eh-brand-color);
  outline-offset: 2px;
}

/* Data rights: one small closed link at the bottom of the panel. */
#eh-cookie-consent .eh-consent__details { display: block; font-size: 12px; color: #6b7280; }
#eh-cookie-consent .eh-consent__details > summary {
  display: inline;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#eh-cookie-consent .eh-data-rights { display: grid; gap: 8px; margin: 10px 0; }
#eh-cookie-consent .eh-data-rights__title { display: none; }
#eh-cookie-consent .eh-data-rights label { display: grid; gap: 4px; font-weight: 500; color: #374151; }
#eh-cookie-consent .eh-data-rights input,
#eh-cookie-consent .eh-data-rights select,
#eh-cookie-consent .eh-data-rights textarea {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #111827;
}
#eh-cookie-consent .eh-data-rights textarea { min-height: 60px; resize: vertical; }
#eh-cookie-consent .eh-data-rights__submit { justify-self: start; }
#eh-cookie-consent .eh-data-rights__status { color: #4b5563; }
#eh-cookie-consent .eh-data-rights__status:empty { display: none; }

/* The always-available reopen control: small and quiet (id-scoped against host button styles). */
#eh-privacy-choices.eh-privacy-choices {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 99997;
  padding: 4px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #4b5563;
  font: 500 11px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  min-height: 0;
  width: auto;
  height: auto;
  margin: 0;
  cursor: pointer;
  opacity: 0.75;
}
#eh-privacy-choices.eh-privacy-choices:hover { opacity: 1; background: #fff; color: #111827; }

@media (max-width: 600px) {
  #eh-cookie-consent { padding: 12px 14px; gap: 10px; }
  #eh-cookie-consent .eh-consent__body { flex-basis: 100%; }
  #eh-cookie-consent .eh-consent__buttons { width: 100%; }
  #eh-cookie-consent:not(.eh-consent--panel) .eh-consent__btn--accept { flex: 1; }
  #eh-cookie-consent.eh-consent--panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    transform: none;
  }
  #eh-cookie-consent.eh-consent--panel.eh-consent--hiding { transform: translateY(8px); }
  #eh-cookie-consent.eh-consent--panel .eh-consent__btn { flex: 1 1 auto; }
}
