/* Silo — launch promo card.
   One announcement, docked bottom-right in the app's own paper: logo chip,
   headline, one line of copy, and a close that retires it for good
   (js/silo-promo.js remembers the dismissal in localStorage).
   Sits UNDER the toast layer so receipts always outrank marketing. */

.silo-promo {
  --pr-paper: #fcfcfb;
  --pr-line: rgba(23, 24, 26, 0.07);
  --pr-text: #17181a;
  --pr-muted: #7c848c;
  --pr-dim: #9aa1a9;
  --pr-chip: #ededec;
  --pr-accent: #c04476;
  --pr-accent-soft: #fbe9f0;
  --pr-wash: #fdf0f5;
  --pr-bar: rgba(224, 68, 124, 0.12);
  --pr-shadow: 0 14px 40px rgba(23, 24, 26, 0.14), 0 2px 8px rgba(23, 24, 26, 0.06);

  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10100;
  width: min(312px, calc(100vw - 28px));
  padding: 15px 16px 14px;
  border: 1px solid var(--pr-line);
  border-radius: 18px;
  corner-shape: squircle;
  overflow: hidden;
  /* a soft accent wash rising from the corner the bins sit in */
  background: linear-gradient(320deg, var(--pr-wash) 0%, var(--pr-paper) 58%);
  color: var(--pr-text);
  box-shadow: var(--pr-shadow);
  font-family: inherit;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}
.silo-promo[data-state="entering"] {
  opacity: 0;
  transform: translateY(18px) scale(0.97);
}
.silo-promo[data-state="leaving"] {
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: transform 0.2s cubic-bezier(0.4, 0, 1, 1), opacity 0.17s ease;
}

/* the bin model, faint, rising out of the corner — the product's own mark */
.silo-promo-art {
  position: absolute;
  right: 14px;
  bottom: -4px;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 118px;
  height: 84px;
  pointer-events: none;
}
.silo-promo-art i {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: var(--pr-bar);
}
.silo-promo-art i:nth-child(1) { height: 22%; }
.silo-promo-art i:nth-child(2) { height: 40%; }
.silo-promo-art i:nth-child(3) { height: 62%; }
.silo-promo-art i:nth-child(4) { height: 82%; }
.silo-promo-art i:nth-child(5) { height: 100%; }
/* content rides above the art; the close keeps its own absolute corner */
.silo-promo > :not(.silo-promo-art):not(.silo-promo-close) { position: relative; }
.silo-promo-close { z-index: 1; }

.silo-promo-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 14px;
  corner-shape: squircle;
  background: var(--pr-accent-soft);
}
.silo-promo-logo img {
  width: 28px;
  height: 28px;
  display: block;
}

.silo-promo-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pr-dim);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.silo-promo-close:hover { background: var(--pr-chip); color: var(--pr-text); }
.silo-promo-close svg { width: 11px; height: 11px; display: block; }
.silo-promo-close:focus-visible {
  outline: 2px solid var(--pr-accent);
  outline-offset: 1px;
}

.silo-promo-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.silo-promo-copy {
  margin: 4px 0 0;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--pr-muted);
}
.silo-promo-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  color: var(--pr-accent);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
}
.silo-promo-link:hover { text-decoration: underline; }
.silo-promo-link svg { width: 11px; height: 11px; }

/* ---------- dark ---------- */
html[data-silo-theme="dark"] .silo-promo {
  --pr-paper: #1d1f23;
  --pr-line: rgba(255, 255, 255, 0.09);
  --pr-text: #f2f3f5;
  --pr-muted: #9aa1ab;
  --pr-dim: #70767f;
  --pr-chip: #2a2d32;
  --pr-accent: #ff8fb3;
  --pr-accent-soft: rgba(245, 13, 180, 0.12);
  --pr-wash: #2a2028;
  --pr-bar: rgba(255, 128, 171, 0.13);
  --pr-shadow: 0 16px 44px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
}

@media (max-width: 560px) {
  .silo-promo {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .silo-promo,
  .silo-promo[data-state="leaving"] { transition: opacity 0.12s linear; }
  .silo-promo[data-state="entering"] { transform: none; }
}
