/*! AdHome Consent Manager CSS v1.0.0
 *  Override per client via ConsentConfig.theme, e.g. theme: { primary: '#0a5cff' }
 */
.cm-root {
  --cm-primary: #0b5fff;
  --cm-primary-text: #ffffff;
  --cm-bg: #ffffff;
  --cm-text: #1a1a1a;
  --cm-muted: #5c6370;
  --cm-border: #d9dde3;
  --cm-radius: 10px;
  --cm-z: 2147483000;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--cm-text);
}
.cm-root *, .cm-root *::before, .cm-root *::after { box-sizing: border-box; }
.cm-root [hidden] { display: none !important; }

.cm-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: var(--cm-z);
  max-width: 960px; margin: 0 auto; padding: 18px 20px;
  background: var(--cm-bg); color: var(--cm-text);
  border: 1px solid var(--cm-border); border-radius: var(--cm-radius);
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cm-banner-text { flex: 1 1 380px; min-width: 0; }
.cm-title { display: block; font-size: 16px; margin-bottom: 4px; }
.cm-body { margin: 0; color: var(--cm-muted); }
.cm-link { color: var(--cm-primary); text-decoration: underline; }

.cm-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cm-btn {
  font: inherit; font-weight: 600; cursor: pointer; padding: 10px 16px;
  border-radius: 8px; border: 1px solid var(--cm-primary); min-height: 42px;
}
.cm-btn-primary { background: var(--cm-primary); color: var(--cm-primary-text); }
.cm-btn-secondary { background: var(--cm-bg); color: var(--cm-primary); }
.cm-btn:focus-visible, .cm-floating:focus-visible, .cm-close:focus-visible, .cm-switch:focus-visible {
  outline: 3px solid #ffbf47; outline-offset: 2px;
}

.cm-overlay {
  position: fixed; inset: 0; z-index: calc(var(--cm-z) + 1);
  background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.cm-modal {
  position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto;
  background: var(--cm-bg); color: var(--cm-text); border-radius: var(--cm-radius); padding: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.cm-modal-title { margin: 0 32px 12px 0; font-size: 20px; }
.cm-close {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px;
  border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--cm-muted);
}
.cm-cat { padding: 12px 0; border-top: 1px solid var(--cm-border); }
.cm-cat-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.cm-cat-name { font-weight: 600; }
.cm-cat-desc { margin: 4px 0 0; color: var(--cm-muted); font-size: 14px; }
.cm-switch { width: 22px; height: 22px; accent-color: var(--cm-primary); cursor: pointer; }
.cm-switch:disabled { cursor: not-allowed; opacity: .6; }
.cm-modal-actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--cm-border); justify-content: flex-end; }

.cm-floating {
  position: fixed; left: 16px; bottom: 16px; z-index: calc(var(--cm-z) - 1);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 8px 12px; border-radius: 999px;
  background: var(--cm-bg); color: var(--cm-text); border: 1px solid var(--cm-border);
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

@media (max-width: 600px) {
  .cm-banner { left: 8px; right: 8px; bottom: 8px; padding: 14px; }
  .cm-actions { width: 100%; }
  .cm-actions .cm-btn { flex: 1 1 100%; }
  .cm-modal { padding: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .cm-banner, .cm-modal { animation: cm-in .2s ease-out; }
  @keyframes cm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
