/* ============================================================
   CALCULADORA24 — CSS Compartilhado  v1.3
   ============================================================ */

.calc-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 36px 40px;
  max-width: 780px;
  margin: 0 auto 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06), 0 24px 48px rgba(0,0,0,.04);
}

/* ── Campos ── */
.calc-field {
  margin-bottom: 16px;
}

.calc-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 6px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.calc-field input,
.calc-field select,
.calc-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  color: #111827;
  background: #f9fafb;
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.calc-field textarea {
  resize: vertical;
  min-height: 100px;
}

.calc-field input:focus,
.calc-field select:focus,
.calc-field textarea:focus {
  border-color: #16a34a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}

/* ── Grid de 2 columnas ── */
.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.calc-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

/* ── Checkbox ── */
.calc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
  margin-bottom: 16px;
  cursor: pointer;
  user-select: none;
}

.calc-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #16a34a;
}

/* ── Botones ── */
.calc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  font-family: inherit;
  box-shadow: 0 2px 4px rgba(22,163,74,.2), 0 6px 16px rgba(22,163,74,.2);
  margin-bottom: 4px;
  letter-spacing: .01em;
}

.calc-btn:hover  { opacity: .92; box-shadow: 0 4px 8px rgba(22,163,74,.25), 0 10px 24px rgba(22,163,74,.2); }
.calc-btn:active { transform: scale(.99); box-shadow: none; opacity: 1; }

.calc-btn-sm {
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
}

.calc-btn-ghost {
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.calc-btn-ghost:hover {
  background: #f9fafb;
  color: #374151;
}

.calc-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.calc-btn-row .calc-btn { flex: 1; }

/* ── Resultado ── */
.calc-result {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px solid #86efac;
  border-radius: 16px;
  padding: 24px 20px;
  margin-top: 20px;
  display: none;
  animation: c24FadeIn .25s ease both;
}

.calc-result.is-visible { display: block; }

@keyframes c24FadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.calc-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.calc-result-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  border: 1px solid #d1fae5;
  box-shadow: 0 1px 4px rgba(22,163,74,.06);
  transition: transform .15s, box-shadow .15s;
  overflow: hidden;
}

.calc-result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(22,163,74,.14);
}

.calc-result-num {
  display: block;
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 900;
  color: #16a34a;
  line-height: 1.1;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-result-lbl {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.calc-result-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: #16a34a;
  word-break: break-word;
}

/* ── Error ── */
.calc-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  color: #b91c1c;
  font-size: 14px;
  margin-top: 12px;
  display: none;
}

.calc-error.is-visible { display: block; }

/* ── Separador ── */
.calc-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 20px 0;
}

/* ── Etiqueta de sección ── */
.calc-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9ca3af;
  margin-bottom: 10px;
}

/* ── Área de texto de salida ── */
.calc-output {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #111827;
  min-height: 60px;
  word-break: break-word;
  white-space: pre-wrap;
  margin-top: 16px;
  display: none;
}

.calc-output.is-visible { display: block; }

/* ── Copy button ── */
.calc-copy-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.calc-copy-btn {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}

.calc-copy-btn:hover { background: #f3f4f6; color: #374151; }
.calc-copy-btn.copied { color: #16a34a; border-color: #16a34a; }

/* ── Contador de caracteres ── */
.calc-counter {
  font-size: 12px;
  color: #9ca3af;
  text-align: right;
  margin-top: 4px;
}

/* ── Tabla de resultados ── */
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.calc-table th {
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;
}

.calc-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

.calc-table tr:last-child td { border-bottom: none; }
.calc-table tr:nth-child(even) td { background: #f9fafb; }

/* ── Cuadrícula de portada ── */
.c24-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 12px 0 40px;
}

.c24-home-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s, transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.c24-home-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.c24-home-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 14px;
}

.c24-home-card__ico { font-size: 1.5rem; line-height: 1; }

.c24-home-card__title {
  font-size: 15px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  letter-spacing: -.01em;
}

.c24-home-card__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 6px 0 10px !important;
}

