/* Animation Curriculum Bespoke Pricing Tool — front end.
   Colours and sizes come from Pricing Tool → Appearance (set as CSS variables on .tacp). */

.tacp {
  --tacp-accent: #5b3cc4;
  --tacp-accent-soft: #efeafd;
  --tacp-text: #1d1b26;
  --tacp-muted: #6b6878;
  --tacp-border: #e3e1ea;
  --tacp-card: #ffffff;
  --tacp-summary-bg: #1d1b26;
  --tacp-summary-text: #ffffff;
  --tacp-radius: 14px;
  --tacp-flag-size: 64px;
  --tacp-max-width: 820px;

  font-family: inherit;
  color: var(--tacp-text);
  line-height: 1.5;
  max-width: var(--tacp-max-width);
  margin: 0 auto;
  text-align: left;
}
.tacp, .tacp * { box-sizing: border-box; }
.tacp input[type="radio"],
.tacp input[type="checkbox"] {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.tacp label { margin: 0; font-weight: inherit; }

/* Progress bar */
.tacp-progress { display: flex; gap: 8px; list-style: none; margin: 0 0 28px; padding: 0; }
.tacp-progress li { flex: 1; margin: 0; padding: 0; list-style: none; }
.tacp-progress li::before, .tacp-progress li::marker { content: none; }
.tacp .tacp-progress button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 0 0 12px; margin: 0; background: none; border: 0; border-bottom: 4px solid var(--tacp-border);
  border-radius: 0; color: var(--tacp-muted); font: inherit; font-size: 0.9rem; font-weight: 600; line-height: 1.3;
  text-align: left; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: normal; min-height: 0;
}
.tacp .tacp-progress button:hover { color: var(--tacp-text); background: none; }
.tacp .tacp-progress button:focus-visible { outline: 2px dashed var(--tacp-accent); outline-offset: 4px; }
.tacp-progress__num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--tacp-border); background: #fff; color: var(--tacp-muted); font-size: 0.85rem;
}
.tacp .tacp-progress .is-done button { border-bottom-color: var(--tacp-accent); }
.tacp-progress .is-done .tacp-progress__num { background: var(--tacp-accent-soft); border-color: var(--tacp-accent); color: var(--tacp-accent); }
.tacp .tacp-progress .is-current button { border-bottom-color: var(--tacp-accent); color: var(--tacp-text); }
.tacp-progress .is-current .tacp-progress__num { background: var(--tacp-accent); border-color: var(--tacp-accent); color: #fff; }

/* Steps (one page at a time) */
.tacp-step { margin: 0; }
.tacp-step[hidden] { display: none !important; }
.tacp-step.is-entering { animation: tacp-fade .25s ease; }
@keyframes tacp-fade { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tacp-step.is-entering { animation: none; } }
.tacp .tacp-step__title {
  margin: 0 0 16px; padding: 0; font-family: inherit; font-size: 1.25rem; font-weight: 700; line-height: 1.3;
  color: var(--tacp-text); text-transform: none; letter-spacing: normal;
}
.tacp-step__title:focus { outline: none; }

/* Flags */
.tacp-flags { display: flex; flex-wrap: wrap; gap: 20px 28px; }
.tacp-flag { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.tacp-flag__circle {
  width: var(--tacp-flag-size); height: var(--tacp-flag-size);
  border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--tacp-accent-soft); box-shadow: 0 0 0 1px var(--tacp-border);
  transition: box-shadow .15s, transform .15s;
}
.tacp-flag__circle svg, .tacp-flag__circle img { width: 100%; height: 100%; display: block; object-fit: cover; max-width: none; border-radius: 0; margin: 0; }
.tacp-flag__text { font-weight: 800; font-size: calc(var(--tacp-flag-size) * 0.28); color: var(--tacp-accent); text-transform: uppercase; }
.tacp-flag:hover .tacp-flag__circle { transform: scale(1.05); }
.tacp-flag input:checked + .tacp-flag__circle { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--tacp-accent); }
.tacp-flag input:focus-visible + .tacp-flag__circle { outline: 2px dashed var(--tacp-accent); outline-offset: 8px; }
.tacp-flag__name { font-size: 0.85rem; font-weight: 600; color: var(--tacp-muted); text-align: center; }
.tacp-flag input:checked ~ .tacp-flag__name { color: var(--tacp-text); }

