/* Forms product page (/form-builder) — the page's own mock-ups. Shared layout is
   static/css/product.css (ADR-0088). Classes fm-. */
.fm-q { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.fm-q small { font-size: .68rem; font-weight: 600; color: #6b7487; }
.fm-input { display: block; height: 28px; border-radius: 7px; border: 1px solid #e3e7ee; background: #fafbfd; font-size: .74rem; padding: 6px 9px; color: #1d2433; }
.fm-input.short { width: 55%; } .fm-input.tall { height: 46px; }
.fm-stars { color: #f59e0b; letter-spacing: 2px; font-size: .95rem; }
.fm-radios { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-radios span { font-size: .7rem; padding: 5px 10px; border-radius: 999px; border: 1px solid #e3e7ee; background: #fff; color: #4b5568; }
.fm-radios span.on { border-color: #0c64ae; background: #eaf2fb; color: #0c64ae; font-weight: 600; }

/* 1 — the designer */
.fm-designer { width: 290px; display: grid; grid-template-columns: 96px 1fr; gap: 10px; background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 12px 30px rgba(16, 24, 40, .1); }
.fm-palette { display: grid; gap: 5px; align-content: start; }
.fm-palette span { display: flex; align-items: center; gap: 6px; font-size: .64rem; font-weight: 600; color: #4b5568; padding: 6px 7px; border-radius: 6px; background: #f1f3f8; }
.fm-palette i { color: #0c64ae; --fa-primary-color: #0c64ae; --fa-secondary-color: #7aa7f0; width: 12px; }
.fm-canvas { border: 1px dashed #d8dce5; border-radius: 8px; padding: 10px; background: #fcfdff; }
.fm-ghost { border-radius: 8px; padding: 6px 8px; margin: 0 -4px; background: #fff; box-shadow: 0 10px 24px rgba(12, 100, 174, .22); border: 1.5px solid #7aa7f0;
  transform: translate(-40px, 30px) rotate(-4deg); opacity: 0; }
.pp-card.in .fm-ghost { animation: fmDrop 3.4s .5s ease-in-out infinite; }
@keyframes fmDrop { 0% { opacity: 0; transform: translate(-90px, 20px) rotate(-6deg); } 15% { opacity: 1; }
  45%, 85% { opacity: 1; transform: none; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); border-color: #e3e7ee; } 100% { opacity: 0; transform: none; } }

/* 2 — logic */
.fm-logic { width: 270px; background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 12px 30px rgba(16, 24, 40, .1); }
.fm-rule { display: flex; align-items: center; gap: 7px; margin: 4px 0 10px; padding: 7px 9px; border-radius: 8px; background: #f3effd; color: #6d28d9; font-size: .66rem; font-weight: 600; }
.fm-reveal { opacity: 0; transform: translateY(-6px); max-height: 0; overflow: hidden; margin-bottom: 0; transition: opacity .5s, transform .5s, max-height .5s; transition-delay: .9s; }
.pp-card.in .fm-reveal { opacity: 1; transform: none; max-height: 80px; }

/* 3 — share */
.fm-share { width: 280px; display: grid; gap: 12px; }
.fm-link { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #fff; box-shadow: 0 8px 22px rgba(16, 24, 40, .09); font-size: .74rem; color: #4b5568; }
.fm-link i { color: #0c64ae; }
.fm-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: .7rem; }
.fm-link b { margin-left: auto; font-size: .7rem; color: #fff; background: #0c64ae; padding: 4px 10px; border-radius: 6px; flex: none; }
.fm-sent { background: #fff; border-radius: 12px; padding: 6px 12px; box-shadow: 0 8px 22px rgba(16, 24, 40, .09); }
.fm-sent-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: .76rem; border-bottom: 1px solid #f2f3f7;
  opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s; transition-delay: calc(var(--i) * 180ms + .4s); }
.fm-sent-row:last-child { border-bottom: 0; }
.pp-card.in .fm-sent-row { opacity: 1; transform: none; }
.fm-chip { margin-left: auto; font-size: .62rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #dcfce7; color: #15803d; white-space: nowrap; }

/* 4 — response PDF */
.fm-pdf { width: 240px; background: #fff; border-radius: 6px; padding: 16px; box-shadow: 0 14px 34px rgba(16, 24, 40, .12); position: relative; }
.fm-pdf::after { content: ""; position: absolute; top: 0; right: 0; border-width: 0 22px 22px 0; border-style: solid; border-color: #ecebf1 #ecebf1 #dfe3ec #dfe3ec; }
.fm-pdf-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 2px solid #0c64ae; font-size: .82rem; }
.fm-pdf-head span { font-size: .58rem; font-weight: 800; color: #fff; background: #dc2626; padding: 2px 6px; border-radius: 4px; margin-right: 18px; }
.fm-pdf-row { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid #f2f3f7; font-size: .76rem;
  opacity: 0; transition: opacity .4s; transition-delay: calc(var(--i) * 120ms + .3s); }
.fm-pdf-row small { font-size: .62rem; color: #8a93a4; }
.pp-card.in .fm-pdf-row { opacity: 1; }

/* 5 — responses table */
.fm-table { width: 280px; background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(16, 24, 40, .1); font-size: .76rem; }
.fm-table-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px solid #eef0f4; }
.fm-csv { font-size: .66rem; font-weight: 700; color: #0d9488; background: #e6f7f5; padding: 4px 9px; border-radius: 6px; }
.fm-table-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f5f6f9;
  opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; transition-delay: calc(var(--i) * 120ms + .3s); }
.fm-table-row .pp-av { width: 26px; height: 26px; font-size: .6rem; }
.fm-table-row small { margin-left: auto; color: #8a93a4; }
.fm-table-row i { color: #dc2626; --fa-primary-color: #dc2626; --fa-secondary-color: #dc2626; }
.pp-card.in .fm-table-row { opacity: 1; transform: none; }

/* 6 — template gallery */
.fm-gallery { width: 280px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fm-tile { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: #fff; box-shadow: 0 6px 16px rgba(16, 24, 40, .08);
  font-size: .62rem; line-height: 1.2; color: #1d2433; opacity: 0; transform: scale(.9); transition: opacity .4s, transform .4s; transition-delay: calc(var(--i) * 90ms + .3s); }
.fm-tile i { display: block; height: 34px; border-radius: 6px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, #fff), color-mix(in srgb, var(--c) 10%, #fff));
  border-top: 3px solid var(--c); }
.pp-card.in .fm-tile { opacity: 1; transform: none; }

/* ---- walkthrough ---- */
.fm-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fm-pick-card { border: 1px solid #e3e7ee; border-radius: 12px; padding: 10px; font-size: .8rem; transition: box-shadow .3s, border-color .3s; }
.fm-pick-art { display: grid; gap: 5px; height: 84px; padding: 10px; border-radius: 8px; margin-bottom: 8px; background: color-mix(in srgb, var(--c) 10%, #fff); border-top: 3px solid var(--c); }
.fm-pick-art i { display: block; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--c) 30%, #fff); }
.fm-pick-art i:nth-child(2) { width: 70%; } .fm-pick-art i:nth-child(3) { width: 45%; }
.pp-scene.on .fm-pick-card { animation: ppRow .4s both; animation-delay: calc(var(--i) * 90ms); }
.pp-scene.on .fm-pick-card.on { animation: fmPicked .6s .8s both; }
@keyframes fmPicked { to { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .18); } }

.fm-build { display: grid; gap: 8px; }
.fm-build-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; border: 1px solid #e3e7ee; background: #fff; font-size: .84rem; }
.fm-grip { width: 8px; height: 14px; background: radial-gradient(#b8c2d6 1.2px, transparent 1.4px) 0 0 / 4px 4px; }
.fm-kind { margin-left: auto; font-size: .68rem; font-weight: 600; color: #6b7487; background: #f1f3f8; padding: 3px 8px; border-radius: 999px; }
.fm-req { color: #dc2626; font-weight: 700; }
.pp-scene.on .fm-build-row { animation: ppRow .4s both; animation-delay: calc(var(--i) * 160ms); }
.fm-add { padding: 11px; border-radius: 10px; border: 1.5px dashed #c9d3e6; color: #0c64ae; font-weight: 600; text-align: center; font-size: .84rem; }

.fm-send { display: flex; flex-direction: column; }
.fm-link.big { box-shadow: none; border: 1px solid #e3e7ee; }
.fm-or { text-align: center; font-size: .74rem; color: #8a93a4; margin: 14px 0; }
.fm-to { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border: 1px solid #e3e7ee; border-radius: 10px; min-height: 44px; }
.fm-tok { font-size: .76rem; padding: 5px 10px; border-radius: 999px; background: #eaf2fb; color: #0c64ae; font-weight: 600; }
.pp-scene.on .fm-tok { animation: ppRow .35s both; } .pp-scene.on .fm-tok:nth-child(2) { animation-delay: .4s; }
.fm-caret { width: 1.5px; height: 18px; background: #1d2433; animation: fmBlink 1s step-end infinite; }
@keyframes fmBlink { 50% { opacity: 0; } }
.fm-send .pp-fake-btn { align-self: flex-start; }

.fm-resp-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.fm-resp-top span { font-size: .76rem; color: #8a93a4; }
.fm-resp-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; border: 1px solid #eef0f4; margin-bottom: 8px; }
.fm-resp-row > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.fm-resp-row small { color: #8a93a4; font-size: .72rem; }
.fm-resp-row > i { margin-left: auto; color: #dc2626; --fa-primary-color: #dc2626; --fa-secondary-color: #dc2626; font-size: 1.2rem; }
.fm-resp-row.new { border-color: #bbf7d0; background: #f0fdf4; }
.pp-scene.on .fm-resp-row.new { animation: fmNew .6s .2s both cubic-bezier(.2, 1.4, .4, 1); }
@keyframes fmNew { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---- templates: a phone filling a form ---- */
.fm-cta-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-weight: 600; color: #0c64ae; }
.fm-phone { justify-self: center; width: 280px; padding: 12px; border-radius: 36px; background: #1d2433; box-shadow: 0 30px 70px rgba(16, 24, 40, .25); }
.fm-phone-screen { background: #fff; border-radius: 26px; padding: 22px 18px 20px; min-height: 440px; display: flex; flex-direction: column; }
.fm-phone-bar { display: flex; flex-direction: column; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 3px solid #0d9488; }
.fm-phone-bar small { color: #8a93a4; font-size: .7rem; }
.fm-input.filled { height: auto; font-size: .78rem; }
.fm-submit { margin-top: auto; align-self: stretch; text-align: center; padding: 11px; border-radius: 10px; background: #0d9488; color: #fff; font-weight: 600; font-size: .86rem; }

@media (max-width: 640px) {
  .fm-pick-art { height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .fm-ghost { animation: none !important; opacity: 1; transform: none; }
  .fm-reveal { opacity: 1; transform: none; max-height: none; }
  .fm-sent-row, .fm-pdf-row, .fm-table-row, .fm-tile { opacity: 1 !important; transform: none !important; transition: none !important; }
}
