/**
 * Announcement bar.
 *
 * Sits above the header in normal document flow, so it pushes the page down
 * instead of covering the sticky navigation. Colours come from the two
 * Customizer settings via variables, with the theme's navy/white as fallbacks so
 * the bar is never unreadable even if a colour setting is empty.
 *
 * @package Montreal_Smoked_Meat_Rye
 */

.smr-announce {
  position: relative;
  z-index: 1200; /* Above the sticky nav band (1100), since it sits on top of it. */
  background: var(--smr-announce-bg, #1a1a2e);
  color: var(--smr-announce-color, #fff);
  font-family: var(--font-body, 'Inter', 'Helvetica Neue', sans-serif);
  font-size: .9rem;
  line-height: 1.4;
}

.smr-announce__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  max-width: var(--container, 1200px);
  /* Right padding clears the close button so long text cannot run under it. */
  padding: 10px 46px 10px 20px;
  margin-inline: auto;
  text-align: center;
}

.smr-announce--dismissible .smr-announce__inner {
  padding-right: 46px;
}

.smr-announce__text {
  margin: 0;
  color: inherit;
}

.smr-announce__cta {
  flex: 0 0 auto;
  padding: 5px 14px;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: inherit;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition, all .3s ease);
}

.smr-announce__cta:hover,
.smr-announce__cta:focus {
  background: var(--smr-announce-color, #fff);
  color: var(--smr-announce-bg, #1a1a2e);
}

.smr-announce__close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 3px;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: .75;
}

.smr-announce__close:hover {
  opacity: 1;
}

.smr-announce__close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
  opacity: 1;
}

@media (max-width: 600px) {
  .smr-announce {
    font-size: .82rem;
  }

  .smr-announce__inner {
    gap: 8px;
    padding: 9px 42px 9px 14px;
  }
}
