/* TerraHome Convertidor Inmobiliario - estilos
 * Todas las variables y clases usan el prefijo "th-conv" para evitar
 * choques con el tema de WordPress u otros plugins.
 */
.th-conv-wrap {
  --th-navy: #0f2f2f;
  --th-teal: #1f6b6b;
  --th-gold: #c9a86a;
  --th-sand: #f5efe4;
  --th-cream: #fcfaf6;
  --th-text: #173131;
  --th-muted: #6c7d7d;
  --th-border: #d8d1c4;
  --th-shadow: 0 16px 40px rgba(15, 47, 47, 0.12);
  --th-radius-xl: 24px;
  --th-radius-lg: 18px;
  --th-radius-md: 14px;

  font-family: Inter, Arial, sans-serif;
  color: var(--th-text);
  box-sizing: border-box;
}
.th-conv-wrap *,
.th-conv-wrap *::before,
.th-conv-wrap *::after { box-sizing: border-box; }

.th-conv-page {
  display: grid;
  place-items: center;
  padding: 28px;
  background: linear-gradient(135deg, var(--th-cream) 0%, #eef4f3 100%);
}
.th-conv-shell {
  width: 100%;
  max-width: 980px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(201,168,106,0.24);
  border-radius: 28px;
  box-shadow: var(--th-shadow);
  overflow: hidden;
}
.th-conv-top-bar {
  padding: 28px 32px 18px;
  background: linear-gradient(135deg, #f6f8f7, #eef4f3);
  color: var(--th-text);
  position: relative;
}
.th-conv-top-bar::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,106,0.28), transparent 70%);
}
.th-conv-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.th-conv-brand-badge {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--th-gold), #b98d49);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 12px 24px rgba(201,168,106,0.25);
}
.th-conv-headline {
  margin: 0 auto;
  text-align: center;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.05;
  max-width: 18ch;
  color: var(--th-navy);
}
.th-conv-subheadline {
  margin: 12px auto 0;
  max-width: 64ch;
  text-align: center;
  color: var(--th-muted);
  line-height: 1.6;
  font-size: 0.98rem;
}
.th-conv-body-wrap {
  padding: 28px 32px 32px;
}
.th-conv-switcher {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background: #f1f4f3;
  border-radius: 16px;
  padding: 8px;
  border: 1px solid rgba(15,47,47,0.08);
  margin-bottom: 20px;
}
.th-conv-switcher button {
  border: none;
  cursor: pointer;
  padding: 14px 12px;
  border-radius: 12px;
  background: transparent;
  color: var(--th-muted);
  font-weight: 800;
  font: inherit;
  transition: all .16s ease;
}
.th-conv-switcher button.active {
  background: linear-gradient(135deg, var(--th-teal), var(--th-navy));
  color: white;
  box-shadow: 0 10px 18px rgba(15,47,47,0.16);
}
.th-conv-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.th-conv-field {
  background: #fff;
  border: 1px solid rgba(15,47,47,0.08);
  border-radius: var(--th-radius-lg);
  padding: 16px;
}
.th-conv-field.full {
  grid-column: 1 / -1;
}
.th-conv-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--th-muted);
  font-weight: 800;
}
.th-conv-input-wrap {
  position: relative;
}
.th-conv-field input,
.th-conv-field select {
  width: 100%;
  border: 1px solid #d7dfde;
  border-radius: 12px;
  padding: 14px 14px;
  font: inherit;
  color: var(--th-text);
  background: #fff;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.th-conv-field input:focus,
.th-conv-field select:focus {
  border-color: rgba(31,107,107,0.55);
  box-shadow: 0 0 0 4px rgba(31,107,107,0.08);
}
.th-conv-unit-chip {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(31,107,107,0.08);
  color: var(--th-teal);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  pointer-events: none;
}
.th-conv-cta-row {
  display: flex;
  justify-content: center;
  margin: 22px 0 24px;
}
.th-conv-btn-convert {
  border: none;
  cursor: pointer;
  min-width: 220px;
  padding: 16px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--th-gold), #b98d49);
  color: white;
  font: inherit;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: 0 14px 28px rgba(201,168,106,0.24);
  transition: transform .16s ease, box-shadow .16s ease;
}
.th-conv-btn-convert:hover { transform: translateY(-1px); }
.th-conv-btn-convert:active { transform: translateY(0); }
.th-conv-result-panel {
  background: linear-gradient(135deg, rgba(31,107,107,0.06), rgba(201,168,106,0.08));
  border: 1px solid rgba(15,47,47,0.08);
  border-radius: 22px;
  padding: 22px;
}
.th-conv-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
.th-conv-result-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15,47,47,0.08);
  border-radius: 16px;
  padding: 16px;
}
.th-conv-result-card span {
  display: block;
  font-size: 0.8rem;
  color: var(--th-muted);
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.th-conv-result-card strong {
  display: block;
  color: var(--th-navy);
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  line-height: 1.15;
}
.th-conv-result-note {
  margin-top: 16px;
  color: var(--th-muted);
  line-height: 1.6;
  font-size: 0.92rem;
}
.th-conv-result-note.th-conv-error {
  color: #b3261e;
  font-weight: 700;
}
@media (max-width: 760px) {
  .th-conv-page { padding: 14px; }
  .th-conv-top-bar, .th-conv-body-wrap { padding-left: 18px; padding-right: 18px; }
  .th-conv-field-grid, .th-conv-result-grid { grid-template-columns: 1fr; }
  .th-conv-headline { max-width: none; }
}
