.ohmio-announcement-bar {
  position: relative;
  z-index: 99998;
  width: 100%;
  overflow: hidden;
  background: var(--ohmio-bar-bg, #111);
  color: var(--ohmio-bar-color, #fff);
  font-size: var(--ohmio-bar-size, 13px);
  font-weight: var(--ohmio-bar-weight, 400);
  line-height: 1.25;
  text-transform: var(--ohmio-bar-transform, none);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.ohmio-announcement-bar *,
.ohmio-announcement-bar *::before,
.ohmio-announcement-bar *::after { box-sizing: border-box; }

/* Fixed mode: can be pinned to the top/header or bottom/footer. */
.ohmio-announcement-bar--fixed {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999999;
}
.ohmio-announcement-bar--fixed.ohmio-announcement-bar--header {
  top: 0;
  bottom: auto;
}
.ohmio-announcement-bar--fixed.ohmio-announcement-bar--footer {
  top: auto;
  bottom: 0;
}

/* Reserve the same height in the document so a fixed bar does not cover content. */
.ohmio-announcement-bar-spacer {
  width: 100%;
  height: calc((var(--ohmio-bar-size, 13px) * 1.25) + (var(--ohmio-bar-pad, 10px) * 2));
  pointer-events: none;
  visibility: hidden;
}

.ohmio-announcement-bar__viewport {
  width: 100%;
  overflow: hidden;
  padding: var(--ohmio-bar-pad, 10px) 0;
}

/*
 * The track contains two identical groups. JavaScript expands each group
 * until it is wider than the viewport, which prevents large blank areas
 * on desktop/ultrawide screens while keeping a seamless marquee loop.
 */
.ohmio-announcement-bar__track {
  display: flex;
  width: max-content;
  min-width: 100%;
  animation: ohmio-marquee 60s linear infinite;
  animation-direction: var(--ohmio-bar-direction, normal);
  will-change: transform;
}
.ohmio-announcement-bar__group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: max-content;
  min-width: 0;
  justify-content: flex-start;
  gap: var(--ohmio-bar-gap, 72px);
  padding-right: var(--ohmio-bar-gap, 72px);
  white-space: nowrap;
}
.ohmio-announcement-bar__message {
  display: inline-block;
  flex: 0 0 auto;
  letter-spacing: .01em;
}
.ohmio-announcement-bar__separator {
  display: inline-block;
  flex: 0 0 auto;
  opacity: .55;
}
.ohmio-bar--pause-hover:hover .ohmio-announcement-bar__track { animation-play-state: paused; }

@keyframes ohmio-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* WordPress admin toolbar offset for logged-in users. */
body.admin-bar .ohmio-announcement-bar--fixed.ohmio-announcement-bar--header { top: 32px; }

@media (max-width: 782px) {
  body.admin-bar .ohmio-announcement-bar--fixed.ohmio-announcement-bar--header { top: 46px; }
}

@media (max-width: 767px) {
  .ohmio-announcement-bar { font-size: var(--ohmio-bar-size-mobile, 12px); }
  .ohmio-announcement-bar-spacer {
    height: calc((var(--ohmio-bar-size-mobile, 12px) * 1.25) + (var(--ohmio-bar-pad, 10px) * 2));
  }
  .ohmio-announcement-bar__group {
    gap: max(34px, calc(var(--ohmio-bar-gap, 72px) * .65));
    padding-right: max(34px, calc(var(--ohmio-bar-gap, 72px) * .65));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ohmio-announcement-bar__track { animation: none; width: 100%; }
  .ohmio-announcement-bar__group[aria-hidden="true"] { display: none; }
  .ohmio-announcement-bar__group {
    width: 100%;
    min-width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    white-space: normal;
  }
}

/* Optional destination link: makes the entire announcement bar clickable. */
.ohmio-announcement-bar__link {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none !important;
  cursor: pointer;
}
.ohmio-announcement-bar__link:hover,
.ohmio-announcement-bar__link:focus,
.ohmio-announcement-bar__link:visited {
  color: inherit;
  text-decoration: none !important;
}
.ohmio-announcement-bar__link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

/*
 * Theme compatibility: many WordPress themes force uppercase on navigation links.
 * The announcement bar must always respect the casing selected in this plugin,
 * even when the whole bar is wrapped in an <a> element.
 */
.ohmio-announcement-bar,
.ohmio-announcement-bar__link,
.ohmio-announcement-bar__link *,
.ohmio-announcement-bar__message,
.ohmio-announcement-bar__separator {
  text-transform: var(--ohmio-bar-transform, none) !important;
}
