/* Emergency notice (rendered by mbc-cms.js only while an editor has it
   switched on in Sanity; home page only). Hand-authored.
   The page dims behind a centred cream card with a gold top border: the
   headline, the message, the optional poster, the optional link button, a
   44px close X, and "Continue to website". Colours come from the tokens in
   mbc-site.css. */

.mbc-emergency {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
  background-color: rgba(26, 8, 51, 0.8);
  overscroll-behavior: contain;
}

.mbc-emergency__inner {
  position: relative;
  width: 100%;
  max-width: 34rem;
  margin: auto;
  padding: clamp(2.5rem, 6vw, 3rem) clamp(1.25rem, 5vw, 2.25rem) clamp(1.5rem, 5vw, 2.25rem);
  border-top: 6px solid var(--mbc-gold, #e0a800);
  border-radius: 16px;
  background-color: var(--mbc-cream, #fdfbf6);
  color: var(--mbc-ink, #241436);
  text-align: center;
  box-shadow: 0 30px 80px rgba(10, 2, 24, 0.55);
  --mbc-focus: var(--mbc-purple, #5c16bd);
}

.mbc-emergency__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mbc-plum-900, #260c4a);
  cursor: pointer;
}

.mbc-emergency__close:hover {
  background-color: var(--mbc-lavender-50, #f5f0fc);
}

.mbc-emergency__close svg {
  width: 24px;
  height: 24px;
}

.mbc-emergency__headline {
  margin: 0 0 1rem;
  font-family: var(--mbc-font-head, Georgia, serif);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--mbc-plum-900, #260c4a);
  text-transform: none;
  letter-spacing: 0;
}

.mbc-emergency__message {
  margin: 0 0 1.5rem;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.55;
}

.mbc-emergency__poster {
  display: block;
  max-width: 100%;
  max-height: 50vh;
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: 12px;
}

/* The two buttons match the site's one primary and one secondary style. */
.mbc-emergency__link,
.mbc-emergency__continue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0 0 0.75rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: var(--mbc-font-body, sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.mbc-emergency__link {
  background-color: var(--mbc-gold, #e0a800);
  border-color: var(--mbc-gold, #e0a800);
  color: var(--mbc-plum-950, #1a0833);
}

.mbc-emergency__link:hover {
  background-color: var(--mbc-gold-bright, #f6c445);
  border-color: var(--mbc-gold-bright, #f6c445);
  color: var(--mbc-plum-950, #1a0833);
}

.mbc-emergency__continue {
  margin-bottom: 0;
  background-color: transparent;
  border-color: var(--mbc-purple, #5c16bd);
  color: var(--mbc-purple, #5c16bd);
}

.mbc-emergency__continue:hover {
  background-color: var(--mbc-purple, #5c16bd);
  color: #ffffff;
}

/* With no link button, "Continue" is the only action: make it the primary. */
.mbc-emergency__inner:not(:has(.mbc-emergency__link)) .mbc-emergency__continue {
  background-color: var(--mbc-gold, #e0a800);
  border-color: var(--mbc-gold, #e0a800);
  color: var(--mbc-plum-950, #1a0833);
}

.mbc-emergency__inner:not(:has(.mbc-emergency__link)) .mbc-emergency__continue:hover {
  background-color: var(--mbc-gold-bright, #f6c445);
  border-color: var(--mbc-gold-bright, #f6c445);
}

.mbc-emergency__close:focus-visible,
.mbc-emergency__link:focus-visible,
.mbc-emergency__continue:focus-visible {
  outline: 3px solid var(--mbc-purple, #5c16bd);
  outline-offset: 3px;
}

html.mbc-noscroll-emergency {
  overflow: hidden;
}
