/* FeedZero interactive demo on /cases/feedzero (assets/feedzero-demo.js).
   Left: replica of the extension popup (feedcleaner popup.html + hold-button.css, design "B2 · Ink & Signal").
   Right: a browser with a made-up social network; the feed is hidden while blocking is on. */
.fz-demo {
  --fz-ink: #0F100D;
  --fz-panel: #181A14;
  --fz-line: #2A2D24;
  --fz-text: #EDEFE6;
  --fz-muted: #9A9E90;
  --fz-signal: #C9F24B;
  --fz-pause: #FF7A4D;
  --fz-font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fz-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  margin-top: 56px;
  box-sizing: border-box;
  font-family: var(--fz-font); letter-spacing: normal;
}
.fz-demo *, .fz-demo *::before, .fz-demo *::after { box-sizing: border-box; }
.case-caption + .fz-demo { margin-top: 24px; }

/* Wide rectangle: left column = popup on top, caption under it; right = browser */
.fz-demo--c {
  margin-top: 80px;
  width: min(1152px, calc(100vw - 32px));
  margin-left: calc(50% - min(576px, 50vw - 16px));
  height: 460px; display: flex; align-items: stretch; gap: 40px;
}
.fz-demo__side { flex: none; width: 340px; display: flex; flex-direction: column; gap: 32px; }
.fz-demo__side .fz-popup { width: 100%; }
.fz-demo__caption { font-family: Inter, Arial, sans-serif; font-size: 18px; line-height: 1.2; letter-spacing: -.18px; color: var(--grey, #999); }
.fz-demo__caption b { display: block; font-weight: 700; color: #fff; }
.fz-demo--c .fz-browser { height: auto; }

/* Popup */
.fz-popup {
  flex: none; width: 340px; padding: 24px;
  display: flex; flex-direction: column; gap: 20px;
  background: var(--fz-ink); color: var(--fz-text);
  border: 1px solid var(--fz-line); border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .45);
}
.fz-popup__head { display: flex; flex-direction: column; gap: 6px; }
.fz-popup__title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.fz-popup__title svg { width: 28px; height: 28px; flex: none; }
.fz-popup__sub { font-size: 12px; line-height: 1.35; color: var(--fz-muted); }
.fz-status { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--fz-panel); border-radius: 10px; }
.fz-status__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fz-status__title { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.fz-status__countdown { font-family: var(--fz-mono); font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--fz-pause); }

/* Hold button (same behaviour as hold-button.css: ON = filled, drains on hold; OFF = empty with a running light) */
.fz-hold {
  position: relative; overflow: hidden; width: 100%; height: 44px; padding: 0;
  font: inherit; font-size: 14px; font-weight: 600; color: inherit;
  background: transparent; border: 1px solid var(--fz-line); border-radius: 8px;
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none;
  transition: transform .2s ease-out;
}
.fz-hold:hover { transform: scale(1.03); }
.fz-hold:not(.is-on):hover { background: rgba(237, 239, 230, .04); }
.fz-hold.is-on { border-color: var(--fz-signal); }
.fz-hold:focus-visible { outline: 2px solid var(--fz-signal); outline-offset: 2px; }
.fz-hold__fill {
  position: absolute; top: 0; left: 0; bottom: 0; width: 0;
  background-color: var(--fz-signal); transition: width .3s ease-out; pointer-events: none;
}
.fz-hold.is-on .fz-hold__fill { width: 100%; }
.fz-hold__label {
  position: absolute; inset: 0; z-index: 2; padding: 0 16px; line-height: 42px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fz-text); pointer-events: none;
}
.fz-hold__label--on { color: var(--fz-ink); clip-path: inset(0 100% 0 0); transition: clip-path .3s ease-out; }
.fz-hold.is-on .fz-hold__label--on { clip-path: inset(0 0 0 0); }
.fz-hold.holding .fz-hold__fill, .fz-hold.holding .fz-hold__label--on { transition: none; }
.fz-hold.is-on:not(.holding) { animation: fz-glow 3s ease-in-out infinite; }
.fz-hold.is-on:not(.holding) .fz-hold__fill::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: translateX(-100%); animation: fz-shimmer 3.5s ease-in-out infinite;
}
@keyframes fz-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 242, 75, 0); }
  50% { box-shadow: 0 0 12px 2px rgba(201, 242, 75, .35); }
}
@keyframes fz-shimmer {
  0% { transform: translateX(-100%); }
  30%, 100% { transform: translateX(250%); }
}
@property --fz-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.fz-hold:not(.is-on)::after {
  content: ''; position: absolute; inset: 0; z-index: 3; border-radius: 7px; padding: 2px;
  background: conic-gradient(from var(--fz-angle), transparent 0deg 290deg, rgba(201, 242, 75, .35) 325deg, #C9F24B 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: fz-border 3s linear infinite; pointer-events: none;
}
@keyframes fz-border { to { --fz-angle: 360deg; } }

/* Browser with a made-up social network */
.fz-browser {
  flex: 1; min-width: 0; height: 440px; display: flex; flex-direction: column; overflow: hidden;
  background: #F3F2EF; border-radius: 12px; box-shadow: 0 24px 48px rgba(0, 0, 0, .45);
}
.fz-browser__bar { flex: none; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; background: #DEDCD6; }
.fz-browser__dots { display: flex; gap: 6px; }
.fz-browser__dots span { width: 10px; height: 10px; border-radius: 50%; background: #B9B6AE; }
.fz-browser__url {
  flex: 1; height: 24px; padding: 0 12px; border-radius: 12px; background: #F3F2EF;
  font-size: 12px; line-height: 24px; color: #5F5C55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fz-site__top {
  flex: none; display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 20px;
  background: #FFFFFF; border-bottom: 1px solid #E2E0DA; color: #1F1E1B;
}
.fz-site__logo { font-size: 20px; font-weight: 800; letter-spacing: -.03em; color: #2E5BFF; }
.fz-site__search {
  flex: 0 1 260px; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border-radius: 16px; background: #EEECE7; font-size: 13px; color: #6B6862;
}
.fz-site__search svg { width: 14px; height: 14px; flex: none; }
.fz-site__body { flex: 1; min-height: 0; display: flex; gap: 20px; padding: 16px 20px 0; }
.fz-site__nav { flex: none; width: 150px; display: flex; flex-direction: column; gap: 4px; }
.fz-site__nav button {
  padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: #3B3934;
}
.fz-site__nav button:hover { background: rgba(255, 255, 255, .6); }
.fz-site__nav button[aria-current] { background: #FFFFFF; }
.fz-site__nav button:focus-visible { outline: 2px solid #2E5BFF; outline-offset: -2px; }
/* No scrolling inside the demo: content that doesn't fit is clipped, the wheel scrolls the page */
.fz-site__main { position: relative; flex: 1; min-width: 0; overflow: hidden; overflow: clip; }
.fz-tab { position: relative; }

/* Reels: short videos grid (hidden while blocking is on, like the real extension) */
.fz-feed.fz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fz-tile { position: relative; aspect-ratio: 9 / 14; border-radius: 10px; background-size: cover; background-position: center; }
.fz-tile svg { position: absolute; left: 10px; bottom: 10px; width: 18px; height: 18px; }

/* Messages / Notifications: always work */
.fz-list { display: flex; flex-direction: column; background: #FFFFFF; border-radius: 10px; color: #1F1E1B; }
.fz-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.fz-row + .fz-row { border-top: 1px solid #EEECE7; }
.fz-row__body { flex: 1; min-width: 0; }
.fz-row__body .fz-post__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fz-row__time { flex: none; font-size: 12px; color: #77746D; }

/* Profile: always works */
.fz-profile { overflow: hidden; background: #FFFFFF; border-radius: 10px; color: #1F1E1B; }
.fz-profile__info { padding: 20px; }
.fz-profile__avatar { display: block; width: 88px; height: 88px; border-radius: 50%; }
.fz-profile__name { margin-top: 8px; font-size: 20px; font-weight: 700; }
.fz-profile__headline { margin-top: 2px; font-size: 14px; color: #1F1E1B; }
.fz-profile__link { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: #2E5BFF; text-decoration: none; }
.fz-profile__link:hover { color: #1A3FCC; text-decoration: underline; }
.fz-profile__link:focus-visible { outline: 2px solid #2E5BFF; outline-offset: 2px; border-radius: 2px; }
.fz-profile__actions { margin-top: 12px; display: flex; gap: 8px; }
.fz-profile__btn { padding: 6px 16px; border: 1px solid #2E5BFF; border-radius: 16px; font-size: 13px; font-weight: 600; color: #2E5BFF; }
.fz-profile__btn--primary { background: #2E5BFF; color: #FFFFFF; }
.fz-profile .fz-post__text { margin-top: 14px; color: #77746D; }

.fz-feed { display: flex; flex-direction: column; gap: 12px; transition: opacity .35s ease-out, transform .35s ease-out; }
.fz-post { padding: 14px; background: #FFFFFF; border-radius: 10px; color: #1F1E1B; }
.fz-post__head { display: flex; align-items: center; gap: 10px; }
.fz-post__avatar { display: block; width: 34px; height: 34px; flex: none; border-radius: 50%; object-fit: cover; }
.fz-post__name { font-size: 14px; font-weight: 700; }
.fz-post__meta { font-size: 12px; color: #77746D; }
.fz-post__text { margin-top: 10px; font-size: 14px; line-height: 1.4; }
.fz-post__media { display: block; width: 100%; margin-top: 10px; height: 150px; border-radius: 8px; object-fit: cover; }

/* Blocked: the feed is gone, the real FeedZero placeholder takes its place */
.fz-placeholder {
  position: absolute; inset: 0 0 auto 0; padding: 16px 12px; border-radius: 6px;
  font-size: 20px; font-weight: 600; line-height: 1.3; color: #1F1E1B;
  opacity: 0; transition: opacity .35s ease-out; pointer-events: none;
}
.fz-placeholder small { display: block; margin-top: 8px; font-size: 12px; font-weight: 400; opacity: .75; }
/* Hidden feed takes no height, so the blocked page has nothing to scroll */
.fz-demo.is-blocked .fz-feed { height: 0; overflow: hidden; opacity: 0; transform: translateY(8px); visibility: hidden; }
.fz-demo.is-blocked .fz-placeholder { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .fz-hold.is-on:not(.holding) { animation: none; }
  .fz-hold.is-on:not(.holding) .fz-hold__fill::after, .fz-hold:not(.is-on)::after { display: none; }
  .fz-hold, .fz-hold__fill, .fz-hold__label--on, .fz-feed, .fz-placeholder { transition: none; }
}

@media (max-width: 809.98px) {
  .fz-demo--c { width: 100%; height: auto; margin-left: 0; flex-direction: column; gap: 24px; }
  .fz-demo__side { width: 100%; align-items: center; gap: 24px; }
  .fz-demo__caption { align-self: stretch; }
  .fz-demo .fz-popup { position: static; width: 100%; max-width: 340px; padding: 24px; gap: 20px; align-self: center; }
  .fz-demo .fz-browser { flex: none; height: 460px; }
  .fz-row { padding: 8px 12px; }
  .fz-profile__info { padding: 16px; }
  .fz-profile__avatar { width: 56px; height: 56px; }
  .fz-profile .fz-post__text { display: none; }
  .fz-site__body { flex-direction: column; gap: 10px; padding: 10px 12px 0; }
  .fz-demo .fz-site__nav { width: auto; flex-direction: row; flex-wrap: wrap; gap: 2px; }
  .fz-site__nav button { flex: none; padding: 6px 9px; font-size: 13px; }
  .fz-site__top { gap: 12px; padding: 0 12px; }
}

/* ===== Platforms: browser tabs switch the site and show what FeedZero hides there ===== */
.fz-platforms + .fb-add { margin-top: 64px; }
.fz-platforms { margin-top: 24px; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.fz-pbrowser { margin-top: 16px; overflow: hidden; background: #F3F2EF; border-radius: 12px; box-shadow: 0 24px 48px rgba(0, 0, 0, .45); }
.fz-pbrowser__body { padding: 18px 20px 22px; color: #1F1E1B; }
.fz-pbrowser__site { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid #E2E0DA; }
.fz-pbrowser__logo { width: 28px; height: 28px; }
.fz-pbrowser__name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.fz-pbrowser__cols { margin-top: 16px; display: flex; gap: 20px; }
.fz-pbrowser__ph { flex: 1; min-width: 0; padding: 18px 16px; background: #FFFFFF; border-radius: 10px; font-size: 20px; font-weight: 600; line-height: 1.3; }
.fz-pbrowser__mark { display: block; }
.fz-pbrowser__ph small { display: block; margin-top: 8px; font-size: 12px; font-weight: 400; opacity: .75; }
.fz-pbrowser__lists { flex: none; width: 220px; display: flex; flex-direction: column; gap: 14px; }
.fz-pbrowser__label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #77746D; }
.fz-pbrowser__list { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.fz-pbrowser__list li { padding: 4px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.fz-pbrowser__list--hidden li { background: #FDE3DC; color: #A33A1F; text-decoration: line-through; }
.fz-pbrowser__list--works li { background: #E2F2D6; color: #2F6B16; }

@media (max-width: 809.98px) {
  .fz-pbrowser__cols { flex-direction: column; }
  .fz-pbrowser__lists { width: auto; }
}

/* Sites are tabs in the browser's top bar */
.fz-ptabs { display: flex; gap: 2px; padding: 8px 8px 0; background: #DEDCD6; }
.fz-ptab {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 6px; border: 0; border-radius: 8px 8px 0 0; background: transparent; cursor: pointer;
  font-family: Inter, Arial, sans-serif; font-size: 13px; font-weight: 600; color: #4A4843;
}
.fz-ptab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fz-ptab img { width: 16px; height: 16px; flex: none; }
.fz-ptab:hover { background: rgba(255, 255, 255, .45); }
.fz-ptab[aria-pressed="true"] { background: #F3F2EF; color: #1F1E1B; }
.fz-ptab:focus-visible { outline: 2px solid #2E5BFF; outline-offset: -2px; }
.fz-platforms--tabs .fz-browser__bar { background: #F3F2EF; height: 40px; }
.fz-platforms--tabs .fz-browser__dots { display: none; }
.fz-platforms--tabs .fz-browser__url { background: #E7E5DF; }

@media (max-width: 809.98px) {
  .fz-ptab span { display: none; }
}
