.status-content {
  display: grid;
  gap: 2px;
  padding: 4px;
}

/* Twitch status */
.twitch-status {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 4px;
}

.twitch-picture {
  position: relative;
}

.twitch-picture img {
  display: block;
  width: 100%;
  clip-path: var(--stepped-corners);
}

/* Pulsing red outline while live. */
.twitch-status[data-status="live"] .twitch-picture::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid transparent;
  border-image: url("../assets/textures/panel_outline.png") 4 fill;
  filter: brightness(0) saturate(100%) invert(19%) sepia(100%) saturate(6500%) hue-rotate(350deg) brightness(110%) contrast(125%);
  animation: live-pulse 1.8s ease-in-out infinite;
}

@keyframes live-pulse {
  50% { opacity: 0.4; }
}

.twitch-details {
  min-width: 0;
  font-family: "TinyPixel", "Mona", monospace;
  font-size: 7px;
  line-height: 10px;
  color: #c5c5cd;
  overflow-wrap: anywhere;
}

.twitch-details > strong,
.twitch-details > span {
  display: block;
}

#stream-status {
  font-weight: 400;
  color: #a6a6ae;
}

.twitch-status[data-status="live"] #stream-status {
  color: #ff1744;
}

.twitch-status[data-status="unknown"] #stream-status {
  color: #eabf4b;
}

.twitch-status:not([data-status="live"]) :is(#stream-duration, #stream-viewers) {
  display: none;
}

/* Long titles scroll: the title is shown twice and the pair slides left by one copy. */
.twitch-title {
  overflow: hidden;
}

.twitch-title-track {
  display: flex;
  width: max-content;
}

.twitch-title-track > span {
  margin-right: 12px;
  white-space: nowrap;
}

.twitch-title:not([data-scrolling]) #stream-title-copy {
  display: none;
}

.twitch-title[data-scrolling] .twitch-title-track {
  animation: title-scroll 18s linear infinite;
}

@keyframes title-scroll {
  to { transform: translateX(-50%); }
}

/* Social icons */
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 2px;
  padding: 2px 0;
}

.social-links a {
  filter: grayscale(1);
  opacity: 0.7;
}

.social-links img {
  display: block;
  width: 12px;
}

.social-links a:hover {
  filter: none;
  opacity: 1;
}

/* One-pixel white outline: four stacked shadows spread the icon by 1px in every direction. */
.social-links a:hover img {
  filter: drop-shadow(1px 0 #fff) drop-shadow(-1px 0 #fff) drop-shadow(0 1px #fff) drop-shadow(0 -1px #fff);
}

/* Firefox: see the note at the end of style.css. */
@supports (-moz-appearance: none) {
  .twitch-status[data-status="live"] .twitch-picture::after {
    zoom: calc(1 / var(--site-scale));
    border-width: calc(4px * var(--site-scale));
  }
}
