/* =========================================================
   TABULIZER 7 - "HOW TABULIZER WORKS" MOTION GRAPHIC
   Three cards (data -> wizard -> publish) with a small animated scene
   in each, joined by arrows that carry a data packet. Scoped under
   .tab7-flow and laid out by the figure's own width.
   ========================================================= */
.tab7-flow {
  --tf-blue: #1687ee;
  --tf-indigo: #2348d8;
  --tf-teal: #08c7b8;
  --tf-green: #10b981;
  --tf-orange: #f39c12;
  --tf-purple: #7c5ce0;
  --tf-text: #151821;
  --tf-soft: #5b6472;
  --tf-border: #dce9f5;
  --tf-line: #e6eef5;
  --tf-skel: #e3edf6;
  --tf-raw: #d3dde7;
  --tf-ease: cubic-bezier(.65, 0, .35, 1);
  --tf-out: cubic-bezier(.2, .8, .2, 1);
  container: tf / inline-size;
  position: relative;
  margin: 24px 0 8px;
  padding: 0;
  color: var(--tf-text);
  font-size: 16px;
  line-height: 1.45;
  text-align: start;
}
.tab7-flow *, .tab7-flow *::before, .tab7-flow *::after { box-sizing: border-box; }
.tab7-flow .tf-sr, .tab7-flow .tf-pause-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ---- layout ---- */
.tab7-flow .tf-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.tab7-flow .tf-arrow { position: relative; display: block; justify-self: center; width: 2px; height: 26px; }
@container tf (min-width: 760px) {
  .tab7-flow .tf-steps { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) 44px minmax(0, 1fr); gap: 0; align-items: stretch; }
  .tab7-flow .tf-arrow { align-self: center; width: 44px; height: 2px; }
}

