/* Phone size comparator (/comparar-celular/). Markup: partials/celular-compare.html + celular-medidas.html. */
.cc {
  --cc-c1: #1B4F9C;
  --cc-c2: #D9480F;
  --cc-c3: #2B8A3E;
  --cc-ref: #8A6D00;
  --cc-screen: #1E293B;
  --cc-stage: #F1F5F9;
  margin: 18px 0 28px;
  color: var(--dica-body);
}
html[data-theme="dark"] .cc {
  --cc-c1: #7EB0F5;
  --cc-c2: #FF9A5C;
  --cc-c3: #69DB7C;
  --cc-ref: #F5C400;
  --cc-screen: #020617;
  --cc-stage: #111827;
}
.cc .cc-c1 { --c: var(--cc-c1); }
.cc .cc-c2 { --c: var(--cc-c2); }
.cc .cc-c3 { --c: var(--cc-c3); }
.cc .cc-reffig { --c: var(--cc-ref); }
.cc button { font: inherit; cursor: pointer; }
/* the theme's inline CSS caps every bare svg at 50px (icons) */
.cc svg { max-width: none; }

/* picker */
.cc-pick {
  border: 1px solid var(--dica-border);
  border-radius: 12px;
  padding: 12px;
  background: var(--dica-surface-raised);
}
.cc-slots { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 36px; margin-bottom: 10px; }
.cc-slots-hint { color: var(--dica-muted); font-size: 14px; }
.cc-slot {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 6px 5px 12px; border-radius: 999px;
  border: 2px solid var(--c); font-weight: 600; font-size: 14px; color: var(--dica-ink);
}
.cc-slot i, .cc-legend i, .cc-specs-table thead i {
  width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; flex: none;
}
.cc-slot button {
  border: 0; background: var(--dica-surface-soft); color: var(--dica-ink);
  width: 24px; height: 24px; border-radius: 50%; line-height: 22px; padding: 0; font-size: 16px;
}
.cc-search { position: relative; margin-bottom: 8px; }
.cc-search input {
  width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 16px;
  border: 1px solid var(--dica-border); background: var(--dica-surface); color: var(--dica-ink);
}
.cc-search-empty { display: block; margin-top: 6px; color: var(--dica-muted); font-size: 14px; }
.cc-search-empty[hidden] { display: none; }
.cc-rows[hidden] { display: none; }
.cc-pick-btns { margin: 0 0 8px; }
.cc-list-toggle {
  border: 0; background: none; color: var(--dica-action); font-weight: 600; font-size: 14px; padding: 4px 0;
  text-decoration: underline; text-underline-offset: 3px;
}
.cc-mine { font-size: 12px; font-weight: 600; color: var(--dica-muted); }
.cc-home { fill: none; stroke: var(--c); stroke-width: 1.5; }
.cc-ov .cc-home { display: none; }

