/* Urgent notice pop-up. Fonts come from the theme's own @font-face rules. */

html.hm-notice-lock,
html.hm-notice-lock body {
  overflow: hidden;
}

.hm-notice {
  --hm-notice-brand: #4b1e2d;
  --hm-notice-pad-x: 32px;
  --hm-notice-ink: #15110f;
  --hm-notice-brown: #402b27;
  --hm-notice-body: #2b2b2b;
  --hm-notice-cream: #f3ede6;

  position: fixed;
  inset: 0;
  z-index: 100000;
  font-family: 'Raleway', sans-serif;
  -webkit-text-size-adjust: 100%;
}

.hm-notice--foundation {
  --hm-notice-brand: #4b1e2d;
}

.hm-notice--interpretive_center {
  --hm-notice-brand: #a0372a;
}

.hm-notice--msi {
  --hm-notice-brand: #1c383c;
}

.hm-notice--national_landmark {
  --hm-notice-brand: #637231;
}

.hm-notice *,
.hm-notice *::before,
.hm-notice *::after {
  box-sizing: border-box;
}

.hm-notice__scrim {
  position: absolute;
  inset: 0;
  background: rgba(21, 17, 15, 0.62);
}

.hm-notice__dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  width: 560px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 48px);
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(21, 17, 15, 0.35);
  color: var(--hm-notice-body);
  transform: translate(-50%, -50%);
}

/* Header band */
.hm-notice__band {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 14px var(--hm-notice-pad-x);
  background: var(--hm-notice-brand);
}

.hm-notice__type {
  display: flex;
  min-width: 0;
  margin: 0;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: 'VollkornSC', serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: normal;
  text-transform: uppercase;
}

.hm-notice__type svg {
  flex: 0 0 8px;
}

.hm-notice__close {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  line-height: 0;
}

.hm-notice__close svg {
  display: block;
}

.hm-notice__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 0;
}

/* Body */
.hm-notice__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 22px;
  min-height: 0;
  padding: 30px var(--hm-notice-pad-x);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hm-notice__heading {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hm-notice__headline {
  margin: 0;
  padding: 0;
  color: var(--hm-notice-ink);
  font-family: 'Tisa Sans Pro', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.15;
  text-transform: none;
  overflow-wrap: break-word;
}

.hm-notice__headline:focus {
  outline: none;
}

/* Logos */
.hm-notice__logo {
  display: block;
}

.hm-notice__logo--foundation {
  width: 260px;
  max-width: 100%;
  aspect-ratio: 314 / 50;
  background-color: var(--hm-notice-ink);
  -webkit-mask: var(--hm-notice-logo-url) no-repeat left center / contain;
  mask: var(--hm-notice-logo-url) no-repeat left center / contain;
}

.hm-notice__logo--lockup {
  width: 100%;
  max-width: 440px;
}

.hm-notice__logo--lockup svg {
  display: block;
  width: 100%;
  height: auto;
}

.hm-notice__logo--msi {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hm-notice__msi-icon {
  display: block;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
}

.hm-notice__msi-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hm-notice__msi-name {
  width: 203px;
  max-width: 100%;
  color: #1c383c;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: normal;
  text-transform: uppercase;
}

/* Details panel */
.hm-notice__details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 16px 20px;
  background: var(--hm-notice-cream);
  border-left: 4px solid var(--hm-notice-brand);
  border-radius: 6px;
  overflow-wrap: break-word;
}

.hm-notice__row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.hm-notice__row dt {
  flex: 0 0 92px;
  width: 92px;
  margin: 0;
  color: var(--hm-notice-brown);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: normal;
  text-transform: uppercase;
}

.hm-notice__row dd {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  color: var(--hm-notice-ink);
  font-family: 'Raleway', sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

/* Message */
.hm-notice__message {
  margin: 0;
  color: var(--hm-notice-body);
  font-family: 'Raleway', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: break-word;
}

/* Actions */
.hm-notice__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.hm-notice__button,
.hm-notice__dismiss {
  font-family: 'VollkornSC', serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: normal;
  text-transform: uppercase;
}

.hm-notice__button {
  display: inline-block;
  max-width: 100%;
  padding: 13px 24px;
  background: var(--hm-notice-brand);
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
}

.hm-notice__button:hover,
.hm-notice__button:focus-visible {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.12);
}

.hm-notice__button:focus-visible,
.hm-notice__dismiss:focus-visible {
  outline: 2px solid var(--hm-notice-brand);
  outline-offset: 3px;
}

.hm-notice__dismiss {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--hm-notice-brown);
  cursor: pointer;
}

.hm-notice__dismiss:hover {
  text-decoration: underline;
}

/* Footer */
.hm-notice__footer {
  flex: 0 0 auto;
  padding: 14px var(--hm-notice-pad-x) calc(14px + env(safe-area-inset-bottom, 0px));
  background: #faf6f6;
  border-top: 1px solid #e6ddd3;
}

.hm-notice__footer p {
  margin: 0;
  color: var(--hm-notice-brown);
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  font-style: italic;
  font-weight: 500;
  line-height: normal;
}

/* Mobile: bottom sheet */
@media (max-width: 600px) {
  .hm-notice {
    --hm-notice-pad-x: clamp(16px, calc((100vw - 300px) / 2), 32px);
  }

  .hm-notice__dialog {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    max-height: 85vh;
    max-height: 85dvh;
    border-radius: 16px 16px 0 0;
    transform: none;
  }

  .hm-notice__body:last-child {
    padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  }

  .hm-notice__footer {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

/* Motion: a short fade, plus a short slide (up from the bottom on mobile). */
@media (prefers-reduced-motion: no-preference) {
  .hm-notice__scrim {
    opacity: 0;
    transition: opacity 160ms ease-out;
  }

  .hm-notice__dialog {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px));
    transition: opacity 180ms ease-out, transform 180ms ease-out;
  }

  .hm-notice--open .hm-notice__scrim {
    opacity: 1;
  }

  .hm-notice--open .hm-notice__dialog {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 600px) {
  .hm-notice__dialog {
    opacity: 1;
    transform: translateY(100%);
  }

  .hm-notice--open .hm-notice__dialog {
    transform: none;
  }
}
