/**
 * Reusable meta bar: last updated (left) + WeatherFile brand link (right).
 * Use placement modifiers on the host element; optional --sticky-top for scrollable widgets.
 */
.wf-widget-meta-bar {
  width: 100%;
  max-width: min(520px, 100%);
  box-sizing: border-box;
}

.wf-widget-meta-bar--after-content {
  margin-top: clamp(8px, 2vw, 14px);
}

.wf-widget-meta-bar--before-content {
  margin-bottom: clamp(6px, 1.5vw, 12px);
}

.wf-widget-meta-bar--sticky-top {
  position: sticky;
  top: 0;
  z-index: 5;
  align-self: stretch;
  max-width: 100%;
}

.wf-widget-meta-bar__strip,
a.wf-widget-meta-bar__strip.wf-widget-meta-bar__strip-link {
  --wf-meta-brand-h: clamp(22px, 6vw, 30px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 2vw, 16px) clamp(10px, 2.5vw, 18px);
  padding: clamp(8px, 2vw, 12px) clamp(10px, 2.5vw, 16px);
  font-size: clamp(11px, 2.8vw, 13px);
  line-height: 1.4;
  border-radius: 4px;
}

a.wf-widget-meta-bar__strip.wf-widget-meta-bar__strip-link {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/** FRA* locations: Alliance logo scales a touch larger in the strip */
.wf-widget-meta-bar--alliance .wf-widget-meta-bar__strip-link {
  --wf-meta-brand-h: clamp(20px, 7vw, 36px);
}

/** WeatherFile blue — white “Last updated” text + rpr-logo-white.png */
.wf-widget-meta-bar__strip--preset-blue {
  background: #000099;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.wf-widget-meta-bar__strip--preset-blue .wf-widget-meta-bar__label,
.wf-widget-meta-bar__strip--preset-blue .wf-widget-meta-bar__time,
.wf-widget-meta-bar__strip--preset-blue .wf-widget-meta-bar__wordmark {
  color: #fff;
}

.wf-widget-meta-bar__strip--preset-blue .wf-widget-meta-bar__updated--muted {
  color: #d4d4f0;
}

/** White bar — dark text + rpr-logo-blue.png */
.wf-widget-meta-bar__strip--preset-white {
  background: #ffffff;
  color: #000099;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.wf-widget-meta-bar__strip--preset-white .wf-widget-meta-bar__label,
.wf-widget-meta-bar__strip--preset-white .wf-widget-meta-bar__time,
.wf-widget-meta-bar__strip--preset-white .wf-widget-meta-bar__wordmark {
  color: #000099;
}

.wf-widget-meta-bar__strip--preset-white .wf-widget-meta-bar__updated--muted {
  color: #4a4a6a;
}

.wf-widget-meta-bar__left {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.wf-widget-meta-bar__right {
  flex: 0 0 auto;
  text-align: right;
}

.wf-widget-meta-bar__label {
  font-weight: 600;
  margin-right: 4px;
}

.wf-widget-meta-bar__time {
  font-variant-numeric: tabular-nums;
}

.wf-widget-meta-bar__brand {
  --wf-meta-brand-h: clamp(22px, 6vw, 30px);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(8px, 2vw, 14px);
  line-height: 1;
  text-decoration: none;
  border-bottom: none;
  color: inherit;
  cursor: pointer;
}

/** Shared row height on brand so logo + wordmark align on one line */
.wf-widget-meta-bar__logo {
  display: block;
  flex-shrink: 0;
  height: var(--wf-meta-brand-h);
  width: auto;
  max-height: var(--wf-meta-brand-h);
  object-fit: contain;
  object-position: center center;
}

.wf-widget-meta-bar__wordmark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: var(--wf-meta-brand-h);
  margin: 0;
  padding: 0;
  font-size: clamp(15px, 4vw, 22px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/** Tighter strip (optional; WeatherMetrics top bar) */
.wf-widget-meta-bar--compact .wf-widget-meta-bar__strip,
.wf-widget-meta-bar--compact .wf-widget-meta-bar__strip-link {
  padding: clamp(5px, 1.2vw, 8px) clamp(8px, 1.8vw, 12px);
  gap: clamp(4px, 1.2vw, 8px) clamp(8px, 2vw, 12px);
  font-size: clamp(10px, 2.5vw, 12px);
  line-height: 1.35;
}

.wf-widget-meta-bar--compact .wf-widget-meta-bar__brand {
  --wf-meta-brand-h: clamp(18px, 5vw, 26px);
}

.wf-widget-meta-bar--compact .wf-widget-meta-bar__brand {
  gap: clamp(6px, 1.5vw, 10px);
}

.wf-widget-meta-bar--compact.wf-widget-meta-bar--alliance .wf-widget-meta-bar__strip-link {
  --wf-meta-brand-h: clamp(18px, 6vw, 28px);
}

.wf-widget-meta-bar--compact .wf-widget-meta-bar__wordmark {
  font-size: clamp(13px, 3.2vw, 18px);
  font-weight: 800;
  letter-spacing: 0.035em;
}

/** Hide wordmark on narrow viewports (RPR + WEATHER FILE only; Alliance strip has no wordmark) */
@media (max-width: 350px) {
  .wf-widget-meta-bar:not(.wf-widget-meta-bar--alliance) .wf-widget-meta-bar__wordmark {
    display: none;
  }
}

@media (max-width: 400px) {
  .wf-widget-meta-bar__strip,
  .wf-widget-meta-bar__strip-link {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .wf-widget-meta-bar__left,
  .wf-widget-meta-bar__right {
    text-align: center;
    justify-content: center;
  }

  .wf-widget-meta-bar__right {
    display: flex;
    justify-content: center;
  }

  /** Opt in: keep one row on narrow screens (ellipsis on “last updated”) */
  .wf-widget-meta-bar--single-row-narrow .wf-widget-meta-bar__strip,
  .wf-widget-meta-bar--single-row-narrow .wf-widget-meta-bar__strip-link {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .wf-widget-meta-bar--single-row-narrow .wf-widget-meta-bar__left {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
  }

  .wf-widget-meta-bar--single-row-narrow .wf-widget-meta-bar__right {
    flex: 0 0 auto;
    text-align: right;
    display: block;
  }

  .wf-widget-meta-bar--single-row-narrow .wf-widget-meta-bar__updated {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}