.c24-home-card__list li {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.c24-home-card__list li a {
  display: block;
  padding: 7px 18px;
  font-size: 13.5px;
  color: #374151;
  text-decoration: none;
  transition: background .12s, color .12s;
  border-radius: 0;
}

.c24-home-card__list li a:hover {
  background: #f0fdf4;
  color: #16a34a;
  padding-left: 24px;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .calc-wrap   { padding: 24px 18px; border-radius: 14px; }
  .calc-row    { grid-template-columns: 1fr; }
  .calc-row-3  { grid-template-columns: 1fr 1fr; }
  .calc-result-num { font-size: 1.6rem; }
  .calc-btn-row { flex-direction: column; }
  .calc-btn-row .calc-btn { flex: none; }
}

/* ── Ferramentas mais populares (homepage) ── */
.c24-popular {
  margin: 48px auto 0;
  max-width: 900px;
}
.c24-popular__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px;
}
.c24-popular__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.c24-popular__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 16px 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  text-decoration: none;
  color: #374151;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.c24-popular__card:hover {
  border-color: #86efac;
  box-shadow: 0 4px 16px rgba(22,163,74,.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: #111827;
}
.c24-popular__icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 2px;
}
.c24-popular__name {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}
.c24-popular__desc {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .c24-popular__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .c24-popular__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .c24-popular__card { padding: 12px 10px; }
}

