/**
 * Estilos para Calculadora de Terrenos y Financiamiento - Llanos y Valdez
 */

:root {
  --calc-primary: #0284c7;
  --calc-primary-hover: #0369a1;
  --calc-accent: #16a34a;
  --calc-accent-hover: #15803d;
  --calc-bg: #f8fafc;
  --calc-card-bg: #ffffff;
  --calc-text: #1e293b;
  --calc-text-muted: #64748b;
  --calc-border: #e2e8f0;
}

.calc-terreno-app.calc-wrapper {
  font-family: inherit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--calc-bg);
  border: 1px solid var(--calc-border);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 980px;
  margin: 20px auto;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  color: var(--calc-text);
  box-sizing: border-box;
}

.calc-terreno-app.calc-wrapper * {
  box-sizing: border-box;
}

/* Encabezado */
.calc-terreno-app .calc-header {
  text-align: center;
  margin-bottom: 24px;
}

.calc-terreno-app .calc-tag {
  display: inline-block;
  background: rgba(2, 132, 199, 0.12);
  color: var(--calc-primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.calc-terreno-app .calc-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.calc-terreno-app .calc-subtitle {
  font-size: 14px;
  color: var(--calc-text-muted);
  margin: 0;
}

/* Cuadrícula */
.calc-terreno-app .calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 768px) {
  .calc-terreno-app .calc-grid {
    grid-template-columns: 1fr;
  }
}

/* Tarjetas */
.calc-terreno-app .calc-inputs-card,
.calc-terreno-app .calc-summary-card {
  background: var(--calc-card-bg);
  border-radius: 14px;
  border: 1px solid var(--calc-border);
  padding: 20px;
}

.calc-terreno-app .calc-inputs-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.calc-terreno-app .calc-summary-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 4px solid var(--calc-primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Filas y Etiquetas */
.calc-terreno-app .calc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.calc-terreno-app .calc-label-row label,
.calc-terreno-app .calc-label-block {
  font-weight: 600;
  font-size: 14px;
  color: #334155;
  margin: 0;
}

.calc-terreno-app .calc-badge {
  background: #f1f5f9;
  color: var(--calc-primary);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.calc-terreno-app .calc-hint {
  font-size: 12px;
  color: #94a3b8;
}

.calc-terreno-app .calc-fixed-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 6px 12px;
  border-radius: 6px;
  margin-top: 6px;
}

/* Sliders */
.calc-terreno-app .calc-slider {
  width: 100%;
  height: 7px;
  border-radius: 5px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
  accent-color: var(--calc-primary);
  margin: 8px 0;
  -webkit-appearance: none;
  appearance: none;
}

.calc-terreno-app .calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--calc-primary);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s;
}

.calc-terreno-app .calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.calc-terreno-app .calc-range-limits {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
}

/* Inputs de Número */
.calc-terreno-app .calc-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.calc-terreno-app .calc-currency {
  position: absolute;
  left: 12px;
  font-weight: 600;
  color: #64748b;
  pointer-events: none;
}

.calc-terreno-app .calc-unit {
  position: absolute;
  right: 12px;
  font-size: 13px;
  color: #64748b;
  pointer-events: none;
}

.calc-terreno-app .calc-input-number {
  width: 100%;
  padding: 10px 14px;
  padding-left: 28px;
  padding-right: 70px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.calc-terreno-app .calc-input-number:focus {
  border-color: var(--calc-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.calc-terreno-app .calc-input-number[readonly] {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

/* Botones de Plazo */
.calc-terreno-app .calc-plazos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.calc-terreno-app .calc-plazo-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 4px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.calc-terreno-app .calc-plazo-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.calc-terreno-app .calc-plazo-btn.active {
  background: var(--calc-primary);
  color: #ffffff;
  border-color: var(--calc-primary);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.35);
}

/* Sección Resumen */
.calc-terreno-app .calc-summary-header h3 {
  font-size: 17px;
  margin: 0 0 4px 0;
  color: #0f172a;
  font-weight: 700;
}

.calc-terreno-app .calc-summary-header p {
  font-size: 13px;
  color: var(--calc-text-muted);
  margin: 0 0 16px 0;
}

.calc-terreno-app .calc-result-main {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  margin-bottom: 16px;
}

.calc-terreno-app .calc-result-sub {
  font-size: 13px;
  font-weight: 600;
  color: #166534;
  display: block;
  margin-bottom: 4px;
}

.calc-terreno-app .calc-result-big {
  font-size: 30px;
  font-weight: 800;
  color: #15803d;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.calc-terreno-app .calc-result-badge-plazo {
  display: inline-block;
  font-size: 12px;
  color: #166534;
  background: #dcfce7;
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: 6px;
  font-weight: 600;
}

.calc-terreno-app .calc-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.calc-terreno-app .calc-detail-item {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: #475569;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e2e8f0;
}

.calc-terreno-app .calc-detail-item.highlight {
  color: var(--calc-primary);
  font-weight: 600;
}

.calc-terreno-app .calc-detail-item strong {
  color: #0f172a;
  font-weight: 700;
}

/* Botón WhatsApp */
.calc-terreno-app .calc-btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--calc-accent);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none !important;
  padding: 12px 16px;
  border-radius: 8px;
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: center;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
}

.calc-terreno-app .calc-btn-whatsapp:hover {
  background: var(--calc-accent-hover);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.35);
}

.calc-terreno-app .calc-btn-whatsapp svg {
  flex-shrink: 0;
}

.calc-terreno-app .calc-disclaimer {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
  line-height: 1.4;
}
