/*!
 * AWTX Unmanned Weighbridge Tools v1.0.0
 * Avery Weigh-Tronix UK brand: Avery Red #ED1B2D, black, warm grey. Diagonal cuts at 30 degrees.
 * All selectors are scoped to .awtx-ut to avoid clashing with the theme.
 */
.awtx-ut {
  --awtx-red: #ED1B2D; --awtx-red2: #B1001E; --awtx-red3: #62001A;
  --awtx-black: #000; --awtx-ink: #111; --awtx-muted: #4A4A4A; --awtx-t3: #6E6E6E;
  --awtx-warm: #EEEAEB; --awtx-bg2: #F7F5F5; --awtx-track: #DBDBDB; --awtx-line: #E5E5E5; --awtx-card: #fff;
  --awtx-amber: #F5B400; --awtx-green: #3CE06B;
  --awtx-dur: 4200ms;
  font-family: inherit; color: var(--awtx-ink); line-height: 1.6; box-sizing: border-box;
  margin: 2.5rem 0; position: relative;
}
.awtx-ut *, .awtx-ut *::before, .awtx-ut *::after { box-sizing: border-box; }
.awtx-ut :focus-visible { outline: 3px solid var(--awtx-red); outline-offset: 2px; }
.awtx-ut [hidden] { display: none !important; }

/* header */
.awtx-ut__kicker { color: var(--awtx-red); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px; }
.awtx-ut__title { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.15; margin: 0 0 12px; font-weight: 700; text-wrap: balance; }
.awtx-ut__intro { font-size: 18px; color: var(--awtx-muted); margin: 0 0 28px; max-width: 70ch; text-wrap: pretty; }

/* fallback shows until JS is ready */
.awtx-ut.is-ready .awtx-ut__fallback { display: none; }
.awtx-ut__fallback ol { padding-left: 1.2em; }
.awtx-ut__fallback li { margin: .4em 0; }

