/**
 * @file
 * Notice strip component.
 */

.xp-strip {
  padding-block: 0.75rem;
  background-color: var(--xp-bg-primary);
  font-weight: 600;
  text-align: center;
}

.xp-strip--none {
  background-color: transparent;
}

.xp-strip--white {
  background-color: var(--xp-bg-white);
}

.xp-strip--light {
  background-color: var(--xp-bg-light);
}

.xp-strip--tint {
  background-color: var(--xp-bg-tint);
}

.xp-strip--secondary {
  background-color: var(--xp-bg-secondary);
}

.xp-strip--dark {
  background-color: var(--xp-bg-dark);
}

.xp-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem 1rem;
  margin: 0 auto;
}

.xp-strip__link {
  text-underline-offset: 0.2em;
}

/* On a dark strip (primary or dark), an announcement: a little more room,
   and the link as a white pill button with an arrow, so it reads as news
   rather than a line above the page. */
.xp-strip.xp-on-dark {
  padding-block: 0.9rem;
}

.xp-strip.xp-on-dark .xp-strip__inner {
  align-items: center;
}

.xp-strip.xp-on-dark .xp-strip__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.35rem 1.1rem;
  border-radius: 50rem;
  background-color: #fff;
  color: var(--xp-bg-primary, #3730E6);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.xp-strip.xp-on-dark .xp-strip__link::after {
  content: "\2192";
  transition: transform 0.15s ease;
}

.xp-strip.xp-on-dark .xp-strip__link:hover {
  background-color: #EEEDFD;
}

.xp-strip.xp-on-dark .xp-strip__link:hover::after {
  transform: translateX(3px);
}

.xp-strip.xp-on-dark .xp-strip__link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .xp-strip.xp-on-dark .xp-strip__link::after {
    transition: none;
  }
}
