/* Scoped styles for WP Loan Calculator */
#loan-calculator.lc-container,
.lc-container[data-lc] { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; }

.lc-card { max-width: 960px; margin: 24px auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.lc-title { font-size: 22px; font-weight: 700; text-align: center; margin: 6px 0 18px; }

.lc-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 16px 0; align-items: center; }
.lc-row .lc-label { font-weight: 600; margin-bottom: 6px; }
.lc-field { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: center; }

.lc-minmax { display: flex; justify-content: space-between; color: #6b7280; font-size: 12px; margin-top: 6px; }

.lc-input[type="number"] { width: 120px; padding: 8px 10px; border-radius: 8px; border: 1px solid #d1d5db; font-size: 14px; }
.lc-input[type="number"]:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.2); }

.lc-range { -webkit-appearance: none; appearance: none; height: 6px; background: #e5e7eb; border-radius: 999px; }
.lc-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: #3b82f6; border-radius: 50%; cursor: pointer; }
.lc-range::-moz-range-thumb { width: 18px; height: 18px; background: #3b82f6; border-radius: 50%; cursor: pointer; border: none; }

.lc-btn { background: #3b82f6; color: #fff; border: none; border-radius: 10px; padding: 12px 16px; font-weight: 700; font-size: 15px; cursor: pointer; width: 100%; }
.lc-btn:hover { background: #2563eb; }

/* Results */
.lc-results { max-width: 960px; margin: 18px auto; }
.lc-note { background: #f3f4f6; border-radius: 10px; padding: 12px 14px; color: #374151; font-size: 14px; }

.lc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0; }
.lc-kpi { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; text-align: left; }
.lc-kpi .lc-k { font-size: 12px; color: #6b7280; }
.lc-kpi .lc-v { font-size: 22px; font-weight: 800; margin-top: 4px; }

/* Progress bar */
.lc-progress { height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.lc-progress > span { display: block; height: 100%; width: 0; background: #10b981; transition: width .2s ease; }
.lc-verdict { margin-top: 8px; font-size: 14px; font-weight: 600; }
.lc-alert { margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.lc-alert.ok { background: #ecfdf5; color: #065f46; }
.lc-alert.warn { background: #fffbeb; color: #92400e; }
.lc-alert.bad { background: #fef2f2; color: #991b1b; }

/* Accordion */
.lc-acc { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.lc-acc-item + .lc-acc-item { border-top: 1px solid #e5e7eb; }
.lc-acc-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: #fff; cursor: pointer; }
.lc-acc-head h4 { margin: 0; font-size: 15px; }
.lc-acc-body { display: none; padding: 12px 14px; background: #fafafa; }
.lc-acc-item[aria-expanded="true"] .lc-acc-body { display: block; }

/* Responsive */
@media (max-width: 720px) {
  .lc-field { grid-template-columns: 1fr 100px; }
  .lc-grid { grid-template-columns: 1fr; }
}
