/* Calculadora de medida de pneu: usa as cores e componentes do style.css */

.calc-page { background: var(--bg); }
.cz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 34px; }
.cz-brand img { height: 30px; width: auto; }
.cz-back {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 13px; font-weight: 800;
}
.cz-back svg { width: 18px; height: 18px; }

.cz { max-width: 720px; margin: 0 auto; padding: 10px 10px 28px; display: grid; gap: 10px; }

.cz-hero {
  padding: 22px 22px 30px; border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(38, 118, 170, .5), rgba(38, 118, 170, 0) 60%),
    var(--navy);
  color: #fff;
}
.cz-hero { position: relative; overflow: hidden; }
.cz-hero > *:not(.cz-hero-img) { position: relative; z-index: 1; }
/* celular: pneus pequenos no canto direito, ao lado do texto (como no computador) */
.cz-hero-img { position: absolute; right: 18px; bottom: 26px; display: block; width: 40%; max-width: 190px; margin: 0; }
.cz-hero-img img { position: relative; z-index: 1; width: 100%; height: auto; } /* a sombra já vem na imagem */
.cz-hero h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; }
.cz-hero h1 span { display: block; color: var(--green-text); }
.cz-hero p { margin-top: 12px; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .75); max-width: 44ch; }
.cz-hero > p { max-width: 60%; }

