/* EPC Near Me — public "Check an EPC" tool (see static-search/epc-check.js).
   Mobile-first: on a phone the card padding is tight, the fact grid is a single
   column of label/value rows, and the rating chart stays legible at 320px. */
#enm-epc-check .enm-epc-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 0;
}
#enm-epc-check .enm-epc-form input {
  border: 2px solid #dcebe2;
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 16px;                 /* 16px stops iOS zooming on focus */
  font-family: inherit;
  min-width: 0;
}
#enm-epc-check .enm-epc-form input:focus { border-color: #25C146; outline: none; }
#enm-epc-check .enm-epc-house { flex: 1 1 210px; }
#enm-epc-check .enm-epc-pc { flex: 1 1 140px; }
#enm-epc-check .enm-epc-form button {
  background: #25C146;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  padding: 13px 26px;
  cursor: pointer;
  font-family: inherit;
  flex: 0 0 auto;
}
#enm-epc-check .enm-epc-form button:hover { background: #1eab3c; }
#enm-epc-check .enm-epc-form button:disabled { opacity: .65; cursor: default; }

/* result rows */
#enm-epc-check .enm-epc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid #dcebe2;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
}
#enm-epc-check .enm-epc-item:hover { border-color: #25C146; background: #f7fdf9; }
#enm-epc-check .enm-epc-item .t { flex: 1 1 auto; min-width: 0; }
#enm-epc-check .enm-epc-item .t b {
  display: block; font-weight: 800; color: #16241d; font-size: 15.5px; line-height: 1.35;
}
#enm-epc-check .enm-epc-item .t span {
  display: block; font-size: 13.5px; color: #4b5f55; margin-top: 2px;
}
#enm-epc-check .enm-epc-item .go { color: #25C146; font-weight: 800; font-size: 14px; flex: 0 0 auto; }

