/* Adam Haustechnik - first-party cookie consent (Phase 4C). Prefix: adm-cc.
 * Isolated: no global selectors, does not touch global.css, fonts or typography (font: inherit).
 * Colours come from existing global.css tokens; #fff is the only literal colour. */
.adm-cc { --adm-cc-ink: var(--c-text); --adm-cc-soft: var(--c-text-soft); --adm-cc-line: var(--c-border); --adm-cc-accent: var(--primary); --adm-cc-on: var(--c-dark); --adm-cc-bg: var(--c-bg); }
.adm-cc[hidden] { display: none !important; }
.adm-cc, .adm-cc * { box-sizing: border-box; }
.adm-cc button, .adm-cc input, .adm-cc dialog, .adm-cc .adm-cc-pop { font: inherit; color: var(--adm-cc-ink); }
.adm-cc-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Fallback when the Popover API is missing: JS adds .adm-cc--fallback and toggles [data-adm-open] */
.adm-cc--fallback .adm-cc-pop { display: none; position: fixed; z-index: 2147483000; }
.adm-cc--fallback .adm-cc-pop[data-adm-open] { display: block; }

/* Banner (popover=manual, non-modal, top layer) */
.adm-cc-banner { position: fixed; inset: auto auto 16px 50%; transform: translateX(-50%); margin: 0; width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px 22px 18px; background: var(--adm-cc-bg); border: 1px solid var(--adm-cc-line); border-top: 4px solid var(--adm-cc-accent); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.adm-cc-title { margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--adm-cc-ink); }
.adm-cc-text { margin: 0 0 14px; font-size: .95rem; line-height: 1.55; color: var(--adm-cc-ink); }
.adm-cc-text a { color: var(--adm-cc-ink); text-decoration: underline; }
.adm-cc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.adm-cc-btn { flex: 1 1 170px; min-height: 44px; padding: 10px 14px; border-radius: 10px; border: 2px solid var(--adm-cc-on); font-size: .95rem; font-weight: 600; cursor: pointer; line-height: 1.2; }
.adm-cc-btn--solid { background: var(--adm-cc-on); color: #fff !important; }
.adm-cc-btn--ghost { background: #fff; color: var(--adm-cc-on); }
.adm-cc-btn:hover { background: var(--adm-cc-ink); color: #fff !important; }
.adm-cc-x { position: absolute; top: 8px; right: 10px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; border-radius: 8px; }
.adm-cc-banner .adm-cc-title { padding-right: 40px; }

/* Settings dialog (modal <dialog>) */
.adm-cc-dialog { padding: 0; border: 1px solid var(--adm-cc-line); border-top: 4px solid var(--adm-cc-accent); border-radius: var(--radius); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); background: var(--adm-cc-bg); overscroll-behavior: contain; }
.adm-cc-dialog::backdrop { background: rgba(6,17,34,.55); }
.adm-cc-dialog__inner { position: relative; padding: 22px 22px 18px; }
.adm-cc-dialog .adm-cc-title { padding-right: 40px; }
.adm-cc-cat { border: 0; margin: 0 0 14px; padding: 0; }
.adm-cc-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--adm-cc-line); cursor: pointer; }
.adm-cc-row:last-child { border-bottom: 1px solid var(--adm-cc-line); }
.adm-cc-row__txt { display: flex; flex-direction: column; gap: 2px; }
.adm-cc-row__txt small { color: var(--adm-cc-soft); font-size: .84rem; line-height: 1.4; }
.adm-cc-switch { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 52px; height: 30px; margin: 0; border-radius: 999px; background: var(--adm-cc-soft); position: relative; cursor: pointer; transition: background .15s; }
.adm-cc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.adm-cc-switch:checked { background: var(--adm-cc-on); }
.adm-cc-switch:checked::after { transform: translateX(22px); }
.adm-cc-switch:disabled { opacity: .6; cursor: not-allowed; }
.adm-cc-msg { margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--c-accent-d); border-radius: 8px; background: var(--primary-l); color: var(--adm-cc-ink); font-size: .88rem; line-height: 1.4; }
.adm-cc-msg[hidden] { display: none; }
.adm-cc-foot { margin: 12px 0 0; text-align: center; }
.adm-cc-link { background: none; border: 0; padding: 8px; text-decoration: underline; cursor: pointer; font-size: .9rem; }

.adm-cc button:focus-visible, .adm-cc input:focus-visible, .adm-cc a:focus-visible { outline: 3px solid var(--adm-cc-accent); outline-offset: 2px; box-shadow: 0 0 0 5px #fff; }

@media (max-width: 575.98px) {
  .adm-cc-banner { inset: auto 0 0 0; transform: none; width: 100%; max-height: 80vh; max-height: 80dvh; border-radius: 14px 14px 0 0; padding: 16px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .adm-cc-btn { flex: 1 1 100%; }
  .adm-cc-banner .adm-cc-btn--solid { flex: 1 1 calc(50% - 5px); padding-left: 8px; padding-right: 8px; }
  .adm-cc-banner .adm-cc-text { margin-bottom: 12px; font-size: .92rem; line-height: 1.5; }
  .adm-cc-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .adm-cc-dialog__inner { padding: 18px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .adm-cc-switch, .adm-cc-switch::after { transition: none; } }
