/* Dealer Insights consent banner + preferences modal.
   Uses the site's design tokens where available, with safe fallbacks. */

.di-consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--color-gray-900, #0f172a);
  color: #fff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .25);
  font-size: .9rem;
  line-height: 1.5;
}
.di-consent__text { margin: 0; max-width: 64ch; }
.di-consent__text a { color: #7dd3fc; text-decoration: underline; }
.di-consent__btns { display: flex; gap: .5rem; flex-wrap: wrap; }

.di-btn {
  border: 0;
  border-radius: 8px;
  padding: .6rem 1.1rem;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  font-family: inherit;
}
.di-btn--ghost   { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); }
.di-btn--ghost:hover { background: rgba(255,255,255,.1); }
.di-btn--primary { background: var(--color-primary, #2563eb); color: #fff; }
.di-btn--primary:hover { filter: brightness(1.08); }

.di-prefs {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .5);
  padding: 1rem;
}
.di-prefs__panel {
  background: #fff;
  color: var(--color-gray-900, #0f172a);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
}
.di-prefs__panel h2 { margin: 0 0 1rem; font-size: 1.25rem; }
.di-prefs__panel label {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin: .85rem 0;
  font-weight: 500;
}
.di-prefs__panel label span { color: var(--color-gray-500, #64748b); font-weight: 400; }
.di-prefs__panel input[type="checkbox"] { width: 18px; height: 18px; }
.di-prefs__gpc {
  background: #ecfdf5;
  color: #065f46;
  padding: .6rem .8rem;
  border-radius: 8px;
  font-size: .85rem;
  margin: 0 0 1rem;
}
.di-prefs__btns { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }
/* Ghost button sits on the light modal here, so it needs dark text (the banner
   version is white-on-dark). */
.di-prefs .di-btn--ghost { color: var(--color-gray-700, #334155); border-color: var(--color-gray-300, #cbd5e1); }
.di-prefs .di-btn--ghost:hover { background: var(--color-gray-100, #f1f5f9); }

@media (max-width: 640px) {
  .di-consent { flex-direction: column; align-items: stretch; }
  .di-consent__btns { justify-content: stretch; }
  .di-consent__btns .di-btn { flex: 1; }
}
