/* The website's free tools (/tools/*): the app's form controls, scoped to .tool so the website's
   own styles are untouched. The window sticker and Buyers Guide reuse the app's stickers.js. */

.tool {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f8f9fb; --border: #e3e6eb; --border-strong: #cdd2da;
  --text: #14171c; --muted: #646b78; --accent: #1d4ed8; --accent-hover: #1a43bd; --accent-soft: #eaf0ff;
  --danger: #c62828; --success: #1b7f4b; --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  margin: 8px 0 48px; padding: clamp(14px, 2.4vw, 28px); background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  font: 400 15px/1.5 var(--font); color: var(--text);
}
.tool p, .tool li { color: inherit; }
.tool h3 { font-size: 15px; font-stretch: 100%; letter-spacing: 0; line-height: 1.3; font-weight: 600; margin: 0; }
.tool button { font: inherit; color: inherit; cursor: pointer; }
.tool input, .tool textarea, .tool select {
  font: inherit; color: var(--text); width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); padding: 10px 12px; font-size: 15px;
}
.tool select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23646b78' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.tool input:focus, .tool textarea:focus, .tool select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tool input::placeholder, .tool textarea::placeholder { color: #a0a6b1; }
.tool textarea { resize: vertical; }
.tool input[type="checkbox"], .tool input[type="radio"] { width: auto; padding: 0; }
.tool input[type="color"] { width: 46px; height: 42px; padding: 3px; flex: none; cursor: pointer; }