/* ── Ferramentas relacionadas (interlinking) ── */
.c24-related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}
.c24-related__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9ca3af;
  margin: 0 0 12px;
}
.c24-related__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.c24-related__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  transition: background .15s, border-color .15s, transform .15s;
  line-height: 1.3;
}
.c24-related__card:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
  transform: translateY(-2px);
  text-decoration: none;
}
.c24-related__icon {
  font-size: 1.4rem;
  line-height: 1;
}
@media (max-width: 540px) {
  .c24-related__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Radio group ── */
.c24-radio-group { display:flex; gap:20px; padding:10px 0 4px; }
.c24-radio { display:flex; align-items:center; gap:6px; font-size:14px; color:#374151; cursor:pointer; }
.c24-radio input { width:16px; height:16px; accent-color:#16a34a; cursor:pointer; }

/* ── IMC display ── */
.c24-imc-display { text-align:center; padding:16px 0 8px; }
.c24-imc-value { font-size:3rem; font-weight:900; line-height:1; }
.c24-imc-cat   { font-size:1.1rem; font-weight:700; margin-top:6px; }

/* ── IMC bar ── */
.c24-imc-bar-wrap { margin:20px 0 0; }
.c24-imc-bar { display:flex; height:12px; border-radius:6px; overflow:hidden; }
.c24-imc-bar__seg { height:100%; }
.c24-imc-bar-labels { display:flex; justify-content:space-between; font-size:10px; color:#9ca3af; margin-top:4px; }
.c24-imc-pointer-wrap { position:relative; height:16px; }
.c24-imc-pointer { position:absolute; top:0; transform:translateX(-50%); width:0; height:0;
  border-left:6px solid transparent; border-right:6px solid transparent; border-top:10px solid #111827; }

/* ── TDEE goals ── */
.c24-tdee-goals { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:20px; }
.c24-tdee-goal { display:flex; flex-direction:column; align-items:center; gap:4px; padding:16px 10px;
  border-radius:12px; text-align:center; border:1px solid #e5e7eb; }
.c24-tdee-goal--loss  { background:#fef2f2; border-color:#fecaca; }
.c24-tdee-goal--maint { background:#f0fdf4; border-color:#bbf7d0; }
.c24-tdee-goal--gain  { background:#eff6ff; border-color:#bfdbfe; }
.c24-tdee-goal__ico   { font-size:1.4rem; }
.c24-tdee-goal__lbl   { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#6b7280; }
.c24-tdee-goal__val   { font-size:1.4rem; font-weight:900; color:#111827; }
.c24-tdee-goal__sub   { font-size:10px; color:#9ca3af; }

@media (max-width:520px) {
  .c24-tdee-goals { grid-template-columns:1fr; }
  .c24-imc-value  { font-size:2.2rem; }
}

/* ── Páginas de categoria ── */
.c24-cat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.c24-cat-header__ico   { font-size: 2.2rem; line-height: 1; }
.c24-cat-header__title { font-size: 1.6rem; font-weight: 800; color: #111827; margin: 0; }

.c24-cat-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.c24-cat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: #374151;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.c24-cat-card:hover {
  border-color: #86efac;
  box-shadow: 0 4px 16px rgba(22,163,74,.08);
  transform: translateX(3px);
  text-decoration: none;
  color: #111827;
}
.c24-cat-card__ico  { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.c24-cat-card__body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.c24-cat-card__name { font-size: 15px; font-weight: 700; color: #111827; }
.c24-cat-card__desc { font-size: 13px; color: #6b7280; }
.c24-cat-card__arrow { font-size: 1.1rem; color: #d1d5db; flex-shrink: 0; transition: color .15s; }
.c24-cat-card:hover .c24-cat-card__arrow { color: #16a34a; }

/* ── Conversor maiúsculas/minúsculas ── */
.c24-mm-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.c24-mm-btn {
  padding: 9px 18px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}
.c24-mm-btn:hover { background: #f0fdf4; border-color: #86efac; color: #16a34a; }
.c24-mm-btn--ghost { background: transparent; color: #9ca3af; border-color: #e5e7eb; font-weight: 400; }
.c24-mm-btn--ghost:hover { background: #fef2f2; border-color: #fecaca; color: #ef4444; }

/* ── Texto SEO homepage ── */
.c24-home-seo {
  max-width: 860px;
  margin: 48px auto 0;
  padding-top: 40px;
  border-top: 1px solid #e5e7eb;
  font-size: 15px;
  line-height: 1.75;
  color: #374151;
}
.c24-home-seo h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 12px;
}
.c24-home-seo h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #16a34a;
  margin: 28px 0 6px;
}
.c24-home-seo p { margin: 0 0 12px; }
.c24-home-seo a { color: #16a34a; text-decoration: underline; }
.c24-home-seo a:hover { color: #15803d; }

/* ── Calculadora de pace ── */
.c24-pace-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
}
.c24-pace-tab {
  flex: 1;
  padding: 9px 10px;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.c24-pace-tab.is-active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.c24-time-input {
  display: flex;
  align-items: center;
  gap: 4px;
}
.c24-time-input input {
  width: 56px !important;
  text-align: center;
  padding: 10px 6px !important;
}
.c24-time-input span { color: #9ca3af; font-weight: 700; }
@media (max-width: 520px) {
  .c24-pace-tabs { flex-direction: column; }
  .c24-time-input input { width: 48px !important; }
}

/* ── VO2 Max ── */
.c24-vo2-hint {
  font-size: 13px;
  color: #6b7280;
  background: #f9fafb;
  border-left: 3px solid #16a34a;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ── Calorias exercício ── */
.c24-ce-mode-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 3px;
}
.c24-ce-mode-btn {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.c24-ce-mode-btn.is-active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.c24-ce-mode-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.c24-ce-food-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.c24-ce-food-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}
.c24-ce-food-ico  { font-size: 1.5rem; line-height: 1; }
.c24-ce-food-qty  { font-size: 1.2rem; font-weight: 900; color: #16a34a; line-height: 1.2; }
.c24-ce-food-name { font-size: 10px; color: #6b7280; font-weight: 600; line-height: 1.3; }

@media (max-width: 520px) {
  .c24-ce-food-grid { grid-template-columns: repeat(2, 1fr); }
}
