/* ═══════════════════════════════════════════════════════════════
   XLPE Cable Calculator v7 — circuitmasterclass.com
   ═══════════════════════════════════════════════════════════════ */

.xlpecalc-wrap {
  font-family: inherit;
  color: #333;
  max-width: 760px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* ── Intro ────────────────────────────────────────────────────── */
.xlpecalc-intro {
  background: #f0f6ff;
  border-left: 4px solid #1a73e8;
  padding: 0.8rem 1rem;
  border-radius: 0 4px 4px 0;
  margin-bottom: 1.4rem;
  font-size: 0.9rem;
}
.xlpecalc-intro p { margin: 0 0 0.3rem; }
.xlpecalc-intro p:last-child { margin-bottom: 0; }
.xlpecalc-intro-note { font-size: 0.82rem; color: #555; }

/* ── Form card ────────────────────────────────────────────────── */
.xlpecalc-form {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  padding: 1.4rem 1.5rem 1.2rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.xlpecalc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}
@media (max-width: 560px) {
  .xlpecalc-fields { grid-template-columns: 1fr; }
}

.xlpecalc-field { display: flex; flex-direction: column; }

.xlpecalc-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.3rem;
}

.xlpecalc-field select {
  border: 1px solid #c8d0da;
  border-radius: 4px;
  padding: 0.44rem 2rem 0.44rem 0.65rem;
  font-size: 0.87rem;
  color: #333;
  background: #fafbfc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .15s;
}
.xlpecalc-field select:focus {
  outline: none;
  border-color: #1a73e8;
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(26,115,232,.12);
}
.xlpecalc-hint { font-size: 0.72rem; color: #888; margin-top: 0.2rem; line-height: 1.4; }

/* ── Button ───────────────────────────────────────────────────── */
.xlpecalc-btn-row { margin-top: 1.2rem; text-align: center; }
.xlpecalc-btn {
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 2.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .15s;
}
.xlpecalc-btn:hover { background: #1558c0; }

/* ── Loader ───────────────────────────────────────────────────── */
.xlpecalc-loader {
  padding: 1.2rem;
  text-align: center;
  font-size: 0.88rem;
  color: #555;
}
.xlpecalc-spinner {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid #c8d0da;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: xlpe-spin .6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes xlpe-spin { to { transform: rotate(360deg); } }

/* ── Results header ───────────────────────────────────────────── */
.xlpecalc-res-header {
  background: #1a73e8;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 6px 6px 0 0;
  font-size: 0.87rem;
  font-weight: 600;
}

/* ── Verdict boxes ────────────────────────────────────────────── */
.xlpecalc-verdicts { display: flex; gap: 0.55rem; flex-wrap: wrap; padding: 0.7rem 0 0.2rem; }
.xlpe-verdict {
  flex: 1; min-width: 200px;
  padding: 0.55rem 0.85rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}
.xlpe-verdict.pass { background:#f0fdf4; border-color:#86efac; color:#166534; }
.xlpe-verdict.fail { background:#fef2f2; border-color:#fca5a5; color:#991b1b; }
.xlpe-verdict.info { background:#eff6ff; border-color:#93c5fd; color:#1e40af; }
.xlpe-verdict-icon { flex-shrink: 0; }

/* ── Results table — 2 columns ────────────────────────────────── */
.xlpecalc-tbl-wrap {
  overflow-x: auto;
  border: 1px solid #dde3ea;
  border-top: none;
  border-radius: 0 0 6px 6px;
  margin-bottom: 1rem;
}
.xlpecalc-tbl { width: 100%; border-collapse: collapse; }

.xlpecalc-tbl thead th {
  background: #f5f7fa;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #555;
  padding: 0.52rem 1rem;
  border-bottom: 1px solid #dde3ea;
  text-align: left;
}
.th-param { width: 58%; }
.th-val   { width: 42%; }

.xlpecalc-tbl tbody tr           { border-bottom: 1px solid #eef0f4; }
.xlpecalc-tbl tbody tr:last-child{ border-bottom: none; }
.xlpecalc-tbl tbody tr:nth-child(even) { background: #fafbfc; }

/* Section separator rows */
.xlpecalc-tbl tr.xlpe-sec td {
  background: #eef3fb;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #1a73e8;
  padding: 0.36rem 1rem;
  border-top: 1px solid #d4e2f7;
  border-bottom: 1px solid #d4e2f7;
}

.xlpecalc-tbl td {
  padding: 0.48rem 1rem;
  vertical-align: middle;
  font-size: 0.84rem;
}
.xlpecalc-tbl td.col-param { color: #333; }
.xlpecalc-tbl td.col-val {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #1a73e8;
}

/* Value colour overrides */
.xlpecalc-tbl td.v-pass { color: #166534 !important; }
.xlpecalc-tbl td.v-fail { color: #991b1b !important; }
.xlpecalc-tbl td.v-info { color: #1e40af !important; }

/* ── Disclaimer ───────────────────────────────────────────────── */
.xlpecalc-disclaimer {
  font-size: 0.76rem;
  color: #888;
  text-align: center;
  margin: 0.2rem 0 0;
}
