/*!
 * Automaus Consent — styles. Self-contained, themeable via CSS variables.
 * Brand overrides: set --amc-accent etc. on .amc-brand-gyp / .amc-brand-automaus.
 * R1: NO COLD BLUE. Defaults are warm-neutral. R3: no pure #000/#fff.
 */
.amc-root, .amc-modal-wrap, .amc-reopen {
  --amc-bg: #ffffff; --amc-fg: #1c1a17; --amc-sub: #57514a;
  --amc-line: #e6e1da; --amc-accent: #2f6f5e;      /* deep teal-green, warm-neutral */
  --amc-accent-fg: #ffffff; --amc-btn-bg: #f4f1ec; --amc-btn-fg: #1c1a17;
  --amc-shadow: 0 8px 30px rgba(28,26,23,.18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.5; box-sizing: border-box;
}
.amc-root *, .amc-modal-wrap * { box-sizing: border-box; }

/* Brand: GYP = warm editorial sage; Automaus = neutral cockpit */
.amc-brand-gyp { --amc-accent: #4f6b3a; --amc-btn-bg: #f2efe8; }        /* sage */
.amc-brand-automaus { --amc-accent: #3a5a4a; --amc-btn-bg: #eef0ee; }

@media (prefers-color-scheme: dark) {
  .amc-root, .amc-modal-wrap, .amc-reopen {
    --amc-bg: #1f1d1a; --amc-fg: #f0ece5; --amc-sub: #b7afa4;
    --amc-line: #383430; --amc-btn-bg: #2b2824; --amc-btn-fg: #f0ece5;
    --amc-accent: #6f9d84; --amc-accent-fg: #10201a;
    --amc-shadow: 0 8px 30px rgba(0,0,0,.5);
  }
}

/* ---- bottom banner ---- */
.amc-banner {
  position: fixed; z-index: 2147483000; left: 12px; right: 12px; bottom: 12px;
  max-width: 920px; margin: 0 auto; background: var(--amc-bg); color: var(--amc-fg);
  border: 1px solid var(--amc-line); border-radius: 14px; box-shadow: var(--amc-shadow);
  padding: 16px 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.amc-msg { flex: 1 1 320px; min-width: 260px; color: var(--amc-fg); }
.amc-gpc { color: var(--amc-accent); font-weight: 600; }
.amc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.amc-link { color: var(--amc-accent); text-decoration: underline; }

/* ---- buttons ---- */
.amc-btn {
  font: inherit; cursor: pointer; border-radius: 10px; padding: 9px 14px;
  border: 1px solid var(--amc-line); background: var(--amc-btn-bg); color: var(--amc-btn-fg);
  transition: transform .04s ease, filter .15s ease;
}
.amc-btn:hover { filter: brightness(0.97); }
.amc-btn:active { transform: translateY(1px); }
.amc-btn:focus-visible { outline: 2px solid var(--amc-accent); outline-offset: 2px; }
.amc-primary { background: var(--amc-accent); color: var(--amc-accent-fg); border-color: transparent; font-weight: 600; }

/* ---- preferences modal ---- */
.amc-modal-wrap {
  position: fixed; inset: 0; z-index: 2147483001; display: flex; align-items: center;
  justify-content: center; background: rgba(20,18,16,.5); padding: 16px;
}
.amc-modal {
  background: var(--amc-bg); color: var(--amc-fg); border-radius: 16px; box-shadow: var(--amc-shadow);
  border: 1px solid var(--amc-line); width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; padding: 22px 22px 18px;
}
.amc-h { margin: 0 0 12px; font-size: 19px; }
.amc-row {
  display: flex; gap: 14px; justify-content: space-between; align-items: flex-start;
  padding: 12px 0; border-top: 1px solid var(--amc-line);
}
.amc-row:first-of-type { border-top: 0; }
.amc-sub { color: var(--amc-sub); font-size: 12.5px; }
.amc-always { color: var(--amc-sub); font-size: 12.5px; white-space: nowrap; padding-top: 2px; }
.amc-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--amc-accent); margin-top: 2px; flex: none; }
.amc-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.amc-fine { color: var(--amc-sub); font-size: 12px; margin: 12px 0 0; }

/* ---- persistent re-open pill ---- */
.amc-reopen {
  position: fixed; z-index: 2147482999; left: 12px; bottom: 12px;
  background: var(--amc-btn-bg); color: var(--amc-btn-fg); border: 1px solid var(--amc-line);
  border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 12.5px; cursor: pointer;
  box-shadow: var(--amc-shadow); opacity: .85;
}
.amc-reopen:hover { opacity: 1; }
.amc-reopen:focus-visible { outline: 2px solid var(--amc-accent); outline-offset: 2px; }

@media (max-width: 560px) {
  .amc-banner { flex-direction: column; align-items: stretch; }
  .amc-actions { justify-content: stretch; }
  .amc-actions .amc-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .amc-btn { transition: none; } }
