/* Medimate: marketing-tools consent bar (Mailchimp only).
   Loaded only on pages that carry the Mailchimp snippet (index.html, training-updates.html). */

.mm-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  padding: 12px;
  font-family: "Montserrat", sans-serif;
  pointer-events: none;
}

.mm-consent[hidden] {
  display: none;
}

.mm-consent:focus {
  outline: none;
}

.mm-consent-inner {
  pointer-events: auto;
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(17, 24, 39, 0.18);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}

.mm-consent-text {
  flex: 1 1 auto;
  min-width: 0;
}

.mm-consent-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: #111827;
}

.mm-consent p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #4b5563;
}

.mm-consent p.mm-consent-current {
  margin-top: 6px;
  color: #111827;
}

.mm-consent a {
  color: #be123c;
  font-weight: 600;
  text-decoration: underline;
}

.mm-consent-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

/* Accept and Reject share one style so neither is visually favoured. */
.mm-btn {
  min-width: 116px;
  min-height: 44px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  color: #9f1239;
  background: #ffffff;
  border: 2px solid #e7476a;
  border-radius: 999px;
  cursor: pointer;
}

.mm-btn:hover {
  background: #fff4f6;
}

.mm-link {
  min-height: 44px;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.mm-btn:focus-visible,
.mm-link:focus-visible,
.mm-consent a:focus-visible {
  outline: 3px solid #111827;
  outline-offset: 2px;
}

/* Keeps the footer reachable while the bar is open. The height is set by consent.js. */
body.mm-consent-open {
  padding-bottom: var(--mm-consent-h, 0px);
}

.mm-consent-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Footer "Cookie Preferences" control, styled to match the neighbouring footer links. */
#footer .footer-links button.mm-cookie-prefs {
  margin: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  color: #9ca3af !important;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.18s ease;
}

#footer .footer-links button.mm-cookie-prefs:hover {
  color: #e7476a !important;
}

#footer .footer-links button.mm-cookie-prefs:focus-visible {
  outline: 2px solid #e7476a;
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 640px) {
  .mm-consent {
    padding: 6px;
  }

  .mm-consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    max-height: calc(100vh - 12px);
  }

  .mm-consent p {
    font-size: 0.8125rem;
    line-height: 1.45;
  }

  .mm-consent p.mm-consent-current {
    margin-top: 4px;
  }

  .mm-consent-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .mm-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 14px;
  }

  .mm-link {
    flex: 1 1 100%;
    min-height: 40px;
    padding: 8px;
  }
}