/* buttons */
.awtx-ut__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; align-items: center; }
.awtx-ut__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 13px 26px; border: 2px solid var(--awtx-red);
  background: var(--awtx-red); color: #fff !important; font-family: inherit; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none !important; cursor: pointer;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: background .2s, border-color .2s, transform .2s;
}
.awtx-ut__btn:hover { background: var(--awtx-red2); border-color: var(--awtx-red2); transform: translateY(-1px); }
.awtx-ut__btn--ghost { clip-path: none; background: transparent; color: var(--awtx-ink) !important; border-color: var(--awtx-ink); }
.awtx-ut__btn--ghost:hover { background: var(--awtx-ink); color: #fff !important; border-color: var(--awtx-ink); }
.awtx-ut__btn--ghost-dark { background: #fff; color: var(--awtx-ink) !important; border-color: #fff; }
.awtx-ut__btn--ghost-dark:hover { background: var(--awtx-warm); border-color: var(--awtx-warm); }
.awtx-ut__link { background: none; border: 0; padding: 6px 0; color: var(--awtx-red); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ===================== 1. STEPS ===================== */
.awtx-ut__how { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.awtx-ut__steps { list-style: none; margin: 0; padding: 0; }
.awtx-ut__steps li { position: relative; border-left: 3px solid var(--awtx-track); transition: border-color .25s, background .25s; }
.awtx-ut__steps li.is-done { border-left-color: var(--awtx-red3); }
.awtx-ut__steps li.is-on { border-left-color: var(--awtx-red); background: var(--awtx-bg2); }
.awtx-ut__step {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 56px 1fr; gap: 12px; width: 100%; padding: 16px 18px; position: relative;
}
.awtx-ut__step:focus-visible { outline: 3px solid var(--awtx-red); outline-offset: 2px; }
.awtx-ut__step-num { font-size: 30px; font-weight: 400; color: var(--awtx-t3); line-height: 1.1; display: flex; gap: 4px; }
.awtx-ut__step-num::after { content: "/"; color: var(--awtx-red); }
.is-on > .awtx-ut__step .awtx-ut__step-num { color: var(--awtx-ink); }
.awtx-ut__step-title { display: block; font-size: 19px; font-weight: 700; line-height: 1.3; margin-top: 4px; }
.awtx-ut__step-text { display: block; color: var(--awtx-muted); font-size: 15px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s ease, opacity .3s ease, margin .3s; }
.is-on > .awtx-ut__step .awtx-ut__step-text { max-height: 220px; opacity: 1; margin-top: 6px; }
.awtx-ut__step-bar { position: absolute; left: -3px; top: 0; width: 3px; height: 0; background: var(--awtx-red2); }
.is-anim > .awtx-ut__step .awtx-ut__step-bar { animation: awtx-bar var(--awtx-dur) linear forwards; }
@keyframes awtx-bar { from { height: 0; } to { height: 100%; } }
.awtx-ut__steps-foot { margin-top: 12px; }
.awtx-ut__play { background: none; border: 1px solid var(--awtx-line); padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; color: var(--awtx-ink); }
.awtx-ut__play:hover { border-color: var(--awtx-ink); }

/* console mock */
.awtx-ut__kiosk { margin: 0; position: sticky; top: 110px; background: linear-gradient(180deg, #d3d5d7, #bfc2c5); padding: 0 20px 22px;
  clip-path: polygon(8% 0, 92% 0, 100% 5%, 100% 100%, 0 100%, 0 5%); }
.awtx-ut__khood { height: 26px; margin: 0 -20px 14px; background: linear-gradient(180deg, #e6e7e8, #cdd0d2); border-bottom: 2px solid #a9adb1; }
.awtx-ut__kscreen { background: #05070a; border: 2px solid #2b5fb8; aspect-ratio: 3 / 4; padding: 14px; display: flex; flex-direction: column; color: #dfe8f5; }
.awtx-ut__kbar { display: flex; justify-content: space-between; font-size: 11px; border: 1px solid #2b5fb8; padding: 7px 10px; letter-spacing: .02em; }
.awtx-ut__kbar--c { justify-content: center; }
.awtx-ut__kw { font: 400 38px/1 "Consolas", "Courier New", monospace; color: var(--awtx-green); text-align: right; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.awtx-ut__kmsg { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; letter-spacing: .04em; font-size: 18px; padding: 8px; }
.awtx-ut__kmsg.is-in { animation: awtx-in .45s ease-out; }
@keyframes awtx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.awtx-ut__kdots { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.awtx-ut__kdots i { width: 22px; height: 4px; background: #23324d; transition: background .3s; }
.awtx-ut__kdots i.is-on { background: #2b5fb8; }
.awtx-ut__kfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: #333; font-size: 12px; font-weight: 700; }
.awtx-ut__led { width: 14px; height: 14px; border-radius: 50%; background: var(--awtx-green); box-shadow: 0 0 12px var(--awtx-green); transition: background .3s, box-shadow .3s; }
.awtx-ut__led[data-state="amber"] { background: var(--awtx-amber); box-shadow: 0 0 12px var(--awtx-amber); }
.awtx-ut__kslot { height: 8px; background: #222; width: 40%; margin: 14px auto 0; }
.awtx-ut__kiosk figcaption { font-size: 12px; color: #444; text-align: center; margin-top: 12px; }
@media (max-width: 900px) {
  .awtx-ut__how { grid-template-columns: 1fr; gap: 28px; }
  .awtx-ut__kiosk { position: relative; top: 0; max-width: 320px; margin: 0 auto; order: -1; }
}

/* ===================== 2. READINESS ===================== */
.awtx-ut__card { background: var(--awtx-card); border: 1px solid var(--awtx-line); padding: clamp(20px, 3vw, 36px); position: relative; }
.awtx-ut__progress { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.awtx-ut__meter { flex: 1; height: 8px; background: var(--awtx-track); overflow: hidden; }
.awtx-ut__meter i { display: block; height: 100%; width: 0; background: var(--awtx-red); transition: width .4s ease; }
.awtx-ut__meter--light { background: #333; margin-top: 14px; }
.awtx-ut__count { font-size: 14px; color: var(--awtx-t3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.awtx-ut__qs { list-style: none; margin: 0; padding: 0; }
.awtx-ut__q { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--awtx-line); }
.awtx-ut__q-text { font-size: 16px; display: flex; gap: 12px; align-items: baseline; text-wrap: pretty; }
.awtx-ut__q-n { color: var(--awtx-red); font-weight: 700; min-width: 1.2em; }
.awtx-ut__ynwrap { display: inline-flex; flex: 0 0 auto; }
.awtx-ut__yn { min-width: 64px; min-height: 44px; padding: 8px 16px; border: 2px solid var(--awtx-ink); background: #fff; color: var(--awtx-ink); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: background .2s, color .2s; }
.awtx-ut__yn + .awtx-ut__yn { border-left: 0; }
.awtx-ut__yn:hover { background: var(--awtx-warm); }
.awtx-ut__yn[aria-pressed="true"] { background: var(--awtx-red); border-color: var(--awtx-red); color: #fff; }
.awtx-ut__result { margin-top: 24px; background: linear-gradient(150deg, #000 0%, #000 60%, var(--awtx-red3) 100%); color: #fff; padding: 28px; display: grid; grid-template-columns: auto 1fr; gap: 24px 28px; align-items: start;
  clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%); animation: awtx-in .5s ease-out; }
.awtx-ut__result:focus { outline: none; }
.awtx-ut__score { font-size: 72px; line-height: .9; font-weight: 400; display: flex; align-items: baseline; }
.awtx-ut__score-of { font-size: 28px; color: #aaa; margin-left: 4px; }
.awtx-ut__r-title { color: #fff; margin: 0 0 6px; font-size: 22px; }
.awtx-ut__r-text { color: #ccc; margin: 0; }
.awtx-ut__result .awtx-ut__ctas { grid-column: 1 / -1; margin-top: 0; }
.awtx-ut__result .awtx-ut__btn--ghost { color: #fff !important; border-color: #fff; }
.awtx-ut__result .awtx-ut__btn--ghost:hover { background: #fff; color: #000 !important; }
.awtx-ut__reset { margin-top: 10px; }
@media (max-width: 600px) {
  .awtx-ut__q { flex-direction: column; align-items: flex-start; gap: 10px; }
  .awtx-ut__result { grid-template-columns: 1fr; }
}

/* ===================== 3. ROI ===================== */
.awtx-ut__roi { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--awtx-line); }
.awtx-ut__fields { padding: clamp(22px, 3vw, 36px); background: var(--awtx-card); }
.awtx-ut__field { margin-bottom: 26px; }
.awtx-ut__field:last-child { margin-bottom: 0; }
.awtx-ut__field label { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.awtx-ut__out { color: var(--awtx-red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.awtx-ut input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; margin: 8px 0; cursor: pointer; border-radius: 0;
  background: linear-gradient(to right, var(--awtx-red) 0, var(--awtx-red) var(--awtx-fill, 50%), var(--awtx-track) var(--awtx-fill, 50%), var(--awtx-track) 100%);
}
.awtx-ut input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; background: #fff; border: 3px solid var(--awtx-red); border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.awtx-ut input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; background: #fff; border: 3px solid var(--awtx-red); border-radius: 50%; }
.awtx-ut input[type="range"]:focus-visible { outline: 3px solid var(--awtx-red); outline-offset: 6px; }
.awtx-ut__results { padding: clamp(22px, 3vw, 36px); background: linear-gradient(150deg, #000 0%, #000 60%, var(--awtx-red3) 100%); color: #fff; position: relative; overflow: hidden; }
.awtx-ut__lbl { color: #bbb; font-size: 14px; }
.awtx-ut__lbl--sub { margin-bottom: 22px; }
.awtx-ut__big { font-size: clamp(40px, 5vw, 62px); font-weight: 400; line-height: 1.05; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.awtx-ut__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-top: 1px solid #333; padding-top: 18px; }
.awtx-ut__grid b { display: block; font-size: 26px; font-weight: 400; font-variant-numeric: tabular-nums; }
.awtx-ut__grid span { font-size: 13px; color: #aaa; line-height: 1.35; display: block; }
.awtx-ut__results .awtx-ut__btn--ghost { color: #fff !important; border-color: #fff; }
.awtx-ut__results .awtx-ut__btn--ghost:hover { background: #fff; color: #000 !important; }
.awtx-ut__note { display: block; color: #8d8d8d; font-size: 12px; margin-top: 18px; max-width: 52ch; }
.awtx-ut__wedge { position: absolute; right: 0; bottom: 0; width: 30%; height: 16px; background: var(--awtx-red); clip-path: polygon(30% 100%, 100% 0, 100% 100%); }
@media (max-width: 860px) { .awtx-ut__roi { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .awtx-ut__grid { grid-template-columns: 1fr; } }

/* Gravity Forms reveal */
.awtx-ut__gf { margin-top: 24px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--awtx-line); border-top: 4px solid var(--awtx-red); background: var(--awtx-card); animation: awtx-in .4s ease-out; }
.awtx-ut__gf-head h3 { margin: 0 0 6px; font-size: 22px; }
.awtx-ut__gf-head p { margin: 0 0 16px; color: var(--awtx-muted); }

@media (prefers-reduced-motion: reduce) {
  .awtx-ut *, .awtx-ut *::before, .awtx-ut *::after { animation: none !important; transition: none !important; }
}
@media print {
  .awtx-ut__kiosk, .awtx-ut__ctas, .awtx-ut__play, .awtx-ut__gf { display: none !important; }
  .awtx-ut__step-text { max-height: none !important; opacity: 1 !important; }
}