/* visitor's own measurements */
.cc-own { margin-top: 10px; border-top: 1px solid var(--dica-border); padding-top: 8px; font-size: 14px; }
.cc-own summary { cursor: pointer; color: var(--dica-action); font-weight: 600; }
.cc-own p { margin: 8px 0; color: var(--dica-muted); font-size: 14px; }
.cc-own-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.cc-own-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dica-muted); }
.cc-own-fields input {
  width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 16px;
  border: 1px solid var(--dica-border); background: var(--dica-surface); color: var(--dica-ink);
}
.cc-own-add {
  border: 1px solid var(--dica-action); background: var(--dica-action); color: #fff;
  border-radius: 8px; padding: 8px 14px; font-size: 14px; font-weight: 600;
}
html[data-theme="dark"] .cc-own-add { color: #0B1220; }
.cc-own-err { display: block; margin-top: 8px; color: #C92A2A; font-size: 14px; }
.cc-own-err[hidden] { display: none; }
html[data-theme="dark"] .cc-own-err { color: #FF8787; }
.cc-rows { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.cc-row { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--dica-border); }
.cc-row:first-child { border-top: 0; }
.cc-row[hidden] { display: none; }
.cc-row-label { flex: 0 0 96px; font-size: 13px; color: var(--dica-muted); padding-top: 6px; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-chip {
  border: 1px solid var(--dica-border); background: var(--dica-surface); color: var(--dica-ink);
  padding: 5px 10px; border-radius: 999px; font-size: 13.5px; line-height: 1.3;
}
.cc-chip:hover { border-color: var(--dica-action-border); background: var(--dica-action-soft); }
.cc-chip[hidden] { display: none; }
.cc-chip.is-on { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); font-weight: 700; }
.cc-chip.is-on::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }

/* toolbar */
.cc-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 10px; }
.cc-seg { display: inline-flex; border: 1px solid var(--dica-border); border-radius: 10px; overflow: hidden; }
.cc-seg[hidden] { display: none; }
.cc-seg button {
  border: 0; border-left: 1px solid var(--dica-border); background: var(--dica-surface); color: var(--dica-ink);
  padding: 8px 12px; font-size: 14px;
}
.cc-seg button:first-child { border-left: 0; }
.cc-seg button[aria-pressed="true"] { background: var(--dica-action); color: #fff; }
html[data-theme="dark"] .cc-seg button[aria-pressed="true"] { color: #0B1220; }
.cc-ref { font-size: 14px; color: var(--dica-muted); display: inline-flex; gap: 6px; align-items: center; }
.cc-ref select {
  padding: 7px 8px; border-radius: 8px; border: 1px solid var(--dica-border);
  background: var(--dica-surface); color: var(--dica-ink); font-size: 14px;
}

/* stage */
.cc-stage {
  background: var(--cc-stage);
  border-radius: 12px;
  padding: 18px 12px 12px;
  overflow-x: auto;
  min-height: 200px;
  outline: none;
}
.cc-stage:focus-visible { box-shadow: 0 0 0 3px var(--dica-action-border); }
.cc-stage svg { display: block; overflow: visible; max-width: none; margin: 0; border: 0; }
.cc-row-figs { display: flex; gap: 18px; align-items: flex-end; justify-content: center; width: max-content; min-width: 100%; }
.cc-fig { margin: 0; display: flex; flex-direction: column; align-items: center; }
.cc-fig figcaption { text-align: center; margin-top: 8px; font-size: 13px; line-height: 1.3; max-width: 160px; }
.cc-fig figcaption b { display: block; color: var(--dica-ink); }
.cc-fig figcaption span { color: var(--dica-muted); white-space: nowrap; }
.cc-body { fill: color-mix(in srgb, var(--c) 12%, var(--dica-surface)); stroke: var(--c); stroke-width: 2; }
.cc-screen { fill: var(--cc-screen); stroke: none; }
.cc-cut { fill: #000; }
html[data-theme="dark"] .cc-cut { fill: #334155; }
.cc-foldline { stroke: #94A3B8; stroke-width: 1.5; stroke-dasharray: 4 4; }
.cc-ref-shape { fill: color-mix(in srgb, var(--cc-ref) 14%, var(--dica-surface)); stroke: var(--cc-ref); stroke-width: 2; stroke-dasharray: 6 4; }
.cc-ref-in { fill: none; stroke: var(--cc-ref); stroke-width: 1.2; opacity: .7; }
.cc-ov-wrap { display: flex; justify-content: center; width: max-content; min-width: 100%; }
.cc-ov .cc-body { fill: color-mix(in srgb, var(--c) 10%, transparent); stroke-width: 2.5; }
.cc-ov .cc-screen { fill: none; stroke: var(--c); stroke-width: 1; stroke-dasharray: 3 3; opacity: .8; }
.cc-th-list { display: flex; flex-direction: column; gap: 16px; width: max-content; min-width: 100%; padding: 6px 0; }
.cc-th { display: flex; align-items: center; gap: 16px; }
.cc-th-label { flex: none; font-size: 13px; line-height: 1.3; text-align: right; }
.cc-th-label b { display: block; color: var(--dica-ink); }
.cc-th-label span { color: var(--dica-muted); }
.cc-empty, .cc-noscript { text-align: center; color: var(--dica-muted); margin: 60px 0; }

.cc-scale { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin: 10px 0; }
.cc-scale-msg { margin: 0; font-size: 14px; color: var(--dica-muted); }
.cc-scale-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-scale-btns button, .cc-share, .cc-cal-actions button, .cc-cal-step {
  border: 1px solid var(--dica-action-border); background: var(--dica-surface); color: var(--dica-action);
  border-radius: 8px; padding: 8px 12px; font-size: 14px; font-weight: 600;
}
.cc-scale-btns button[aria-pressed="true"], .cc-cal-save { background: var(--dica-action) !important; color: #fff !important; border-color: var(--dica-action) !important; }
html[data-theme="dark"] .cc-scale-btns button[aria-pressed="true"], html[data-theme="dark"] .cc-cal-save { color: #0B1220 !important; }

/* calibration */
.cc-cal { border: 2px solid var(--dica-action-border); border-radius: 12px; padding: 14px; margin: 10px 0 14px; background: var(--dica-surface-raised); }
.cc-cal[hidden] { display: none; }
.cc-cal p { margin: 0 0 10px; font-size: 15px; }
.cc-cal-draw { overflow-x: auto; padding: 6px 0; }
.cc-cal-card { fill: color-mix(in srgb, var(--cc-ref) 16%, var(--dica-surface)); stroke: var(--cc-ref); stroke-width: 2; }
.cc-cal-ruler { height: 18px; border: 2px solid var(--dica-ink); border-top: 0; margin-top: 14px; position: relative; }
.cc-cal-ruler span { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); font-size: 12px; color: var(--dica-muted); }
.cc-cal-ctrl { display: flex; gap: 10px; align-items: center; margin: 26px 0 12px; }
.cc-cal-ctrl input { flex: 1; min-width: 0; accent-color: var(--dica-action); }
.cc-cal-step { width: 40px; padding: 6px 0; font-size: 18px; }
.cc-cal-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.cc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 14px; color: var(--dica-ink); }
.cc-legend:empty { display: none; }
.cc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cc-legend .cc-reffig i { background: none; border: 2px dashed var(--cc-ref); width: 10px; height: 10px; }
.cc-summary { font-size: 16px; margin: 14px 0 8px; color: var(--dica-ink); }
.cc-summary:empty { display: none; }
.cc-share-bar { margin: 0 0 12px; }
.cc-share[hidden] { display: none; }

/* specs of the selected phones */
.cc-specs-scroll { overflow-x: auto; }
.cc-specs-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cc-specs-table.cc-n3 { min-width: 460px; }
.cc-specs-table th, .cc-specs-table td { padding: 8px 10px; border-bottom: 1px solid var(--dica-border); text-align: left; vertical-align: top; }
.cc-specs-table thead th { color: var(--dica-ink); font-size: 15px; white-space: nowrap; }
.cc-specs-table thead i { margin-right: 6px; }
.cc-specs-table tbody th { color: var(--dica-muted); font-weight: 600; width: 28%; }
.cc-specs-table td { color: var(--dica-ink); }
.cc-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cc-specs-src, .cc-source { font-size: 13px; color: var(--dica-muted); margin: 8px 0 0; }

/* measurements table (dica-sort) */
.cc-med { margin: 14px 0 24px; }
.cc-med-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.cc-med-tools input {
  flex: 1 1 200px; padding: 9px 12px; border-radius: 8px; font-size: 16px;
  border: 1px solid var(--dica-border); background: var(--dica-surface); color: var(--dica-ink);
}
.cc-med-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-med-chips button {
  border: 1px solid var(--dica-border); background: var(--dica-surface); color: var(--dica-ink);
  padding: 5px 10px; border-radius: 999px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.cc-med-chips button[aria-pressed="true"], .cc-med-chips button.is-active { background: var(--dica-action); border-color: var(--dica-action); color: #fff; }
html[data-theme="dark"] .cc-med-chips button[aria-pressed="true"], html[data-theme="dark"] .cc-med-chips button.is-active { color: #0B1220; }
.cc-med-count { font-size: 14px; color: var(--dica-muted); }
.cc-med-scroll { overflow-x: auto; max-height: 560px; overflow-y: auto; border: 1px solid var(--dica-border); border-radius: 10px; }
.cc-med table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.cc-med th, .cc-med td { padding: 7px 10px; border-bottom: 1px solid var(--dica-border); white-space: nowrap; text-align: right; }
.cc-med th:first-child, .cc-med td:first-child { text-align: left; white-space: normal; min-width: 170px; }
.cc-med thead th { position: sticky; top: 0; background: var(--dica-surface-soft); color: var(--dica-ink); z-index: 1; }
.cc-med td { color: var(--dica-ink); }
.cc-med td small { color: var(--dica-muted); }

@media (max-width: 600px) {
  .cc-pick { padding: 10px; }
  .cc-row { flex-direction: column; gap: 4px; }
  .cc-row-label { flex: none; padding-top: 0; }
  .cc-rows { max-height: 260px; }
  .cc-bar { gap: 8px; }
  .cc-seg button { padding: 8px 10px; font-size: 13.5px; }
  .cc-stage { padding: 14px 8px 10px; }
  .cc-row-figs { gap: 10px; }
  .cc-fig figcaption { font-size: 12px; }
  .cc-own-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-specs-table { font-size: 13.5px; }
  .cc-specs-table th, .cc-specs-table td { padding: 7px 6px; }
  .cc-specs-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--dica-surface); width: 92px; min-width: 92px; font-size: 13px; }
  .cc-specs-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--dica-surface); }
  .cc-specs-table thead th { white-space: normal; }
  /* calibration card + ruler use the whole screen width */
  .cc-cal-draw { width: 100vw; margin-left: calc(50% - 50vw); display: flex; flex-direction: column; align-items: center; }
}

/* Wide tool layout: the comparator and the measurements table use the full width,
   the article text keeps a readable line length. */
@media (min-width: 1000px) {
  .page-comparar-celular .post-content > p,
  .page-comparar-celular .post-content > h2,
  .page-comparar-celular .post-content > h4,
  .page-comparar-celular .post-content > ul,
  .page-comparar-celular .post-content > ol,
  .page-comparar-celular .post-content > img,
  .page-comparar-celular .post-content > .resumo,
  .page-comparar-celular .post-content > .bloco-perito,
  .page-comparar-celular .post-content > .pros-con-wrapper,
  .page-comparar-celular .post-content > .titu-quote,
  .page-comparar-celular .post-content > .faq { max-width: 820px; }
  .page-comparar-celular .post-content > img { margin-left: 0; }
}
