/* ============================================================================
   Dr.Septic — consent-banner.css
   Cookie banner and preferences dialog. Reuses the site's existing design
   tokens from styles.css, so nothing about the site's look changes.
   Layering: skip-link 100 > banner 200 > dialog 210; the fixed mobile call
   bar sits at 70, and the banner is offset above it below 900px.
   ========================================================================== */

/* ---------------------------------------------------------------- banner */

.ccm-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom));
  z-index: 200;
  background: var(--navy-deep);
  color: var(--on-navy);
  border-top: 3px solid var(--orange);
  box-shadow: 0 -14px 34px -20px rgba(3, 32, 63, .95);
}

@media (min-width: 900px) {
  .ccm-banner { bottom: 0; }
}

.ccm-banner-inner {
  width: min(1180px, 100% - (var(--gutter) * 2));
  margin: 0 auto;
  padding: 18px 0 20px;
  display: grid;
  gap: 14px;
}

@media (min-width: 900px) {
  .ccm-banner-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 20px 0;
  }
}

.ccm-copy { min-width: 0; }

.ccm-title {
  margin: 0 0 6px;
  font-family: var(--ff-cond);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  line-height: 1.2;
  color: var(--on-navy);
}

.ccm-text {
  margin: 0;
  font-size: .94rem;
  line-height: 1.55;
  color: var(--on-navy-soft);
}

.ccm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --------------------------------------------------------------- buttons */

.ccm-btn {
  font-family: var(--ff-cond);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  min-height: 48px;
  padding: 14px 20px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.ccm-btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.ccm-btn-primary:hover { background: var(--orange-deep); border-color: var(--orange-deep); }

.ccm-btn-secondary {
  background: transparent;
  border-color: #6C8CB4;
  color: #fff;
}
.ccm-btn-secondary:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

.ccm-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--on-navy-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-inline: 10px;
}
.ccm-btn-ghost:hover { color: #fff; }

.ccm-banner :focus-visible,
.ccm-dialog :focus-visible {
  outline: 3px solid var(--orange-bright);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- dialog */

.ccm-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(3, 32, 63, .62);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 640px) {
  .ccm-overlay { align-items: center; padding: var(--gutter); }
}

.ccm-dialog {
  width: min(620px, 100%);
  max-height: min(86vh, 760px);
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 30px 70px -30px rgba(3, 32, 63, .8);
}

@media (min-width: 640px) {
  .ccm-dialog { border-radius: var(--radius); }
}

.ccm-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px var(--gutter) 14px;
  border-bottom: 1px solid var(--line);
}

.ccm-dialog-head .ccm-title { color: var(--navy); margin: 0; }

.ccm-close {
  flex: none;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
}
.ccm-close:hover { background: var(--mist); color: var(--ink); }

.ccm-dialog-body { padding: 6px var(--gutter) 10px; }

.ccm-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ccm-row:last-child { border-bottom: 0; }

.ccm-row-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ccm-check {
  flex: none;
  width: 22px;
  height: 22px;
  accent-color: var(--blue);
  cursor: pointer;
}
.ccm-row.is-locked .ccm-check { cursor: default; }

.ccm-row-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--ff-cond);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  cursor: pointer;
}
.ccm-row.is-locked .ccm-row-label { cursor: default; }

.ccm-locked {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .02em;
  text-transform: lowercase;
  color: var(--muted);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}

.ccm-row-note {
  margin: 6px 0 0 34px;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--muted);
}

.ccm-dialog-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px var(--gutter) 20px;
  border-top: 1px solid var(--line);
  background: var(--mist);
  border-radius: 0 0 var(--radius) var(--radius);
}

.ccm-dialog-foot .ccm-btn { flex: 1 1 auto; }

/* The dialog sits on white, so the outline variant needs ink, not white. */
.ccm-dialog-foot .ccm-btn-secondary {
  border-color: var(--navy);
  color: var(--navy);
}
.ccm-dialog-foot .ccm-btn-secondary:hover {
  background: var(--navy);
  color: #fff;
}

/* ----------------------------------------------- footer re-open control */

.ccm-reopen {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  opacity: .85;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ccm-reopen:hover { opacity: 1; }
.ccm-reopen:focus-visible { outline: 3px solid var(--orange-bright); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .ccm-btn { transition: none; }
}
