/* Cookie consent banner — see consent.js. Loaded as /consent.css?v=N in
   BOTH repos; bump N in both when this file changes.
   Mediaware colours ("bold teal"): white card with a pale-teal border;
   text #01363A on white 13.2:1; "Accept all" white on #01363A 13.2:1
   (hover #012A2D 15.3:1); "Reject all" #01363A on white with a 2px #01363A
   border (hover #E6F6F7 11.9:1); focus ring #00A2AE on white 3.1:1;
   descriptions #384548 9.9:1; toggles: on #01363A with a white knob 13.2:1,
   off light grey with a #6B7A7D outline 4.5:1. */

.bi-consent {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483000;
  box-sizing: border-box;
  width: 400px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 20px;
  background: #ffffff;
  color: #01363A;
  border: 1px solid #E6F6F7;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  font: inherit;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  animation: bi-consent-in 220ms ease-out;
}

.bi-consent *,
.bi-consent *::before,
.bi-consent *::after {
  box-sizing: border-box;
}

@keyframes bi-consent-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bi-consent { animation: none; }
}

.bi-consent__text {
  margin: 0 0 16px;
  color: #01363A;
  font-size: 14px;
}

.bi-consent__link {
  color: #01363A;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bi-consent__actions {
  display: flex;
  gap: 10px;
}

.bi-consent__btn {
  flex: 1 1 0;
  min-height: 44px;
  margin: 0;
  padding: 8px 16px; /* 10px less the 2px border, so the height is unchanged */
  border: 2px solid #01363A;
  border-radius: 9999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 150ms, border-color 150ms, transform 150ms;
}

.bi-consent__btn:hover { transform: translateY(-1px); }

/* Accept (and Save): filled. Reject: outlined. Same size, shape and weight. */
.bi-consent__btn--accept { background: #01363A; border-color: #01363A; color: #ffffff; }
.bi-consent__btn--accept:hover,
.bi-consent__btn--accept:focus-visible { background: #012A2D; border-color: #012A2D; }

.bi-consent__btn--reject { background: #ffffff; border-color: #01363A; color: #01363A; }
.bi-consent__btn--reject:hover,
.bi-consent__btn--reject:focus-visible { background: #E6F6F7; }

.bi-consent__btn:focus-visible,
.bi-consent__manage:focus-visible,
.bi-consent__link:focus-visible,
.bi-consent__switch:focus-visible {
  outline: 2px solid #00A2AE;
  outline-offset: 2px;
}

.bi-consent__manage {
  display: block;
  margin: 12px auto 0;
  padding: 4px 8px;
  background: none;
  border: 0;
  color: #01363A;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.bi-consent__prefs {
  margin-top: 12px;
  padding-top: 4px;
  border-top: 1px solid rgba(1, 54, 58, 0.12);
}

.bi-consent__prefs[hidden] { display: none; }

.bi-consent__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(1, 54, 58, 0.08);
}

.bi-consent__row-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #01363A;
}

.bi-consent__row-desc {
  margin: 2px 0 0;
  font-size: 13px;
  color: #384548;
}

.bi-consent__always {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #384548;
}

/* Toggle switch */
.bi-consent__switch {
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0;
  border-radius: 9999px;
  background: #DDE3E4;
  box-shadow: inset 0 0 0 1.5px #6B7A7D; /* outline: 4.5:1 against white */
  cursor: pointer;
  transition: background-color 150ms, box-shadow 150ms;
}

.bi-consent__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 150ms;
}

.bi-consent__switch:checked { background: #01363A; box-shadow: inset 0 0 0 1.5px #01363A; }
.bi-consent__switch:checked::after { transform: translateX(20px); }

.bi-consent__btn--save {
  width: 100%;
  margin-top: 16px;
}

/* Phones: full-width bar at the bottom */
@media (max-width: 640px) {
  .bi-consent {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 85vh;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    border-width: 1px 0 0;
  }
}
