/* weather-widget.css — newsp-hybrid v3.1
 * Styles for the .wx-container weather ticker bar.
 * Companion to weather-widget.js
 */

/* ── Outer bar (set by navbar wrapper) ── */
.wx-navbar-bar {
  width: 100%;
  border-bottom: 1px solid var(--border-color, rgba(0,0,0,.08));
  padding: 3px 0;
  background: var(--navbar-bg, var(--bg-color, var(--background-color, #fff)));
  overflow: hidden;
}

/* ── Scroll container ── */
.wx-container {
  width: 100%;
  overflow: hidden;
  background: transparent;
  position: relative;
  max-height: 34px;
  /* Fade edges */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 3%,
    black 97%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 3%,
    black 97%,
    transparent 100%
  );
}

/* ── Scrolling strip ── */
.wx-strip {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: wx-scroll 60s linear infinite;
  will-change: transform;
}

.wx-strip.wx-paused {
  animation-play-state: paused;
}

@keyframes wx-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Location pin ── */
.wx-location {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 18px 0 8px;
  font-family: var(--font1, sans-serif);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-color, inherit);
  opacity: .7;
  white-space: nowrap;
  border-right: 1px solid var(--border-color, rgba(0,0,0,.12));
  margin-right: 8px;
  flex-shrink: 0;
}

/* ── Day card ── */
.wx-card {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  border-right: 1px solid var(--border-color, rgba(0,0,0,.1));
  white-space: nowrap;
  flex-shrink: 0;
  cursor: default;
  transition: background .2s ease;
}

.wx-card:hover {
  background: var(--hover-bg, rgba(0,0,0,.04));
}

.wx-day {
  font-family: var(--font1, sans-serif);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-color, inherit);
  opacity: .6;
  min-width: 46px;
}

.wx-icon {
  font-size: 14px;
  line-height: 1;
}

.wx-desc {
  font-family: var(--font2, serif);
  font-size: 11px;
  color: var(--text-color, inherit);
  opacity: .75;
  min-width: 80px;
}

.wx-temps {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font1, sans-serif);
  font-size: 11px;
  font-weight: 600;
}

.wx-hi  { color: var(--brand-g1, #F545A2); }
.wx-sep { color: var(--text-color, inherit); opacity: .35; font-size: 10px; }
.wx-lo  { color: var(--brand-g4, #5E9DBA); }

/* ── Loading dots ── */
.wx-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 0;
  height: 28px;
}

.wx-loading-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-color, #888);
  opacity: .3;
  animation: wx-dot-pulse 1.2s ease-in-out infinite;
}

.wx-loading-dot:nth-child(2) { animation-delay: .2s; }
.wx-loading-dot:nth-child(3) { animation-delay: .4s; }

@keyframes wx-dot-pulse {
  0%, 80%, 100% { opacity: .3; transform: scale(.8); }
  40%           { opacity: 1;  transform: scale(1.2); }
}

/* ── Dark theme ── */
html[data-theme="dark"] .wx-card:hover {
  background: rgba(255,255,255,.05);
}

html[data-theme="dark"] .wx-location,
html[data-theme="dark"] .wx-day,
html[data-theme="dark"] .wx-desc {
  color: var(--text-color, #e0e0e0);
}

html[data-theme="dark"] .wx-card {
  border-right-color: rgba(255,255,255,.1);
}

html[data-theme="dark"] .wx-location {
  border-right-color: rgba(255,255,255,.15);
}

html[data-theme="dark"] .wx-navbar-bar {
  background: var(--background-color, #111);
  border-bottom-color: rgba(255,255,255,.08);
}

/* ── Satire theme overrides ── */
.theme-satire .wx-hi { color: var(--satire-accent, #ff6b9d); }
.theme-satire .wx-lo { color: var(--satire-body,   #a0e0a0); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .wx-strip {
    animation: none;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: thin;
  }
  .wx-loading-dot {
    animation: none;
    opacity: .5;
  }
}

/* ── Responsive ── */
@media (max-width: 767px) {
  .wx-desc { display: none; }
}

@media (max-width: 479px) {
  .wx-navbar-bar { display: none; }
}