/* ---- cards ---- */
.tab7-flow .tf-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 22px 22px 20px;
  border: 1px solid var(--tf-border); border-radius: 18px; background: #f9fbfe;
  transition: border-color .4s, box-shadow .4s, background-color .4s, transform .4s var(--tf-out);
}
.tab7-flow .tf-card.is-on {
  border-color: rgba(22, 135, 238, .45); background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 135, 238, .08), 0 16px 40px rgba(28, 100, 174, .12);
}
.tab7-flow .tf-num {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 6px;
  border-radius: 50%; background: linear-gradient(135deg, #2348d8, #1687ee); color: #fff;
  font-size: 1.05rem; font-weight: 800; box-shadow: 0 6px 16px rgba(35, 72, 216, .25);
}
.tab7-flow .tf-card.is-on .tf-num { animation: tf-pulse 1.6s ease-out infinite; }
.tab7-flow .tf-title { display: block; font-size: 1.22rem; font-weight: 800; line-height: 1.25; }
.tab7-flow .tf-text { display: block; color: var(--tf-soft); font-size: .96rem; }
.tab7-flow .tf-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 6px; }
.tab7-flow .tf-chip {
  display: inline-block; padding: 4px 11px; border-radius: 999px; background: #e7f1fd; color: #17509a;
  font-size: .82rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
  transition: background-color .3s, color .3s, box-shadow .3s, transform .3s var(--tf-out);
}
.tab7-flow .tf-card-design .tf-chip { background: #e5f6ec; color: #17693c; }
.tab7-flow .tf-card-publish .tf-chip { background: #fdf0dc; color: #8a4b06; }
.tab7-flow .tf-chip.is-on { transform: translateY(-2px); background: linear-gradient(135deg, #2348d8, #1687ee); color: #fff; box-shadow: 0 6px 14px rgba(35, 72, 216, .25); }
.tab7-flow .tf-card-publish .tf-chip.is-on { background: linear-gradient(135deg, #f39c12, #e8781a); box-shadow: 0 6px 14px rgba(243, 156, 18, .3); }

/* ---- the scene box inside each card ---- */
.tab7-flow .tf-visual {
  position: relative; height: 150px; margin: 6px 0 4px; overflow: hidden;
  border: 1px solid var(--tf-line); border-radius: 12px; background: #fff;
}
@container tf (min-width: 760px) {
  .tab7-flow .tf-visual { height: clamp(124px, 13.5cqi, 156px); }
  .tab7-flow .tf-card { padding: 22px 20px 20px; }
}
@container tf (min-width: 1000px) {
  .tab7-flow .tf-title { font-size: 1.3rem; }
}

/* ---- arrows with a travelling packet ---- */
.tab7-flow .tf-arrow::before {
  content: ""; position: absolute; inset: 0; border-radius: 2px;
  background: repeating-linear-gradient(180deg, #b8d3ee 0 5px, transparent 5px 9px);
}
.tab7-flow .tf-arrow::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; width: 9px; height: 9px; margin-left: -4.5px;
  border: solid #1687ee; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.tab7-flow .tf-packet {
  position: absolute; left: 50%; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: linear-gradient(135deg, #2348d8, #08c7b8); box-shadow: 0 0 0 4px rgba(22, 135, 238, .15); opacity: 0;
}
.tab7-flow .tf-arrow.is-go .tf-packet { animation: tf-travel-y .7s var(--tf-ease) both; }
@container tf (min-width: 760px) {
  .tab7-flow .tf-arrow::before { background: repeating-linear-gradient(90deg, #b8d3ee 0 5px, transparent 5px 9px); }
  .tab7-flow .tf-arrow::after { left: auto; right: -1px; bottom: auto; top: 50%; margin: -4.5px 0 0; transform: rotate(-45deg); }
  .tab7-flow .tf-packet { left: 0; top: 50%; }
  .tab7-flow .tf-arrow.is-go .tf-packet { animation-name: tf-travel-x; }
}

/* ---- scene 1: data ---- */
.tab7-flow .tf-src {
  position: absolute; top: 12px; left: 50%; display: inline-flex; align-items: center; gap: 6px; max-width: 86%;
  padding: 4px 11px 4px 5px; border: 1px solid rgba(22, 135, 238, .35); border-radius: 999px; background: #fff;
  box-shadow: 0 6px 16px rgba(35, 72, 216, .14); color: #17509a; font-size: .74rem; font-weight: 700; white-space: nowrap;
  transform: translate(-50%, -40px); opacity: 0; transition: transform .5s var(--tf-out), opacity .3s;
}
.tab7-flow .tf-src i { flex: none; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #2348d8, #1687ee); }
.tab7-flow .tf-src i::after { content: ""; display: block; width: 6px; height: 8px; margin: 5px auto 0; border: 1.5px solid #fff; border-radius: 1px; }
.tab7-flow .tf-src b { overflow: hidden; font-weight: 700; text-overflow: ellipsis; }
.tab7-flow .tf-v-data.is-on .tf-src { transform: translate(-50%, 0); opacity: 1; }
.tab7-flow .tf-grid {
  position: absolute; inset: 50px 16px 14px; display: grid; grid-template-columns: repeat(4, 1fr); align-content: start; gap: 8px 8px;
}
.tab7-flow .tf-grid i { height: 9px; border-radius: 5px; background: var(--tf-raw); opacity: 0; }
.tab7-flow .tf-grid i:nth-child(-n+4) { background: #b5cbe0; }
.tab7-flow .tf-v-data.is-on .tf-grid i { opacity: 1; animation: tf-pop .35s var(--tf-out) calc(250ms + var(--i) * 45ms) backwards; }

/* ---- scene 2: wizard controls + preview ---- */
.tab7-flow .tf-v-design { display: grid; grid-template-columns: 38% 1fr; }
.tab7-flow .tf-ctrl { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 12px; border-right: 1px solid var(--tf-line); background: #f9fbfe; }
.tab7-flow .tf-sw { display: flex; gap: 6px; }
.tab7-flow .tf-sw i { width: 15px; height: 15px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; transition: box-shadow .3s, transform .3s var(--tf-out); }
.tab7-flow .tf-sw i.is-on { transform: scale(1.15); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
.tab7-flow .tf-tg { display: flex; align-items: center; gap: 7px; }
.tab7-flow .tf-tg i { position: relative; flex: none; width: 26px; height: 15px; border-radius: 999px; background: #d0dce8; transition: background .3s; }
.tab7-flow .tf-tg i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: transform .3s var(--tf-out); }
.tab7-flow .tf-tg i.is-on { background: linear-gradient(135deg, #10b981, #08c7b8); }
.tab7-flow .tf-tg i.is-on::after { transform: translateX(11px); }
.tab7-flow .tf-tg b { flex: 1; height: 6px; border-radius: 3px; background: var(--tf-skel); }
.tab7-flow .tf-sl { position: relative; height: 5px; border-radius: 3px; background: var(--tf-skel); }
.tab7-flow .tf-sl i { position: absolute; inset: 0 auto 0 0; width: var(--p, 25%); border-radius: inherit; background: linear-gradient(90deg, #2348d8, #1687ee, #08c7b8); transition: width .8s var(--tf-ease); }
.tab7-flow .tf-sl b { position: absolute; top: 50%; left: var(--p, 25%); width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border: 3px solid #1687ee; border-radius: 50%; background: #fff; transition: left .8s var(--tf-ease); }
.tab7-flow .tf-prev { position: relative; padding: 12px; }
.tab7-flow .tf-prev .tf-out { height: 100%; }

/* ---- scene 3: the page ---- */
.tab7-flow .tf-v-publish { display: flex; flex-direction: column; background: #f4f8fc; }
.tab7-flow .tf-page-bar { display: flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; background: #fff; border-bottom: 1px solid var(--tf-line); }
.tab7-flow .tf-page-bar i { width: 6px; height: 6px; border-radius: 50%; background: #ddd9e7; }
.tab7-flow .tf-page-bar b { width: 40%; height: 8px; margin-left: 8px; border-radius: 4px; background: var(--tf-skel); }
.tab7-flow .tf-page { position: relative; display: flex; flex: 1; flex-direction: column; gap: 5px; min-height: 0; margin: 8px 10px 0; padding: 9px 10px 0; border-radius: 6px 6px 0 0; background: #fff; }
.tab7-flow .tf-page > i { flex: none; height: 6px; border-radius: 3px; background: var(--tf-skel); }
.tab7-flow .tf-page > i:first-child { width: 46%; height: 8px; background: #c9d8e7; }
.tab7-flow .tf-page > i:nth-child(2) { width: 88%; }
.tab7-flow .tf-slot { position: relative; flex: 1; min-height: 0; margin-top: 3px; padding-bottom: 8px; }
.tab7-flow .tf-slot .tf-out { height: 100%; opacity: 0; transform: translateY(-14px) scale(.96); transition: opacity .35s, transform .5s var(--tf-out); }
.tab7-flow .tf-v-publish.is-on .tf-slot .tf-out { opacity: 1; transform: none; }
.tab7-flow .tf-check {
  position: absolute; z-index: 2; top: 26px; right: 14px; width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #08c7b8); box-shadow: 0 4px 12px rgba(16, 185, 129, .35);
  opacity: 0; transform: scale(.3); transition: opacity .25s, transform .4s var(--tf-out);
}
.tab7-flow .tf-check::after { content: ""; position: absolute; top: 6px; left: 8.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.tab7-flow .tf-check.is-on { opacity: 1; transform: none; }

/* ---- the output thumbnails (shared by the preview and the page) ---- */
.tab7-flow .tf-out { --a: #1687ee; --b: #2348d8; --c: #08c7b8; --d: #f39c12; position: relative; display: grid; gap: 4px; }
.tab7-flow .tf-out * { transition: background-color .5s, border-color .5s, opacity .5s; }
.tab7-flow .tf-out.is-raw { --a: #c5d1dd; --b: #b7c5d3; --c: #cfd9e3; --d: #c9d4df; }
.tab7-flow .tf-out i, .tab7-flow .tf-out b { display: block; border-radius: 3px; }
/* table */
.tab7-flow .tf-o-table { grid-template-rows: repeat(5, 1fr); }
.tab7-flow .tf-o-table > span { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 5px; align-items: center; padding: 0 5px; border-radius: 3px; }
.tab7-flow .tf-o-table > span:first-child { background: var(--a); }
.tab7-flow .tf-o-table > span:first-child i { background: rgba(255, 255, 255, .7); }
.tab7-flow .tf-o-table > span:nth-child(odd):not(:first-child) { background: #f1f6fb; }
.tab7-flow .tf-o-table.is-raw > span:nth-child(odd):not(:first-child) { background: transparent; }
.tab7-flow .tf-o-table i { height: 4px; background: var(--tf-skel); }
/* chart */
.tab7-flow .tf-o-chart { display: flex; align-items: flex-end; justify-content: space-around; padding: 4px 6px 0; border-bottom: 2px solid var(--tf-skel); }
.tab7-flow .tf-o-chart i { width: 13%; height: var(--h); border-radius: 3px 3px 1px 1px; background: var(--a); transform-origin: bottom; }
.tab7-flow .tf-o-chart i:nth-child(even) { background: var(--b); }
.tab7-flow .tf-trend { position: absolute; inset: 4px 6px 0; width: calc(100% - 12px); height: calc(100% - 4px); overflow: visible; }
.tab7-flow .tf-trend polyline { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: stroke .5s; }
.tab7-flow .tf-o-chart.is-in .tf-trend { animation: tf-reveal .8s var(--tf-ease) .4s backwards; }
@keyframes tf-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
/* pricing */
.tab7-flow .tf-o-pricing { grid-template-columns: repeat(3, 1fr); align-items: center; gap: 5px; }
.tab7-flow .tf-o-pricing > span { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 82%; padding: 6px 4px; border: 1px solid var(--tf-line); border-radius: 5px; background: #fff; }
.tab7-flow .tf-o-pricing > span:nth-child(2) { height: 100%; border: 1.5px solid var(--a); }
.tab7-flow .tf-o-pricing b { width: 50%; height: 7px; background: var(--b); }
.tab7-flow .tf-o-pricing i { width: 80%; height: 3px; background: var(--tf-skel); }
.tab7-flow .tf-o-pricing em { display: block; width: 80%; height: 7px; margin-top: auto; border-radius: 3px; background: var(--c); }
.tab7-flow .tf-o-pricing > span:nth-child(2) em { background: var(--a); }
/* calendar */
.tab7-flow .tf-o-calendar { grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; gap: 3px; }
.tab7-flow .tf-o-calendar i { border: 1px solid var(--tf-line); border-radius: 2px; background: #fff; }
.tab7-flow .tf-o-calendar i.e1 { background: var(--a); border-color: var(--a); }
.tab7-flow .tf-o-calendar i.e2 { background: var(--c); border-color: var(--c); }
.tab7-flow .tf-o-calendar i.e3 { background: var(--d); border-color: var(--d); }
/* gallery */
.tab7-flow .tf-o-gallery { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 4px; }
.tab7-flow .tf-o-gallery i { position: relative; overflow: hidden; border-radius: 4px; background: linear-gradient(180deg, #dbeeff, #f5faff); }
.tab7-flow .tf-o-gallery i::after { content: ""; position: absolute; inset: 35% 0 0; background: var(--b); clip-path: polygon(0 100%, 0 60%, 30% 20%, 55% 55%, 75% 30%, 100% 62%, 100% 100%); }
.tab7-flow .tf-o-gallery i:nth-child(3n+2)::after { background: var(--c); }
.tab7-flow .tf-o-gallery i:nth-child(3n)::after { background: var(--a); }
/* calculator */
.tab7-flow .tf-o-calc { grid-template-rows: 1fr 1fr 1.4fr; gap: 6px; padding: 2px 4px; }
.tab7-flow .tf-o-calc > span { position: relative; align-self: center; height: 4px; border-radius: 2px; background: var(--tf-skel); }
.tab7-flow .tf-o-calc > span i { width: var(--p); height: 100%; border-radius: inherit; background: var(--a); }
.tab7-flow .tf-o-calc > span b { position: absolute; top: 50%; left: var(--p); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border: 2px solid var(--a); border-radius: 50%; background: #fff; }
.tab7-flow .tf-o-calc > em { display: flex; align-items: center; justify-content: flex-end; gap: 6px; border-top: 1px dashed var(--tf-border); }
.tab7-flow .tf-o-calc > em b { width: 40%; height: 10px; border-radius: 3px; background: var(--b); }
/* form */
.tab7-flow .tf-o-form { grid-template-rows: 1fr 1fr 1.5fr auto; gap: 4px; padding: 0 4px; }
.tab7-flow .tf-o-form i { border: 1px solid #cfdeeb; border-radius: 3px; background: #f8fbfd; }
.tab7-flow .tf-o-form b { justify-self: start; width: 34%; height: 10px; border-radius: 3px; background: var(--a); }

/* entrance of the thumbnail parts */
.tab7-flow .tf-out.is-in > * { animation: tf-rise .4s var(--tf-out) calc(var(--i, 0) * 60ms) backwards; }
.tab7-flow .tf-o-chart.is-in i { animation-name: tf-grow; }

/* ---- pause ---- */
.tab7-flow .tf-pause {
  position: absolute; z-index: 3; top: 14px; right: 14px; display: none; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin: 0; padding: 0; border: 1px solid var(--tf-border); border-radius: 50%;
  background: #fff; color: #2348d8; cursor: pointer;
}
.tab7-flow.is-ready .tf-pause { display: inline-flex; }
.tab7-flow .tf-pause:hover { border-color: #1687ee; background: #eef7ff; }
.tab7-flow .tf-pause:focus-visible { outline: 3px solid #1687ee; outline-offset: 2px; }
.tab7-flow .tf-pause::before, .tab7-flow .tf-pause::after { content: ""; width: 3px; height: 11px; margin: 0 1.5px; border-radius: 1px; background: currentColor; }
.tab7-flow.is-paused .tf-pause::after { display: none; }
.tab7-flow.is-paused .tf-pause::before { width: 0; height: 0; margin-left: 3px; border: solid transparent; border-width: 6px 0 6px 10px; border-left-color: currentColor; background: none; }
.tab7-flow.is-paused .tf-card.is-on .tf-num { animation: none; }

/* ---- keyframes ---- */
@keyframes tf-pop { from { opacity: 0; transform: scale(.4); } }
@keyframes tf-rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes tf-grow { from { transform: scaleY(0); } }
@keyframes tf-pulse { 0% { box-shadow: 0 6px 16px rgba(35, 72, 216, .25), 0 0 0 0 rgba(22, 135, 238, .35); } 100% { box-shadow: 0 6px 16px rgba(35, 72, 216, .25), 0 0 0 12px rgba(22, 135, 238, 0); } }
@keyframes tf-travel-x { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes tf-travel-y { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .tab7-flow *, .tab7-flow *::before, .tab7-flow *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
  .tab7-flow .tf-packet { display: none; }
}
