
/* Theme font adoption: inherit the active WordPress theme typography. */
.smtm-auto-mount,
.smtm-auto-mount .smtm-marquee,
.smtm-auto-mount .smtm-marquee *,
.smtm-marquee,
.smtm-marquee * {
  font-family: var(--wp--preset--font-family--base, inherit);
}

.smtm-marquee {
  font-weight: inherit;
  font-style: inherit;
  letter-spacing: inherit;
  text-rendering: inherit;
}
:root {
  --smtm-bg: var(--wp--preset--color--base, var(--wp--preset--color--background, transparent));
  --smtm-text: var(--wp--preset--color--contrast, currentColor);
  --smtm-muted: color-mix(in srgb, currentColor 58%, transparent);
  --smtm-border: color-mix(in srgb, currentColor 14%, transparent);
  --smtm-up: #16803c;
  --smtm-down: #c62828;
}

.smtm-marquee {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--smtm-bg);
  color: var(--smtm-text);
  border-top: 1px solid var(--smtm-border);
  border-bottom: 1px solid var(--smtm-border);
  line-height: 1.25;
  isolation: isolate;
}

.smtm-track {
  display: flex;
  width: max-content;
  min-height: 42px;
  align-items: stretch;
  will-change: transform;
}

.smtm-track.smtm-animate {
  animation: smtm-scroll var(--smtm-duration, 32s) linear infinite;
}

.smtm-track.smtm-right {
  animation-name: smtm-scroll-right;
}

.smtm-marquee:hover .smtm-track.smtm-pause,
.smtm-marquee:focus-within .smtm-track.smtm-pause {
  animation-play-state: paused;
}

.smtm-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-right: 1px solid var(--smtm-border);
  white-space: nowrap;
  min-height: 42px;
  box-sizing: border-box;
}

.smtm-symbol {
  font-weight: 700;
  letter-spacing: .01em;
}

.smtm-name {
  opacity: .68;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smtm-price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.smtm-change {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.smtm-up { color: var(--smtm-up); }
.smtm-down { color: var(--smtm-down); }
.smtm-flat { opacity: .7; }

.smtm-time {
  font-size: .78em;
  opacity: .55;
  margin-left: 6px;
}

.smtm-loading,
.smtm-error {
  padding: 12px 16px;
  opacity: .7;
}

.smtm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}

@keyframes smtm-scroll {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(-50%,0,0); }
}
@keyframes smtm-scroll-right {
  from { transform: translate3d(-50%,0,0); }
  to { transform: translate3d(0,0,0); }
}

@media (prefers-reduced-motion: reduce) {
  .smtm-track.smtm-animate { animation: none !important; }
}

@media (max-width: 640px) {
  .smtm-item { padding: 7px 11px; gap: 6px; }
  .smtm-name { display: none; }
  .smtm-track, .smtm-item { min-height: 38px; }
}

.smtm-auto-mount { width: 100%; }
.smtm-auto-mount .smtm-marquee { width: 100%; }


/* Manual pause/resume control */
.smtm-pause-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 4px 9px;
  border: 1px solid var(--smtm-border);
  border-radius: 4px;
  background: var(--smtm-bg);
  color: inherit;
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
}
.smtm-marquee { position: relative; padding-right: 70px; }
.smtm-marquee.smtm-is-paused .smtm-track { animation-play-state: paused !important; }
@media (max-width: 640px) {
  .smtm-marquee { padding-right: 64px; }
  .smtm-pause-toggle { right: 5px; padding: 3px 7px; }
}
