/* Home Equity Loan Calculator — Scoped CSS | Plugin: smarttools-finance */

.hel-wrap * { box-sizing: border-box; margin: 0; padding: 0; }

.hel-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 1000px;
  margin: 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
}

/* =====================
   HEADER
   ===================== */
.hel-header {
  background: #1e1b4b;
  color: #fff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hel-header-icon { font-size: 34px; flex-shrink: 0; }
.hel-header-title { color:white; font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.hel-header-sub { font-size: 12px; color: #a5b4fc; }

/* =====================
   BODY LAYOUT — Mobile first
   ===================== */
.hel-body { display: flex; flex-direction: column; }

/* Tablet (481–899px): still stacked but wider grids */
@media(min-width: 481px) and (max-width: 899px) {
  .hel-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .hel-dti-row { flex-wrap: nowrap; }
}

/* Desktop (900px+): side by side, NO sticky, NO max-height, NO overflow-y */
@media(min-width: 900px) {
  .hel-body { flex-direction: row; align-items: flex-start; }
  .hel-form { width: 44%; border-right: 1px solid #e2e8f0; flex-shrink: 0; }
  .hel-results { width: 56%; }
}

/* =====================
   FORM
   ===================== */
.hel-form { padding: 20px; }
.hel-field-group { margin-bottom: 15px; }

.hel-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.hel-hint-inline {
  font-weight: 400;
  color: #6b7280;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}

/* Choice Buttons */
.hel-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.hel-choice {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.hel-choice:hover { border-color: #1e1b4b; color: #ffffff; }
.hel-choice.active { background: #1e1b4b; border-color: #1e1b4b; color: #fff; }

/* Input wrap (for unit suffix like %) */
.hel-input-wrap { position: relative; display: flex; align-items: center; }
.hel-input {
  width: 100%;
  padding: 9px 38px 9px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 7px;
  font-size: 14px;
  color: #1f2937;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
  appearance: textfield;
}
.hel-input::-webkit-inner-spin-button,
.hel-input::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.hel-input:focus { border-color: #1e1b4b; box-shadow: 0 0 0 3px rgba(30,27,75,0.09); }
.hel-unit {
  position: absolute;
  right: 12px;
  color: #6b7280;
  font-size: 13px;
  pointer-events: none;
}

/* Input Group (for $ prefix — flex sibling pattern, no overlap) */
.hel-input-group {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #d1d5db;
  border-radius: 7px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.hel-input-group:focus-within {
  border-color: #1e1b4b;
  box-shadow: 0 0 0 3px rgba(30,27,75,0.09);
}
.hel-input-addon {
  display: flex;
  align-items: center;
  padding: 0 10px 0 12px;
  color: #6b7280;
  font-size: 14px;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.hel-input-addon-field {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
}

/* Hint */
.hel-hint { font-size: 11px; color: #9ca3af; margin-top: 5px; font-style: italic; }

/* Divider */
.hel-divider { border: none; border-top: 1px solid #e2e8f0; margin: 18px 0 14px; }

/* Section Title */
.hel-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Disclaimer */
.hel-disclaimer {
  background: #fef9c3;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 11px;
  color: #713f12;
  line-height: 1.6;
  margin-top: 16px;
}

/* =====================
   RESULTS PANEL
   ===================== */
.hel-results {
  background: #eef2ff;
  padding: 20px;
}

/* Placeholder */
.hel-placeholder {
  text-align: center;
  padding: 50px 24px;
  color: #6b7280;
}
.hel-placeholder-icon { font-size: 52px; margin-bottom: 14px; }
.hel-placeholder p { font-size: 13px; line-height: 1.7; }

/* =====================
   A. MAX EQUITY CARD
   ===================== */
.hel-equity-card {
  background: #1e1b4b;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 12px;
  color: #fff;
}
.hel-equity-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 16px;
  gap: 12px;
}
.hel-equity-item { text-align: center; flex: 1; }
.hel-equity-label { font-size: 11px; color: #a5b4fc; margin-bottom: 4px; }
.hel-equity-value { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.hel-equity-sub { font-size: 10px; color: #818cf8; margin-top: 2px; }
.hel-equity-sep { width: 1px; height: 48px; background: rgba(165,180,252,0.3); flex-shrink: 0; }

/* CLTV Progress Bar */
.hel-cltv-wrap { margin-bottom: 10px; }
.hel-cltv-track {
  position: relative;
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.hel-cltv-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: #6366f1;
  transition: width 0.4s ease;
}
.hel-cltv-limit-mark {
  position: absolute;
  top: 0;
  left: 80%;
  width: 2px;
  height: 100%;
  background: #fbbf24;
  opacity: 0.9;
}
.hel-cltv-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #a5b4fc;
}
.hel-cltv-verdict {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
}

/* =====================
   B. HERO PAYMENT CARD
   ===================== */
.hel-hero-card {
  background: #fff;
  border: 1px solid #e0e7ff;
  border-radius: 10px;
  padding: 18px 20px;
  text-align: center;
  margin-bottom: 12px;
}
.hel-hero-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.hel-hero-value { font-size: 38px; font-weight: 800; color: #1e1b4b; letter-spacing: -1px; margin-bottom: 4px; }
.hel-hero-sub { font-size: 12px; color: #6366f1; }

/* =====================
   F. STATS GRID
   ===================== */
.hel-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
@media(min-width: 481px) {
  .hel-stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.hel-stat {
  background: #fff;
  border: 1px solid #e0e7ff;
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
}
.hel-stat-label { font-size: 10px; color: #6b7280; margin-bottom: 4px; line-height: 1.3; }
.hel-stat-value { font-size: 14px; font-weight: 700; color: #1e1b4b; }
.hel-stat-sm { font-size: 12px; }

/* =====================
   SECTION CARDS (C, D, E)
   ===================== */
.hel-card {
  background: #fff;
  border: 1px solid #e0e7ff;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.hel-card-title {
  background: #1e1b4b;
  color: #fff;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* C. Comparison Table */
.hel-compare-table { }
.hel-compare-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  padding: 9px 14px;
  font-size: 11px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  gap: 4px;
  align-items: center;
}
.hel-compare-last { border-bottom: none; }
.hel-compare-header {
  background: #f5f3ff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #4338ca;
  letter-spacing: 0.3px;
}
.hel-compare-row div:not(:first-child) { text-align: center; font-weight: 600; }
.hel-compare-header div:not(:first-child) { font-weight: 700; }

/* Rate Warning */
.hel-rate-warning {
  background: #fff7ed;
  border-top: 1px solid #fed7aa;
  padding: 10px 14px;
  font-size: 12px;
  color: #9a3412;
  line-height: 1.5;
}

/* D. Tax Verdict */
.hel-tax-verdict {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
}
.hel-tax-icon { font-size: 24px; flex-shrink: 0; }
.hel-tax-title { font-size: 14px; font-weight: 700; color: #1f2937; margin-bottom: 3px; }
.hel-tax-sub { font-size: 12px; color: #6b7280; line-height: 1.5; }

/* E. DTI Check */
.hel-dti-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 14px;
  gap: 8px;
  flex-wrap: wrap;
}
.hel-dti-item { text-align: center; }
.hel-dti-label { font-size: 10px; color: #6b7280; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.hel-dti-value { font-size: 22px; font-weight: 800; color: #1e1b4b; }
.hel-dti-limit { color: #dc2626; }
.hel-dti-arrow { font-size: 18px; color: #9ca3af; flex-shrink: 0; }
.hel-dti-verdict {
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border-top: 1px solid #f3f4f6;
}

/* =====================
   MOBILE (max 480px)
   ===================== */
@media(max-width: 480px) {
  .hel-form, .hel-results { padding: 14px; }
  .hel-header { padding: 14px; gap: 10px; }
  .hel-header-icon { font-size: 26px; }
  .hel-header-title { font-size: 16px; }
  .hel-header-sub { font-size: 11px; }
  .hel-hero-value { font-size: 30px; }
  .hel-equity-value { font-size: 20px; }
  .hel-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hel-compare-row { font-size: 10px; padding: 7px 10px; gap: 2px; grid-template-columns: 1fr 0.8fr 0.8fr 1fr; }
  .hel-choice { padding: 6px 10px; font-size: 11px; }
  .hel-dti-row { flex-direction: column; gap: 4px; }
  .hel-dti-arrow { transform: rotate(90deg); }
  .hel-equity-row { flex-direction: column; gap: 8px; }
  .hel-equity-sep { width: 80%; height: 1px; }
}
