/* CITY PIXELS STEP 151B LIVE CONNECTION REFRESH - 2026-07-22 */

.pixel-stream-main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.pixel-stream-loading,
.pixel-stream-signed-out {
  min-height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: left;
}

.pixel-stream-signed-out {
  flex-direction: column;
  text-align: center;
}

.pixel-stream-shell {
  display: grid;
  gap: 24px;
}

.pixel-stream-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 34px;
}

.pixel-stream-hero h1,
.pixel-stream-feed h2,
.pixel-stream-signal-panel h2,
.pixel-stream-signed-out h1 {
  margin: 8px 0 12px;
}

.pixel-stream-hero-count {
  width: 190px;
  min-height: 150px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(74, 237, 255, 0.42);
  border-radius: 22px;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(74, 237, 255, 0.18),
      transparent 58%
    ),
    rgba(4, 10, 25, 0.82);
  box-shadow:
    inset 0 0 30px rgba(74, 237, 255, 0.08),
    0 0 26px rgba(74, 237, 255, 0.09);
}

.pixel-stream-hero-count strong {
  display: block;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 0.95;
  color: #ffffff;
  text-shadow:
    0 0 18px rgba(74, 237, 255, 0.48);
}

.pixel-stream-hero-count span {
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #8feeff;
}

.pixel-stream-signal-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 28px;
}

.pixel-stream-signal-panel p {
  margin: 0;
  max-width: 760px;
  color: #b8c4d8;
}

.pixel-stream-feed {
  padding: 28px;
}

.pixel-stream-feed-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}


.pixel-stream-feed-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-align: right;
}

.pixel-stream-refresh-note {
  display: block;
  margin-top: 7px;
  color: #8491a6;
  font-size: 0.72rem;
  font-weight: 700;
}

.pixel-stream-refresh {
  min-width: 138px;
  white-space: nowrap;
}

.pixel-stream-refresh.is-refreshing {
  cursor: wait;
  opacity: 0.74;
}

.pixel-stream-filter-status {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #aeb9cb;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pixel-stream-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.pixel-stream-filter {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.035);
  color: #c5cede;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.pixel-stream-filter:hover,
.pixel-stream-filter:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(74, 237, 255, 0.6);
  color: #ffffff;
}

.pixel-stream-filter.is-active {
  border-color: rgba(74, 237, 255, 0.78);
  background: rgba(74, 237, 255, 0.14);
  color: #ffffff;
  box-shadow:
    0 0 20px rgba(74, 237, 255, 0.1);
}

.pixel-stream-filter span {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 22px;
  margin-left: 7px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.26);
  color: #8feeff;
  font-size: 0.72rem;
}

.pixel-stream-message {
  margin-top: 18px;
}

.pixel-stream-list {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.pixel-stream-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 20px;
  background:
    linear-gradient(
      135deg,
      rgba(13, 22, 44, 0.93),
      rgba(6, 11, 27, 0.94)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.pixel-stream-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background:
    linear-gradient(
      to bottom,
      #48ecff,
      #b769ff
    );
  opacity: 0.78;
}

.pixel-stream-card-copy {
  min-width: 0;
}

.pixel-stream-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pixel-stream-reason {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(74, 237, 255, 0.24);
  border-radius: 999px;
  background: rgba(74, 237, 255, 0.065);
  color: #9ef3ff;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.075em;
  text-decoration: none;
  text-transform: uppercase;
}

.pixel-stream-reason[data-type="story_trail"] {
  border-color: rgba(183, 105, 255, 0.34);
  background: rgba(183, 105, 255, 0.09);
  color: #d7b5ff;
}

.pixel-stream-reason[data-type="pixel_pin"] {
  border-color: rgba(255, 205, 77, 0.38);
  background: rgba(255, 205, 77, 0.09);
  color: #ffe08a;
}

.pixel-stream-reason:hover,
.pixel-stream-reason:focus-visible {
  border-color: currentColor;
  color: #ffffff;
}

.pixel-stream-card h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.78rem);
}

.pixel-stream-card h3 a {
  color: #ffffff;
  text-decoration: none;
}

.pixel-stream-card h3 a:hover,
.pixel-stream-card h3 a:focus-visible {
  color: #8feeff;
}

.pixel-stream-byline {
  margin: 9px 0 0;
  color: #9faabd;
  font-size: 0.88rem;
}

.pixel-stream-byline a {
  color: #d4d9e4;
  font-weight: 800;
  text-decoration: none;
}

.pixel-stream-summary {
  margin: 15px 0 0;
  max-width: 820px;
  color: #c0c9d8;
  line-height: 1.7;
}

.pixel-stream-metadata,
.pixel-stream-engagement {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
  color: #8e9aaf;
  font-size: 0.78rem;
  font-weight: 700;
}

.pixel-stream-metadata a {
  color: #a9c8ff;
  text-decoration: none;
}

.pixel-stream-engagement {
  margin-top: 10px;
}

.pixel-stream-reader-state {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pixel-stream-reader-state span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #b8c4d8;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pixel-stream-reader-state .is-all-props {
  background: rgba(183, 105, 255, 0.12);
  color: #debfff;
}

.pixel-stream-card-actions {
  min-width: 156px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.pixel-stream-card-actions .btn {
  white-space: nowrap;
}

.pixel-stream-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 48px 24px;
  border: 1px dashed rgba(255, 255, 255, 0.17);
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.025);
}

.pixel-stream-empty-mark {
  font-size: 2rem;
  color: #8feeff;
  text-shadow:
    0 0 18px rgba(74, 237, 255, 0.48);
}

.pixel-stream-empty strong {
  font-size: 1.18rem;
}

.pixel-stream-empty span {
  max-width: 650px;
  color: #9eabba;
  line-height: 1.65;
}

.pixel-stream-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.pixel-stream-load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 24px;
}

@media (max-width: 820px) {
  .pixel-stream-hero {
    grid-template-columns: 1fr;
  }

  .pixel-stream-hero-count {
    width: 100%;
    min-height: 120px;
  }

  .pixel-stream-signal-panel,
  .pixel-stream-feed-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .pixel-stream-feed-tools {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
  }

  .pixel-stream-card {
    grid-template-columns: 1fr;
  }

  .pixel-stream-card-actions {
    justify-content: flex-start;
  }
}

/*
 * STEP 151A VISIBILITY CORRECTION
 * Several Pixel Stream components use the HTML hidden attribute while their
 * normal CSS rules define display:flex or display:grid. This explicit rule
 * guarantees that loading, signed-out, empty, message, shell, and load-more
 * sections stay hidden until pixel-stream.js intentionally reveals them.
 */
.pixel-stream-main [hidden] {
  display: none !important;
}