/* certificate card */
.enm-epc-cert {
  background: #f2faf5;
  border: 1px solid #dcebe2;
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
}
.enm-epc-cert-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.enm-epc-cert-head h3 { margin: 0; font-size: 18px; color: #16241d; line-height: 1.3; }
.enm-epc-cert-head p { margin: 3px 0 0; font-size: 13.5px; color: #4b5f55; overflow-wrap: anywhere; }
.enm-epc-warn {
  margin: 14px 0 0; background: #fde8e8; border: 1px solid #f5c2c2; color: #9b2c2c;
  font-weight: 700; border-radius: 10px; padding: 12px 14px; font-size: 15px; line-height: 1.5;
}

/* A–G chart */
.enm-epc-chart { margin: 18px 0 0; background: #fff; border: 1px solid #dcebe2; border-radius: 12px; padding: 14px; }
.enm-epc-chart-head { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #4b5f55; margin-bottom: 10px; }
.enm-epc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.enm-epc-bar {
  display: flex; align-items: center; justify-content: space-between;
  min-width: 84px; padding: 5px 8px; border-radius: 3px;
  font-size: 12.5px; font-weight: 700; box-sizing: border-box;
}
.enm-epc-letter { font-size: 15px; font-weight: 800; margin-left: 8px; }
.enm-epc-marks { display: flex; gap: 5px; flex: 1 1 auto; flex-wrap: wrap; }
.enm-epc-mk {
  display: inline-block; color: #fff; font-size: 11.5px; font-weight: 800;
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.enm-epc-chart-foot { margin: 10px 0 0; font-size: 12.5px; color: #4b5f55; line-height: 1.5; }

/* fact list — one column on a phone, two from 560px */
.enm-epc-facts { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 16px 0 0; }
.enm-epc-fact {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  background: #fff; border: 1px solid #dcebe2; border-radius: 10px; padding: 10px 13px;
}
.enm-epc-fact span { font-size: 12.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: #4b5f55; flex: 0 0 auto; }
.enm-epc-fact b { color: #16241d; font-size: 14.5px; text-align: right; }

/* sub-sections */
.enm-epc-sub { margin: 18px 0 0; background: #fff; border: 1px solid #dcebe2; border-radius: 12px; padding: 14px; }
.enm-epc-sub h4 { margin: 0 0 10px; font-size: 15.5px; color: #16241d; }
.enm-epc-note { margin: 10px 0 0; font-size: 13.5px; color: #4b5f55; line-height: 1.55; }
.enm-epc-sub .enm-epc-note:first-of-type { margin-top: 0; margin-bottom: 12px; }

/* running costs */
.enm-epc-costs { font-size: 14.5px; }
.enm-epc-costs-h, .enm-epc-costs-r { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 7px 0; }
.enm-epc-costs-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: #4b5f55; border-bottom: 1px solid #eef5f0; }
.enm-epc-costs-h span + span, .enm-epc-costs-r span + span { min-width: 74px; text-align: right; }
.enm-epc-costs-r { border-bottom: 1px solid #f4f8f5; }
.enm-epc-costs-t { font-weight: 800; color: #16241d; border-bottom: none; }
.enm-epc-saving { margin: 10px 0 0; font-size: 14px; color: #0a5233; }

/* improvement steps */
.enm-epc-step { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid #eef5f0; }
.enm-epc-step:first-of-type { border-top: none; }
.enm-epc-step-n {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: #043D24; color: #fff;
  font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.enm-epc-step-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px 16px; }
.enm-epc-step-g span { font-size: 14.5px; font-weight: 700; color: #16241d; }
.enm-epc-step-g em {
  display: block; font-style: normal; font-size: 11.5px; font-weight: 800; letter-spacing: .3px;
  text-transform: uppercase; color: #4b5f55; margin-bottom: 1px;
}

/* actions */
.enm-epc-cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.enm-epc-cta a {
  display: block; flex: 1 1 auto; text-align: center; border-radius: 10px;
  font-weight: 800; text-decoration: none; padding: 13px 20px; font-size: 15px;
}
.enm-epc-btn-p { background: #25C146; color: #fff !important; border: 1px solid #25C146; }
.enm-epc-btn-p:hover { background: #1eab3c; }
.enm-epc-btn-s { border: 1px solid #043D24; color: #043D24 !important; }
.enm-epc-btn-s:hover { background: #eef5f0; }

@media (min-width: 560px) {
  .enm-epc-cert { padding: 22px 24px; }
  .enm-epc-cert-head h3 { font-size: 19px; }
  .enm-epc-facts { grid-template-columns: 1fr 1fr; }
  .enm-epc-chart, .enm-epc-sub { padding: 16px 18px; }
  .enm-epc-cta a { flex: 0 0 auto; }
}

/* chart header: label left, the property's band big on the right */
.enm-epc-chart-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.enm-epc-chart-top > span {
  font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #4b5f55;
}

/* result rows: valid / expired at a glance instead of a band letter */
.enm-epc-status {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
  border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.enm-epc-status.ok  { background: #d1fae5; color: #065f46; }
.enm-epc-status.bad { background: #fde8e8; color: #9b2c2c; }
.enm-epc-status.old { background: #eef2f5; color: #52616b; }

/* v4: the search box is the page's main call to action — the intro and form
   sit on the brand green (same treatment as the Find-an-Assessor box below);
   results render on the white card underneath. */
#enm-epc-check .enm-epc-panel {
  background: linear-gradient(135deg, #043D24, #0a5233);
  border-radius: 18px; padding: 24px 26px; color: #fff;
  box-shadow: 0 16px 38px rgba(4, 61, 36, .18);
}
#enm-epc-check .enm-epc-panel h2 { color: #fff !important; margin: 0 0 6px; }
#enm-epc-check .enm-epc-panel p { color: rgba(255, 255, 255, .88); margin: 0; }
#enm-epc-check .enm-epc-panel .enm-epc-form { margin-top: 16px; }
#enm-epc-check .enm-epc-panel input { border-color: transparent; background: #fff; }
#enm-epc-check .enm-epc-panel input:focus { border-color: #4ade80; }

/* nearest assessors under the results */
.enm-near { margin: 24px 0 0; border-top: 1px solid #dcebe2; padding-top: 18px; }
.enm-near h3 { margin: 0 0 4px; font-size: 19px; color: #16241d; }
.enm-near-sub, .enm-near-none, .enm-near-busy { margin: 0 0 14px; font-size: 14.5px; color: #4b5f55; line-height: 1.5; }
.enm-near-busy { margin: 22px 0 0; font-weight: 700; }
.enm-near-grid { display: grid; gap: 10px; }
.enm-near-card {
  display: flex; gap: 14px; align-items: flex-start; background: #fff;
  border: 1px solid #dcebe2; border-radius: 12px; padding: 14px 16px;
}
.enm-near-card.prem { border-color: #e2c65a; background: #fffdf3; }
.enm-near-card img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.enm-near-body { flex: 1 1 auto; min-width: 0; }
.enm-near-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.enm-near-top b { font-size: 15.5px; color: #16241d; }
.enm-near-pill { font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; }
.enm-near-pill.prem { background: #fff1c2; color: #7a5a00; }
.enm-near-pill.pro { background: #d1fae5; color: #065f46; }
.enm-near-meta { font-size: 13.5px; color: #4b5f55; margin-top: 3px; }
.enm-near-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.enm-near-btn { display: inline-block; border-radius: 8px; padding: 8px 14px; font-size: 13.5px; font-weight: 800; text-decoration: none; }
.enm-near-btn.call { background: #25C146; color: #fff !important; }
.enm-near-btn.call:hover { background: #1eab3c; }
.enm-near-btn.mail, .enm-near-btn.view { border: 1px solid #043D24; color: #043D24 !important; }
.enm-near-btn.mail:hover, .enm-near-btn.view:hover { background: #eef5f0; }
.enm-near-btn.wa { border: 1px solid #25D366; color: #128C4A !important; }
.enm-near-all { margin: 14px 0 0; font-size: 14.5px; font-weight: 800; }
.enm-near-all a { color: #0a5233; }

/* v5: the checker is no longer wrapped in a white .enm-card, so the green
   search panel runs the full width of the page the way the Find-an-Assessor
   box below it does. The results and the nearby-assessor list carried that
   card's background, so they take it themselves — and only once they have
   something in them, or an empty box would sit under the panel. */
#enm-epc-check #enm-epc-out:not(:empty),
#enm-epc-check #enm-epc-nearby:not(:empty) {
  background: #fff;
  border: 1px solid #dcebe2;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(4, 61, 36, .07);
  padding: 24px 26px;
  margin-top: 18px;
}
/* the list already opens with a rule above its heading inside the old card */
#enm-epc-check #enm-epc-nearby:not(:empty) .enm-near {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}
@media (max-width: 720px) {
  #enm-epc-check #enm-epc-out:not(:empty),
  #enm-epc-check #enm-epc-nearby:not(:empty) { padding: 18px 16px; border-radius: 14px; }
}