.tool .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: auto; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 16px; font: 600 14px/1.2 var(--font); letter-spacing: 0; text-transform: none; text-decoration: none; white-space: nowrap; transition: background .15s; }
.tool .btn.primary { background: var(--accent); color: #fff; }
.tool .btn.primary:hover { background: var(--accent-hover); }
.tool .btn.secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.tool .btn.secondary:hover { background: var(--surface-2); }
.tool .btn.big { padding: 14px 24px; font-size: 16px; }
.tool .btn:disabled { opacity: .55; cursor: not-allowed; }
.tool .link-btn { border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600; padding: 0; }
.tool .muted { color: var(--muted); font-size: 14px; }
.tool .small { font-size: 12.5px; }
.tool .eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tool .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.tool .field > span { font-size: 13px; font-weight: 600; }
.tool .field em { font-style: normal; font-weight: 400; color: var(--muted); }
.tool .spinner { display: inline-block; width: 22px; height: 22px; border: 2.5px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: tool-spin .8s linear infinite; vertical-align: -3px; }
.tool .spinner.small { width: 14px; height: 14px; border-width: 2px; }
@keyframes tool-spin { to { transform: rotate(360deg); } }
.tool .st-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.tool .st-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tool .st-check { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.tool .listing-row { display: flex; gap: 8px; }
.tool .listing-row input { flex: 1; min-width: 0; }
.tool .listing-result { margin-top: 2px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.tool .listing-result:not(.ok):not(.error) { flex-direction: row; align-items: center; gap: 8px; }
.tool .listing-result.ok { color: var(--text); }
.tool .listing-result.error { color: var(--danger); }
.tool .vin-specs { color: var(--muted); }
.tool .vin-warning { color: #b45309; }

/* Window sticker & Buyers Guide (stickers.js) */
.tool .ph-head, .tool #skLinkForm { display: none; } /* the page has its own heading; reading a listing needs an account */
.tool .sk-layout { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: 24px; align-items: start; }
.tool .sk-form { display: grid; gap: 14px; }
.tool .sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.tool .sk-grid .field { margin: 0; }
.tool .sk-wide { grid-column: 1 / -1; }
.tool .sk-unit { display: flex; gap: 6px; }
.tool .sk-unit input { flex: 1; min-width: 0; }
.tool .sk-unit select { width: 76px; flex: none; }
.tool .sk-specs summary { cursor: pointer; font-size: 13.5px; font-weight: 600; padding: 4px 0; }
.tool .sk-specs summary em { font-style: normal; font-weight: 400; color: var(--muted); }
.tool .sk-specs[open] summary { margin-bottom: 10px; }
.tool .sk-equip { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; }
.tool .sk-check { font-size: 13.5px; }
.tool .sk-checks, .tool .sk-radios { display: grid; gap: 6px; }
.tool .sk-radios.sk-inline { grid-template-columns: 1fr 1fr; }
.tool .sk-radio { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.tool .sk-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.tool .sk-radio input { margin-top: 3px; }
.tool .sk-radio span { display: grid; gap: 2px; font-size: 13.5px; }
.tool .sk-radio small { color: var(--muted); font-size: 12px; }
.tool .sk-note { margin: 0; padding: 9px 12px; border-radius: var(--radius-sm); background: #fff7e6; color: #7a4b00; font-size: 12.5px; }
.tool .sk-mpg-line { margin: 0; font-size: 13px; font-weight: 600; }
.tool .sk-preview { position: sticky; top: 92px; display: grid; gap: 12px; }
.tool .sk-tabs { display: flex; gap: 2px; padding: 3px; width: fit-content; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.tool .sk-tabs button { border: 0; background: none; padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tool .sk-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tool .sk-paper-wrap { position: relative; overflow: hidden; }
.tool .sk-paper { transform-origin: top left; width: 8.5in; }
.tool .sk-paper .sk-page { box-shadow: 0 1px 3px rgba(16, 24, 40, .12), 0 10px 30px rgba(16, 24, 40, .12); margin-bottom: 28px; }
.tool .sk-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tool .sk-print-note { font-size: 12.5px; color: var(--muted); max-width: 420px; }
@media (max-width: 980px) {
  .tool .sk-layout { grid-template-columns: 1fr; }
  .tool .sk-preview { position: static; }
}
@media (max-width: 560px) {
  .tool .sk-grid, .tool .sk-equip, .tool .sk-radios.sk-inline { grid-template-columns: 1fr; }
}

/* The tool's own bar: country and the dealership shown on the sticker */
.tool-bar { display: grid; grid-template-columns: 150px 1fr 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 16px; }
.tool-bar .field { margin: 0; }
.tool-bar .colour { display: flex; gap: 8px; align-items: center; }
@media (max-width: 980px) { .tool-bar { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tool-bar { grid-template-columns: 1fr; } }

/* "Print free with a free account" */
.tool-gate { border: 0; padding: 0; border-radius: 16px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.tool-gate::backdrop { background: rgba(7, 8, 10, .55); }
.tool-gate-in { padding: 28px; display: grid; gap: 14px; font: 400 15px/1.5 var(--font); color: #14171c; }
.tool-gate h2 { font-size: 24px; font-stretch: 100%; letter-spacing: -.01em; line-height: 1.2; }
.tool-gate p { color: #4b5160; }
.tool-gate .gate-actions { display: grid; gap: 10px; margin-top: 4px; }
.tool-gate .gate-actions a { display: flex; align-items: center; justify-content: center; padding: 14px 20px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.tool-gate .gate-primary { background: #1d4ed8; color: #fff; }
.tool-gate .gate-secondary { border: 1px solid #cdd2da; color: #14171c; }
.tool-gate .gate-close { justify-self: center; border: 0; background: none; color: #646b78; font: 600 13px var(--font); cursor: pointer; }

/* Caption generator */
.cap-layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.cap-form { display: grid; gap: 0; }
.cap-results { display: grid; gap: 14px; }
.cap-empty { padding: 40px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.cap-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; }
.cap-card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cap-card h3 { font-size: 14px; }
.cap-card pre { margin: 0; white-space: pre-wrap; font: 400 15px/1.55 var(--font); color: var(--text); }
.cap-cta { background: #0c0d0f; color: #fff; border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cap-cta p { color: rgba(255, 255, 255, .8); margin: 0; font-size: 14px; }
.cap-cta strong { color: #fff; display: block; font-size: 16px; }
.cap-cta a { background: #fff; color: #0c0d0f; padding: 11px 18px; border-radius: 8px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.cap-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 900px) { .cap-layout { grid-template-columns: 1fr; } }
