/* tradein.css — headset trade-in form. Everything is scoped under .ti so the site's
   global styles (style.css) and this form don't fight. Colors follow the site: #005e9e blue. */

.ti {
  --ti-blue: #005e9e;
  --ti-blue-hover: #077fd0;
  --ti-blue-soft: #e8f1f8;
  --ti-ink: #252525;
  --ti-muted: #5f6b73;
  --ti-line: #d7dde2;
  --ti-ground: #f5f7f8;
  --ti-good: #2e8b3e;
  --ti-warn-ink: #8a5300;
  --ti-warn-bg: #fff4e0;
  --ti-bad: #b42318;
  --ti-bad-bg: #fdecea;
  font-family: Roboto, Arial, sans-serif;
  color: var(--ti-ink);
  font-size: 16px;
  line-height: 1.5;
  max-width: 860px;
  margin: 24px auto 40px;
  scroll-margin-top: 90px;
}
.ti *, .ti *::before, .ti *::after { box-sizing: border-box; }
/* the page sits inside .information-list, whose "ul li" rule would otherwise add bullets and margins */
.ti ul li, .ti ol li { list-style: none; margin: 0; font-size: inherit; line-height: inherit; }
.ti .ti-review ul li { list-style: disc; font-size: 15px; margin: 2px 0; }
.ti button { font: inherit; cursor: pointer; }
.ti h2 { font-size: 26px; font-weight: 500; margin: 0 0 6px; color: var(--ti-ink); text-transform: none; }
.ti p { margin: 0 0 10px; }
.ti-lede { color: var(--ti-muted); font-size: 16px; max-width: 64ch; }
.ti-fine { color: var(--ti-muted); font-size: 14px; }
.ti-noscript { padding: 16px; background: var(--ti-warn-bg); border-radius: 6px; }
.ti-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.ti-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* stepper */
.ti-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: none; }
.ti-steps li { position: relative; text-align: center; font-size: 13px; color: var(--ti-muted); margin: 0; padding: 0; background: none; }
.ti-steps li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--ti-line); z-index: 0; }
.ti-steps li:first-child::before { display: none; }
.ti-steps li.is-done::before, .ti-steps li.is-current::before { background: var(--ti-blue); }
.ti-steps button { background: none; border: 0; padding: 0; color: inherit; display: inline-flex; flex-direction: column; align-items: center; }
.ti-steps li > span, .ti-steps button { position: relative; z-index: 1; }
.ti-dot { width: 32px; height: 32px; border-radius: 50%; display: grid !important; place-items: center; margin: 0 auto 4px;
  border: 2px solid var(--ti-line); background: #fff; font-weight: 700; color: var(--ti-muted); }
.ti-steps li.is-current .ti-dot { border-color: var(--ti-blue); color: var(--ti-blue); }
.ti-steps li.is-done .ti-dot { border-color: var(--ti-blue); background: var(--ti-blue); color: #fff; }
.ti-steps li.is-current { color: var(--ti-ink); font-weight: 500; }
.ti-step-label { display: block; }

/* panels and fields */
.ti-panel { background: #fff; border: 1px solid var(--ti-line); border-radius: 8px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.ti-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ti-field { display: flex; flex-direction: column; gap: 5px; }
.ti-field label, .ti-fieldset legend, .ti-photos-label { font-weight: 500; font-size: 15px; color: var(--ti-ink); padding: 0; margin: 0; }
.ti input[type=text], .ti input[type=email], .ti input[type=tel], .ti input[type=search], .ti input:not([type]), .ti textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #b7c0c7; border-radius: 6px; background: #fff; color: var(--ti-ink); height: auto;
}
.ti input:focus, .ti textarea:focus, .ti button:focus-visible, .ti .ti-opt:focus { outline: 3px solid rgba(0, 94, 158, .35); outline-offset: 1px; border-color: var(--ti-blue); }
.ti-hint { font-size: 13.5px; color: var(--ti-muted); }
.ti-error { color: var(--ti-bad); font-size: 14.5px; font-weight: 500; background: var(--ti-bad-bg); border-left: 4px solid var(--ti-bad); padding: 6px 10px; border-radius: 0 4px 4px 0; }
.ti-error:empty { display: none; }
.ti-field.has-error input { border: 2px solid var(--ti-bad); background: #fffafa; }
.ti-field.has-error label { color: var(--ti-bad); }
/* a problem summary at the top of a step or headset card */
.ti-alert { display: flex; gap: 10px; align-items: flex-start; background: var(--ti-bad-bg); color: var(--ti-bad); border: 1px solid #f3b8b2; border-left: 5px solid var(--ti-bad);
  border-radius: 6px; padding: 12px 14px; font-size: 16px; font-weight: 500; line-height: 1.4; }
.ti-alert::before { content: "!"; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ti-bad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; margin-top: 1px; }
/* the part of a headset card that still needs an answer */
.ti .is-missing { outline: 2px solid var(--ti-bad); outline-offset: 6px; border-radius: 4px; }
.ti .is-missing legend, .ti .is-missing .ti-check-q, .ti .is-missing label { color: var(--ti-bad); }
.ti .ti-check.is-missing { outline-offset: 4px; background: #fffafa; }
.ti-warn { background: var(--ti-warn-bg); color: var(--ti-warn-ink); font-size: 14px; padding: 8px 12px; border-radius: 6px; }
.ti-notice { background: var(--ti-blue-soft); padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 15px; }
.ti-fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ti-link { background: none; border: 0; padding: 0; color: var(--ti-blue); text-decoration: underline; font-size: 14px; align-self: flex-start; }
.ti-link:hover { color: var(--ti-blue-hover); }
.ti-turnstile:empty { display: none; }
.ti-turnstile { display: flex; justify-content: flex-end; }

/* buttons */
.ti-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.ti-btn { background: var(--ti-blue); color: #fff; border: 0; border-radius: 6px; padding: 12px 24px; font-size: 17px; font-weight: 500; min-width: 140px; }
.ti-btn:hover { background: var(--ti-blue-hover); }
.ti-btn[disabled] { opacity: .6; cursor: wait; }
.ti-btn-ghost { background: #fff; color: var(--ti-blue); border: 1px solid var(--ti-line); min-width: 0; }
.ti-btn-ghost:hover { background: var(--ti-ground); color: var(--ti-blue); }
.ti-save { font-size: 13px; color: var(--ti-muted); flex: 1; text-align: right; }
.ti-save-error { color: var(--ti-warn-ink); }

/* headset cards */
.ti-card { border: 1px solid var(--ti-line); border-radius: 8px; padding: 18px; display: flex; flex-direction: column; gap: 16px; background: var(--ti-ground); scroll-margin-top: 90px; }
.ti-card.has-error { border-color: var(--ti-bad); }
.ti-card-head { display: flex; justify-content: space-between; align-items: center; }
.ti-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ti-blue); }
.ti-add { border: 2px dashed var(--ti-line); background: #fff; border-radius: 8px; padding: 14px; color: var(--ti-blue); font-weight: 500; font-size: 16px; }
.ti-add:hover { border-color: var(--ti-blue); }

.ti-picked { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--ti-line); border-radius: 6px; padding: 12px 14px; }
.ti-picked-name { font-size: 18px; font-weight: 500; }
.ti-picker { display: flex; flex-direction: column; gap: 8px; }
.ti-results { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; border: 1px solid var(--ti-line); border-radius: 6px; background: #fff; }
.ti-results li { margin: 0; background: none; }
.ti-results li::before { display: none; }
.ti-group { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ti-muted); padding: 8px 12px 4px; background: var(--ti-ground) !important; position: sticky; top: 0; }
.ti-opt { padding: 9px 12px; border-top: 1px solid #eef1f3; cursor: pointer; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.ti-opt:hover, .ti-opt:focus { background: var(--ti-blue-soft) !important; }
.ti-opt-name { font-weight: 500; }
.ti-opt-hint { font-size: 13px; color: var(--ti-muted); }
.ti-opt.is-disabled { cursor: default; color: var(--ti-muted); }
.ti-opt.is-disabled:hover { background: none !important; }
.ti-opt-note { flex-basis: 100%; font-size: 13px; color: var(--ti-bad); }
.ti-empty { padding: 12px; color: var(--ti-muted); font-size: 14px; }

.ti-plugs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ti-plug { background: #fff; border: 1px solid var(--ti-line); border-radius: 6px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ti-ink); line-height: 1.25; }
.ti-plug img { height: 54px; width: 100%; object-fit: contain; }
.ti-plug.is-on { border: 2px solid var(--ti-blue); background: var(--ti-blue-soft); padding: 7px; font-weight: 500; }

.ti-scale { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--ti-line); border-radius: 6px; overflow: hidden; background: #fff; }
.ti-scale-btn { background: #fff; border: 0; border-right: 1px solid var(--ti-line); padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ti-ink); }
.ti-scale-btn:last-child { border-right: 0; }
.ti-scale-n { font-size: 24px; font-weight: 500; line-height: 1; }
.ti-scale-l { font-size: 12.5px; color: var(--ti-muted); line-height: 1.25; text-align: center; }
.ti-scale-btn.is-on { background: var(--ti-blue); }
.ti-scale-btn.is-on .ti-scale-n, .ti-scale-btn.is-on .ti-scale-l { color: #fff; }
.ti-scale-desc { font-size: 14px; color: var(--ti-muted); min-height: 21px; }

.ti-checks { display: flex; flex-direction: column; gap: 10px; }
.ti-check { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; }
.ti-check .ti-warn { grid-column: 1 / -1; }
.ti-check-q { font-size: 15px; }
.ti-seg { display: inline-flex; border: 1px solid #b7c0c7; border-radius: 6px; overflow: hidden; background: #fff; }
.ti-seg-btn { border: 0; background: #fff; padding: 7px 16px; font-size: 15px; color: var(--ti-ink); min-width: 58px; }
.ti-seg-btn + .ti-seg-btn { border-left: 1px solid #b7c0c7; }
.ti-seg-btn.is-on { background: var(--ti-ink); color: #fff; font-weight: 500; }

.ti-photos { display: flex; flex-direction: column; gap: 6px; }
.ti-photo-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ti-photo { position: relative; width: 76px; height: 76px; border-radius: 6px; overflow: hidden; background: #e3e8ec; }
.ti-photo img { width: 100%; height: 100%; object-fit: cover; }
.ti-photo.is-uploading img { opacity: .5; }
.ti-photo-pct { position: absolute; inset: auto 0 0 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; text-align: center; padding: 1px 0; }
.ti-photo.is-failed { outline: 2px solid var(--ti-bad); }
.ti-photo-x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 15px; line-height: 20px; padding: 0; }
.ti-photo-add { width: 76px; height: 76px; border-radius: 6px; border: 2px dashed #b7c0c7; display: grid; place-items: center; color: var(--ti-blue); font-weight: 500; font-size: 14px; cursor: pointer; background: #fff; margin: 0; }
.ti-photo-add:hover { border-color: var(--ti-blue); }

/* deal */
.ti-deals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ti-deal, .ti-radio { background: #fff; border: 1px solid var(--ti-line); border-radius: 8px; padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; color: var(--ti-ink); }
.ti-deal.is-on, .ti-radio.is-on { border: 2px solid var(--ti-blue); background: var(--ti-blue-soft); padding: 13px; }
.ti-deal-title, .ti-radio-title { font-weight: 500; font-size: 16px; }
.ti-deal-sub, .ti-radio-sub { font-size: 13.5px; color: var(--ti-muted); }
.ti-sub { display: flex; flex-direction: column; gap: 14px; padding-left: 2px; }
.ti-buys { display: flex; flex-wrap: wrap; gap: 8px; }
.ti-buy { background: #fff; border: 1px solid var(--ti-line); border-radius: 20px; padding: 7px 14px; font-size: 15px; color: var(--ti-ink); }
.ti-buy.is-on { border: 2px solid var(--ti-blue); background: var(--ti-blue-soft); padding: 6px 13px; font-weight: 500; }
.ti-badge { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ti-good); vertical-align: 1px; }
.ti-radios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* review */
.ti-review { display: flex; flex-direction: column; gap: 10px; }
.ti-review-block { border: 1px solid var(--ti-line); border-radius: 8px; padding: 12px 14px; }
.ti-review-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; margin-bottom: 4px; }
.ti-review ul { margin: 0; padding-left: 18px; }
.ti-review li { font-size: 15px; margin: 2px 0; list-style: disc; background: none; padding: 0; }

/* done */
.ti-done { align-items: center; text-align: center; padding: 36px 22px; }
.ti-done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--ti-good); color: #fff; display: grid; place-items: center; font-size: 30px; }
.ti-done p { max-width: 52ch; }

@media (max-width: 640px) {
  .ti { margin-top: 12px; }
  .ti-panel { padding: 16px; border-radius: 0; border-left: 0; border-right: 0; }
  .ti-grid-2, .ti-deals, .ti-radios { grid-template-columns: 1fr; }
  .ti-card { padding: 14px; }
  .ti-step-label { font-size: 11.5px; }
  .ti-scale-l { font-size: 10.5px; }
  .ti-scale-n { font-size: 20px; }
  .ti-check { grid-template-columns: 1fr; }
  .ti-nav .ti-btn:not(.ti-btn-ghost) { flex: 1; }
  .ti-save { flex-basis: 100%; order: 3; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ti * { scroll-behavior: auto !important; transition: none !important; }
}
