/* ===== Cookie consent banner (DBIM 7.6.1) ===== */
#cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  box-sizing: border-box;
  max-height: 85vh;            /* WCAG 1.4.10 reflow: banner never fills the screen at high zoom */
  overflow-y: auto;
  background: #fff;
  color: #222;                 /* 15:1 contrast on white */
  border-top: 3px solid #1a4480;
  padding: 1rem 90px;          /* keeps clear of accessibility widget (left) and scroll-to-top (right) */
  box-shadow: 0 -2px 8px rgba(0, 0, 0, .2);
  font-size: 15px;
  line-height: 1.5;
}

#cookie-banner p {
  margin: 0 0 .5rem;
  font-size: 15px;             /* overrides theme's global p size */
  line-height: 1.5;
  color: #222;
}

/* Button rows: right-aligned */
#cookie-banner .cc-actions,
#cookie-banner .cc-custom {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin-top: .5rem;
}

#cookie-banner .cc-custom[hidden] {
  display: none;
}

/* Customize panel: stack the options, align them left, Save button on the right */
#cookie-banner .cc-custom {
  flex-direction: column;
  align-items: flex-start;
}
#cookie-banner .cc-custom button {
  align-self: flex-end;
}
#cookie-banner .cc-custom label {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  color: #222;
  cursor: pointer;
}
#cookie-banner .cc-custom input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 auto;
}

/* Accept / Reject / Customize: identical styling so no option is favoured (DPDP) */
#cookie-banner button {
  min-height: 44px;            /* touch target size */
  min-width: 44px;
  padding: .5rem 1.25rem;
  cursor: pointer;
  background: #1a4480;         /* 9.7:1 contrast with white text */
  color: #fff;
  border: 2px solid #1a4480;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

#cookie-banner button:hover {
  background: #fff;
  color: #1a4480;
}

/* Visible keyboard focus (WCAG 2.4.7) */
#cookie-banner button:focus,
#cookie-banner button:focus-visible,
#cookie-banner input[type="checkbox"]:focus-visible {
  background: #fff;
  color: #1a4480;
  outline: 3px solid #ff9900;
  outline-offset: 2px;
}

/* Tablets and phones: stack buttons full width, shrink side padding */
@media (max-width: 768px) {
  #cookie-banner {
    padding: 1rem;
    padding-bottom: 80px;      /* leaves room for the accessibility widget at bottom-left */
  }
  #cookie-banner .cc-actions {
    flex-direction: column;
    align-items: stretch;
  }
  #cookie-banner .cc-actions button,
  #cookie-banner .cc-custom button {
    width: 100%;
  }
}

/* Windows High Contrast / forced colors mode */
@media (forced-colors: active) {
  #cookie-banner { border: 2px solid CanvasText; }
  #cookie-banner button { border: 2px solid ButtonText; }
}

/* Hide the banner when printing */
@media print {
  #cookie-banner { display: none; }
}