/* Option cards */
.tacp-cards { display: grid; gap: 12px; }
.tacp-card {
  background: var(--tacp-card);
  border: 2px solid var(--tacp-border);
  border-radius: var(--tacp-radius);
  transition: border-color .15s, background-color .15s;
}
.tacp-card.is-selected { border-color: var(--tacp-accent); background: var(--tacp-accent-soft); }
.tacp-card:focus-within { outline: 2px dashed var(--tacp-accent); outline-offset: 3px; }
.tacp-card__main { display: flex; gap: 14px; padding: 18px 20px; cursor: pointer; }
.tacp-card--locked .tacp-card__main { cursor: default; }
.tacp-card__mark {
  flex: none; width: 22px; height: 22px; margin-top: 2px;
  border: 2px solid var(--tacp-border); border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.tacp-card.is-selected .tacp-card__mark { border-color: var(--tacp-accent); }
.tacp-card.is-selected .tacp-card__mark::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--tacp-accent);
}
.tacp-card--check .tacp-card__mark { border-radius: 6px; }
.tacp-card--check.is-selected .tacp-card__mark { background: var(--tacp-accent); }
.tacp-card--check.is-selected .tacp-card__mark::after {
  width: 6px; height: 11px; margin-top: -2px; border-radius: 0; background: none;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.tacp-card__body { flex: 1; min-width: 0; display: block; }
.tacp-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.tacp-card__name { font-weight: 700; font-size: 1.02rem; }
.tacp-card__price { font-weight: 700; color: var(--tacp-accent); white-space: nowrap; }
.tacp-card__badge {
  display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px;
  background: var(--tacp-accent); color: #fff; font-size: 0.72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.tacp-card__small { display: block; margin-top: 6px; font-size: 0.82rem; color: var(--tacp-muted); }
.tacp-card__small a { color: inherit; text-decoration: underline; }

/* Unit slider */
.tacp-slider { padding: 0 20px 20px 56px; }
.tacp-slider__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 0.9rem; }
.tacp-slider__count { font-weight: 700; }
.tacp-slider__cost { color: var(--tacp-muted); text-align: right; }
.tacp input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; margin: 8px 0;
  border-radius: 999px; outline: none; cursor: pointer; border: 0; padding: 0; box-shadow: none;
  background: linear-gradient(to right, var(--tacp-accent) var(--tacp-fill, 0%), var(--tacp-border) var(--tacp-fill, 0%));
}
.tacp input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 3px solid var(--tacp-accent); box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.tacp input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid var(--tacp-accent); box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.tacp input[type="range"]:focus-visible { outline: 2px dashed var(--tacp-accent); outline-offset: 6px; }
.tacp-slider__scale { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--tacp-muted); }

/* Estimate */
.tacp-summary {
  background: var(--tacp-summary-bg); color: var(--tacp-summary-text);
  border-radius: calc(var(--tacp-radius) + 4px); padding: 28px;
  container-type: inline-size;
}
.tacp-summary__figures { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; }
.tacp-fig { flex: 0 1 auto; }
.tacp-fig__amount { display: block; font-size: 1.9rem; font-size: clamp(1.3rem, 7cqi, 2.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; white-space: nowrap; }
.tacp-fig__label { display: block; margin-top: 4px; font-size: 0.85rem; opacity: .75; }
.tacp-summary__plus { font-size: 1.6rem; font-weight: 300; line-height: 1.2; opacity: .6; }
.tacp-summary__lines { list-style: none; margin: 24px 0 0; padding: 16px 0 0; border-top: 1px solid rgba(255,255,255,.15); font-size: 0.88rem; }
.tacp-summary__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; margin: 0; list-style: none; }
.tacp-summary__lines li::before { content: none; }
.tacp-summary__label { opacity: .75; }
.tacp-summary__value { text-align: right; font-weight: 600; }
.tacp .tacp-summary__change {
  margin: 0 0 0 10px; padding: 0; background: none; border: 0; box-shadow: none; cursor: pointer; min-height: 0;
  font: inherit; font-size: 0.8rem; font-weight: 600; color: inherit; opacity: .7; line-height: inherit;
  text-decoration: underline; text-underline-offset: 2px; text-transform: none; letter-spacing: normal;
}
.tacp .tacp-summary__change:hover { opacity: 1; background: none; color: inherit; }
.tacp .tacp-summary__change:focus-visible { outline: 2px dashed currentColor; outline-offset: 2px; }
.tacp-summary__note { margin: 16px 0 0; font-size: 0.78rem; opacity: .65; }
.tacp-summary__note a { color: inherit; }
.tacp .tacp-summary__cta {
  display: block; margin-top: 20px; padding: 14px 20px; border-radius: 999px;
  background: var(--tacp-accent); color: #fff; text-align: center;
  font-weight: 700; text-decoration: none; transition: filter .15s;
}
.tacp .tacp-summary__cta:hover, .tacp .tacp-summary__cta:focus { filter: brightness(1.12); color: #fff; text-decoration: none; }

/* Back / Next */
.tacp-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.tacp-nav__count { font-size: 0.85rem; color: var(--tacp-muted); }
.tacp .tacp-nav__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; margin: 0; border-radius: 999px; cursor: pointer; min-height: 0;
  font: inherit; font-weight: 700; font-size: 0.95rem; line-height: 1.2; text-transform: none; letter-spacing: normal;
  border: 2px solid var(--tacp-accent); transition: filter .15s, background-color .15s; box-shadow: none;
}
.tacp .tacp-nav__btn--next { background: var(--tacp-accent); color: #fff; }
.tacp .tacp-nav__btn--next:hover { filter: brightness(1.12); background: var(--tacp-accent); color: #fff; }
.tacp .tacp-nav__btn--back { background: transparent; color: var(--tacp-accent); }
.tacp .tacp-nav__btn--back:hover { background: var(--tacp-accent-soft); color: var(--tacp-accent); }
.tacp .tacp-nav__btn:focus-visible { outline: 2px dashed var(--tacp-accent); outline-offset: 3px; }

@media (max-width: 480px) {
  .tacp-flag__circle { width: min(var(--tacp-flag-size), 56px); height: min(var(--tacp-flag-size), 56px); }
  .tacp-flags { gap: 16px; justify-content: space-between; }
  .tacp-slider { padding-left: 20px; }
  .tacp-summary { padding: 22px; }
  .tacp .tacp-progress button { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 0.8rem; }
  .tacp .tacp-nav__btn { padding: 12px 18px; }
}