.cz-form { display: grid; gap: 10px; position: relative; }
.cz-card { margin: 0; min-width: 0; border: 0; padding: 24px 22px; border-radius: var(--radius); background: #fff; }
.cz-leg { float: left; width: 100%; padding: 0; display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--ink); }
.cz-leg b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 13px; }
.cz-leg + * { clear: both; }
.cz-hint { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.cz-hint b { color: var(--ink-2); }

.cz-fields { display: flex; align-items: flex-end; gap: 6px; margin-top: 16px; }
.cz-f { flex: 1; display: grid; gap: 6px; min-width: 0; }
.cz-f > span { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cz-f select {
  width: 100%; height: 56px; padding: 0 28px 0 14px;
  border-radius: 16px; border: 0;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23003a5d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 12px no-repeat;
  font-size: 20px; font-weight: 800; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.cz-sep { font-size: 22px; font-weight: 800; padding-bottom: 14px; color: var(--muted); }
.cz-diam { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.cz-diam b { color: var(--navy); font-weight: 800; }

/* botão de inverter, entre os dois cards */
.cz-swap {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; box-shadow: 0 0 0 6px var(--bg);
}
.cz-swap svg { width: 20px; height: 20px; }

/* resultado */
.cz-result {
  padding: 26px 22px; border-radius: var(--radius);
  background: var(--navy); color: #fff;
  display: grid; gap: 18px;
}
.cz-badge {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.cz-badge::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.cz-result[data-state="ok"] .cz-badge { background: var(--green); }
.cz-result[data-state="ok"] .cz-badge::before { background: #fff; }
.cz-result[data-state="bad"] .cz-badge { background: #e2563b; }
.cz-result[data-state="bad"] .cz-badge::before { background: #fff; }

.cz-big { display: grid; gap: 2px; }
.cz-big b { font-size: clamp(3rem, 15vw, 4.4rem); line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.cz-big span { font-size: 14px; color: rgba(255, 255, 255, .7); }
.cz-result[data-state="ok"] .cz-big b { color: var(--green-text); }
.cz-result[data-state="bad"] .cz-big b { color: #ff8a6e; }

.cz-track { position: relative; height: 12px; border-radius: 999px; background: rgba(226, 86, 59, .55); }
.cz-ok { position: absolute; left: 25%; right: 25%; top: 0; bottom: 0; background: var(--green); }
.cz-mark {
  position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--navy), 0 4px 10px rgba(0, 0, 0, .3);
  transition: left .35s var(--ease);
}
.cz-result[data-state="empty"] .cz-mark { opacity: 0; }
.cz-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, .55); }

.cz-tires { display: flex; justify-content: center; }
.cz-tires:empty { display: none; }
.cz-wheels { display: block; margin: 0 auto; }

.cz-data { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cz-data div { padding: 12px 14px; border-radius: 16px; background: rgba(0, 0, 0, .2); }
.cz-data dt { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.cz-data dd { margin: 2px 0 0; font-size: 18px; font-weight: 800; }
.cz-speed-note { font-size: 14px; color: rgba(255, 255, 255, .8); }
.cz-speed-note:empty { display: none; }
.cz-why { padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .2); font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .72); }
.cz-why::before { content: "Por quê? "; font-weight: 800; color: #fff; }
.cz-why:empty { display: none; }

.cz-rules h2, .cz-cta h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.cz-rules ul { margin-top: 14px; display: grid; gap: 10px; counter-reset: r; }
.cz-rules li { position: relative; padding-left: 38px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); counter-increment: r; }
.cz-rules li::before {
  content: counter(r); position: absolute; left: 0; top: -1px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); color: var(--navy); font-size: 13px; font-weight: 800;
}
.cz-rules li b { color: var(--ink); }
.cz-fine { margin-top: 14px; font-size: 13px; color: var(--muted); }

.cz-cta { display: grid; gap: 14px; }
.cz-cta .seg { background: var(--bg); }

.cz-foot { text-align: center; padding: 0 18px 28px; font-size: 12.5px; color: var(--muted); }

.cz-link { color: var(--green-2); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.cz-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cz-close { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--navy); flex: none; }
.cz-close svg { width: 18px; height: 18px; }
.cz-guide:not([hidden]) { animation: cz-in .3s var(--ease); }
@keyframes cz-in { from { opacity: 0; transform: translateY(-8px); } }
.cz-idx { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.cz-idx h3 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.cz-close-all { margin-top: 16px; width: 100%; height: 48px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); }

/* como ler o pneu */
.cz-guide h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.cz-code {
  margin-top: 16px; padding: 16px 12px; border-radius: 20px;
  background: #11181d; color: #fff;
  display: flex; flex-wrap: nowrap; align-items: baseline; justify-content: center; gap: 2px;
  font-size: clamp(22px, 6.6vw, 36px); white-space: nowrap; font-weight: 800; letter-spacing: .02em;
}
.cz-part { padding: 2px 5px; border-radius: 10px; color: rgba(255, 255, 255, .85); transition: background-color .2s, color .2s; }
.cz-part.on { background: var(--lime); color: var(--navy); }
.cz-slash { color: rgba(255, 255, 255, .45); }
.cz-code .cz-part[data-part="l"] { margin-left: 8px; }
.cz-explain { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--bg); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.cz-explain b { color: var(--ink); }
.cz-legend { margin-top: 14px; display: grid; gap: 8px; }
.cz-legend li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.cz-legend b { font-size: 15px; color: var(--navy); }
.cz-legend em { font-style: normal; font-weight: 800; color: var(--ink); }

/* índice: comparador */
.cz-idx-grid { margin-top: 14px; display: grid; gap: 10px; }
.cz-idx-col { padding: 14px; border-radius: 20px; background: var(--bg); }
.cz-idx-col .cz-fields { margin-top: 8px; }
.cz-idx-col .cz-f select { background-color: #fff; height: 52px; font-size: 18px; }
.cz-idx-t { font-size: 14px; font-weight: 800; color: var(--ink); }
.cz-idx-val { margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.cz-idx-res { margin-top: 12px; padding: 14px 16px; border-radius: 16px; font-size: 14.5px; font-weight: 700; line-height: 1.45; background: var(--bg); color: var(--muted); }
.cz-idx-res[data-state="ok"] { background: rgba(58, 175, 42, .14); color: #1f6f17; }
.cz-idx-res[data-state="bad"] { background: rgba(226, 86, 59, .14); color: #a8341d; }
.cz-table { margin-top: 10px; border-radius: 16px; background: var(--bg); }
.cz-table summary { padding: 14px 16px; font-size: 14px; font-weight: 800; color: var(--navy); cursor: pointer; }
.cz-tbl { padding: 0 12px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.cz-tbl span { padding: 8px 10px; border-radius: 12px; background: #fff; font-size: 13px; color: var(--ink-2); display: grid; }
.cz-tbl b { font-size: 15px; color: var(--navy); }

@media (min-width: 760px) {
  .cz-idx-grid { grid-template-columns: 1fr 1fr; }
  .cz { padding: 18px 0 40px; gap: 14px; }
  .cz-hero { padding: 26px 40px 40px; }
  .cz-hero-img { position: absolute; right: 36px; bottom: 34px; width: 40%; max-width: 310px; margin: 0; }
  .cz-hero h1, .cz-hero > p { max-width: 54%; }
  .cz-top { margin-bottom: 44px; }
  .cz-brand img { height: 34px; }
  .cz-form { grid-template-columns: 1fr 1fr; gap: 14px; }
  .cz-card { padding: 28px 26px; }
  .cz-result { padding: 32px 30px; }
  .cz-data { grid-template-columns: repeat(4, 1fr); }
}
