/* =============================================================================
 * Heatovent HPnext Εργαλεία — scoped design system
 * All rules are scoped under .hp-tools so they cannot affect the rest of the
 * Heatovent website. STIEBEL/Heatovent visual language: white surfaces,
 * brand red action colour, dark-grey type, restrained light-grey panels.
 * No logos are reproduced; brand red is used for actions only.
 * ===========================================================================*/

.hp-tools {
  --hp-red: #e2001a;          /* STIEBEL/Heatovent action red — VERIFY exact hex with brand */
  --hp-red-dark: #b30015;
  --hp-ink: #1a1a1a;
  --hp-ink-soft: #4a4a4a;
  --hp-line: #e3e3e3;
  --hp-surface: #f6f6f7;
  --hp-surface-2: #fbfbfc;
  --hp-white: #ffffff;
  --hp-ok: #1f8a4c;
  --hp-warn: #b8860b;
  --hp-warn-bg: #fff8e6;
  --hp-bad: #c0392b;
  --hp-info: #2c5d87;
  --hp-radius: 12px;
  --hp-radius-sm: 8px;
  --hp-shadow: 0 1px 3px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.05);
  --hp-maxw: 980px;
  color: var(--hp-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
.hp-tools *, .hp-tools *::before, .hp-tools *::after { box-sizing: border-box; }
.hp-tools h1, .hp-tools h2, .hp-tools h3, .hp-tools h4 { color: var(--hp-ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
.hp-tools h1 { font-size: 1.9rem; letter-spacing: -.01em; }
.hp-tools h2 { font-size: 1.35rem; margin-top: 1.6em; }
.hp-tools h3 { font-size: 1.08rem; }
.hp-tools p { margin: 0 0 1em; }
.hp-tools a { color: var(--hp-red-dark); }
.hp-tools small { color: var(--hp-ink-soft); }

.hp-tool-app { max-width: var(--hp-maxw); margin: 0 auto; padding: 18px 16px 64px; }

/* ---- Global journey stepper (the 4 apps) ---- */
.hp-journey { display: flex; flex-wrap: wrap; gap: 6px; background: var(--hp-surface); border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius); padding: 8px; margin: 8px 0 22px; }
.hp-journey__step { flex: 1 1 160px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--hp-radius-sm);
  text-decoration: none; color: var(--hp-ink-soft); font-size: .9rem; min-height: 44px; }
.hp-journey__step .n { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #d9d9dc; color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
.hp-journey__step.is-current { background: var(--hp-white); color: var(--hp-ink); font-weight: 600; box-shadow: var(--hp-shadow); }
.hp-journey__step.is-current .n { background: var(--hp-red); }
.hp-journey__step.is-done { color: var(--hp-ink); }
.hp-journey__step.is-done .n { background: var(--hp-ok); }
.hp-journey__step.is-locked { opacity: .55; pointer-events: none; }

/* ---- Internal progress (steps within one app) ---- */
.hp-progress { margin: 0 0 18px; }
.hp-progress__bar { height: 8px; background: var(--hp-line); border-radius: 99px; overflow: hidden; }
.hp-progress__fill { height: 100%; background: var(--hp-red); width: 0; transition: width .3s ease; }
.hp-progress__label { font-size: .85rem; color: var(--hp-ink-soft); margin-top: 6px; }

/* ---- Cards ---- */
.hp-card { background: var(--hp-white); border: 1px solid var(--hp-line); border-radius: var(--hp-radius);
  padding: 20px; box-shadow: var(--hp-shadow); margin: 0 0 16px; }
.hp-card--flat { box-shadow: none; }
.hp-intro { background: var(--hp-surface-2); }

/* ---- Mode toggle / segmented ---- */
.hp-segmented { display: inline-flex; border: 1px solid var(--hp-line); border-radius: 99px; padding: 3px; background: var(--hp-surface); }
.hp-segmented button { border: 0; background: transparent; padding: 8px 16px; border-radius: 99px; cursor: pointer;
  font-size: .92rem; color: var(--hp-ink-soft); min-height: 40px; }
.hp-segmented button[aria-pressed="true"] { background: var(--hp-white); color: var(--hp-ink); font-weight: 600; box-shadow: var(--hp-shadow); }

/* ---- Question step ---- */
.hp-step { animation: hpfade .25s ease; }
@keyframes hpfade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hp-q { margin: 0 0 22px; }
.hp-q__title { font-weight: 600; font-size: 1.05rem; margin: 0 0 4px; }
.hp-q__why { font-size: .88rem; color: var(--hp-ink-soft); margin: 0 0 12px; }
.hp-q__error { color: var(--hp-bad); font-size: .88rem; margin-top: 6px; display: none; }
.hp-q.has-error .hp-q__error { display: block; }
.hp-q.has-error input, .hp-q.has-error select { border-color: var(--hp-bad); }

/* option cards */
.hp-options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.hp-option { position: relative; display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--hp-line);
  border-radius: var(--hp-radius-sm); padding: 12px 14px; cursor: pointer; background: var(--hp-white); min-height: 52px; }
.hp-option:hover { border-color: #c9c9cd; }
.hp-option input { position: absolute; opacity: 0; pointer-events: none; }
.hp-option__mark { flex: 0 0 20px; width: 20px; height: 20px; border: 2px solid #c2c2c6; border-radius: 50%; margin-top: 2px; }
.hp-option.is-checkbox .hp-option__mark { border-radius: 5px; }
.hp-option__txt { font-size: .94rem; }
.hp-option__txt small { display: block; margin-top: 2px; }
.hp-option.is-selected { border-color: var(--hp-red); background: #fff5f6; }
.hp-option.is-selected .hp-option__mark { border-color: var(--hp-red); background: var(--hp-red);
  box-shadow: inset 0 0 0 3px var(--hp-white); }
.hp-option:focus-within { outline: 2px solid var(--hp-info); outline-offset: 2px; }

/* number / text fields */
.hp-field { display: flex; flex-direction: column; gap: 6px; max-width: 340px; }
.hp-field label { font-weight: 600; font-size: .95rem; }
.hp-input-wrap { display: flex; align-items: stretch; }
.hp-tools input[type=number], .hp-tools input[type=text], .hp-tools input[type=email], .hp-tools input[type=tel], .hp-tools select {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--hp-line); border-radius: var(--hp-radius-sm);
  font-size: 1rem; color: var(--hp-ink); background: var(--hp-white); min-height: 46px; }
.hp-tools input:focus, .hp-tools select:focus { outline: 2px solid var(--hp-info); outline-offset: 1px; border-color: var(--hp-info); }
.hp-unit { display: inline-flex; align-items: center; padding: 0 12px; background: var(--hp-surface); border: 1.5px solid var(--hp-line);
  border-left: 0; border-radius: 0 var(--hp-radius-sm) var(--hp-radius-sm) 0; font-size: .9rem; color: var(--hp-ink-soft); }
.hp-input-wrap input { border-radius: var(--hp-radius-sm) 0 0 var(--hp-radius-sm); }

/* ---- Buttons / nav ---- */
.hp-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.hp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 99px;
  font-size: 1rem; font-weight: 600; cursor: pointer; border: 1.5px solid transparent; min-height: 48px; text-decoration: none; }
.hp-btn--primary { background: var(--hp-red); color: #fff !important; }
.hp-btn--primary:hover { background: var(--hp-red-dark); }
.hp-btn--ghost { background: var(--hp-white); color: var(--hp-ink); border-color: var(--hp-line); }
.hp-btn--ghost:hover { border-color: #c2c2c6; }
.hp-btn--block { width: 100%; }
.hp-btn:disabled { opacity: .5; cursor: not-allowed; }
.hp-btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- Results ---- */
.hp-result-hero { background: linear-gradient(180deg,#fff,#fbfbfc); border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius); padding: 24px; text-align: center; box-shadow: var(--hp-shadow); }
.hp-result-hero .big { font-size: 2.6rem; font-weight: 800; color: var(--hp-ink); letter-spacing: -.02em; }
.hp-result-hero .unit { font-size: 1.1rem; color: var(--hp-ink-soft); font-weight: 600; }
.hp-result-hero .sub { color: var(--hp-ink-soft); margin-top: 6px; }
.hp-kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); margin: 16px 0; }
.hp-kpi { background: var(--hp-white); border: 1px solid var(--hp-line); border-radius: var(--hp-radius-sm); padding: 14px; }
.hp-kpi .v { font-size: 1.5rem; font-weight: 700; }
.hp-kpi .l { font-size: .82rem; color: var(--hp-ink-soft); }

/* confidence badge */
.hp-conf { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; font-size: .9rem; font-weight: 600; }
.hp-conf--high { background: #e8f6ee; color: var(--hp-ok); }
.hp-conf--med  { background: var(--hp-warn-bg); color: var(--hp-warn); }
.hp-conf--low  { background: #fdece9; color: var(--hp-bad); }

/* warnings / notes */
.hp-warn { display: flex; gap: 10px; background: var(--hp-warn-bg); border: 1px solid #f0e0b0; border-left: 4px solid var(--hp-warn);
  border-radius: var(--hp-radius-sm); padding: 12px 14px; margin: 8px 0; font-size: .92rem; }
.hp-warn--info { background: #eef4f9; border-color: #c9ddee; border-left-color: var(--hp-info); }
.hp-warn--crit { background: #fdece9; border-color: #f3cfc9; border-left-color: var(--hp-bad); }
.hp-warn .ic { flex: 0 0 auto; font-weight: 800; }

/* tables */
.hp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hp-table th, .hp-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hp-line); vertical-align: top; }
.hp-table th { background: var(--hp-surface); font-weight: 600; }
.hp-table tr:last-child td { border-bottom: 0; }
.hp-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.hp-tag--required { background: #fde8e8; color: var(--hp-bad); }
.hp-tag--conditional { background: #fff1d6; color: var(--hp-warn); }
.hp-tag--recommended { background: #e8f6ee; color: var(--hp-ok); }
.hp-tag--install { background: #eef0f2; color: var(--hp-ink-soft); }
.hp-tag--included { background: #e8f6ee; color: var(--hp-ok); }
.hp-tag--verify { background: #eef4f9; color: var(--hp-info); }

/* simple bar chart (CSS, accessible — numbers always in text) */
.hp-bars { display: grid; gap: 10px; margin: 12px 0; }
.hp-bar { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 10px; font-size: .9rem; }
.hp-bar__track { background: var(--hp-surface); border-radius: 99px; height: 22px; overflow: hidden; }
.hp-bar__fill { height: 100%; border-radius: 99px; background: #b8b8bd; min-width: 2px; }
.hp-bar__fill.is-hp { background: var(--hp-red); }
.hp-bar__val { font-weight: 700; white-space: nowrap; }
@media (max-width: 560px){ .hp-bar { grid-template-columns: 110px 1fr; } .hp-bar__val { grid-column: 2; text-align: right; } }

/* assumptions / meta foldout */
.hp-foldout { border: 1px solid var(--hp-line); border-radius: var(--hp-radius-sm); margin: 10px 0; background: var(--hp-surface-2); }
.hp-foldout > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style: none; }
.hp-foldout > summary::-webkit-details-marker { display: none; }
.hp-foldout > summary::after { content: "▾"; float: right; color: var(--hp-ink-soft); }
.hp-foldout[open] > summary::after { content: "▴"; }
.hp-foldout__body { padding: 0 14px 14px; font-size: .9rem; color: var(--hp-ink-soft); }

/* SEO content + FAQ */
.hp-seo { margin-top: 40px; border-top: 1px solid var(--hp-line); padding-top: 24px; }
.hp-faq details { border-bottom: 1px solid var(--hp-line); padding: 6px 0; }
.hp-faq summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.hp-meta-footer { margin-top: 28px; font-size: .82rem; color: var(--hp-ink-soft); border-top: 1px dashed var(--hp-line); padding-top: 14px; }
.hp-related { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); }
.hp-related a { display: block; padding: 12px 14px; border: 1px solid var(--hp-line); border-radius: var(--hp-radius-sm);
  background: var(--hp-white); text-decoration: none; color: var(--hp-ink); }
.hp-related a:hover { border-color: var(--hp-red); }

/* multiselect chips for summary */
.hp-summary-grid { display: grid; gap: 8px 18px; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.hp-summary-grid .k { color: var(--hp-ink-soft); font-size: .82rem; }
.hp-summary-grid .v { font-weight: 600; }

.hp-loading { text-align: center; padding: 30px; color: var(--hp-ink-soft); }
.hp-spinner { width: 28px; height: 28px; border: 3px solid var(--hp-line); border-top-color: var(--hp-red); border-radius: 50%;
  margin: 0 auto 10px; animation: hpspin .8s linear infinite; }
@keyframes hpspin { to { transform: rotate(360deg); } }

.hp-recalc { background: #fdece9; border: 1px solid #f3cfc9; border-radius: var(--hp-radius-sm); padding: 10px 14px; margin-bottom: 14px; font-size: .9rem; }
.hp-visually-hidden { position:absolute!important; width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap; }

@media (max-width: 560px) {
  .hp-tools h1 { font-size: 1.5rem; }
  .hp-result-hero .big { font-size: 2.1rem; }
  .hp-nav { flex-direction: column-reverse; }
  .hp-nav .hp-btn { width: 100%; }
  .hp-journey__step { flex: 1 1 100%; }
}
@media print {
  .hp-journey, .hp-nav, .hp-btn-row, .hp-segmented, .hp-progress { display: none !important; }
  .hp-tool-app { max-width: none; }
  .hp-card { box-shadow: none; }
}


/* ---- brand header / hero / footer (real Heatovent + STIEBEL assets) ---- */
.hp-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 0 14px; border-bottom:1px solid var(--hp-line); margin-bottom:14px; flex-wrap:wrap; }
.hp-header__logo img { height:40px; width:auto; display:block; }
.hp-header__tag { font-size:.74rem; color:var(--hp-ink-soft); text-transform:uppercase; letter-spacing:.07em; text-align:right; max-width:230px; }
.hp-eyebrow { font-size:.78rem; color:var(--hp-ink-soft); margin:0 0 6px; text-transform:uppercase; letter-spacing:.05em; }
.hp-hero { display:grid; grid-template-columns:1fr 210px; gap:24px; align-items:center; margin-bottom:18px; }
.hp-hero__text { min-width:0; }
.hp-hero__text h1 { margin-top:0; }
.hp-hero__text p:last-child { margin-bottom:0; }
.hp-hero__img { justify-self:center; }
.hp-hero__img img { width:100%; max-width:210px; height:auto; display:block; }
.hp-brandfoot { display:flex; align-items:center; gap:10px; margin:6px 0 12px; }
.hp-brandfoot img { height:24px; width:auto; }
.hp-brandfoot span { font-size:.8rem; color:var(--hp-ink-soft); }
@media (max-width:600px){
  .hp-hero { grid-template-columns:1fr; gap:12px; }
  .hp-hero__img, .hp-hero__img img { max-width:150px; }
  .hp-header__tag { display:none; }
  .hp-header__logo img { height:32px; }
}
@media print { .hp-header__tag{ display:none; } }

/* ---- printable PDF report (Tier 4: customer downloads & sends to Heatovent) ---- */
.hp-report { display: none; }
.hp-report .rpt { max-width: 820px; margin: 0 auto; padding: 22px; color: var(--hp-ink); font-size: 13px; line-height: 1.45; }
.hp-report .rpt-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 2px solid var(--hp-red); padding-bottom: 10px; }
.hp-report .rpt-head img { height: 34px; width: auto; }
.hp-report h1 { font-size: 1.35rem; margin: 14px 0 2px; }
.hp-report h2 { font-size: 1.02rem; margin: 16px 0 6px; border-bottom: 1px solid var(--hp-line); padding-bottom: 3px; }
.hp-report table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 4px 0; }
.hp-report th, .hp-report td { border: 1px solid var(--hp-line); padding: 5px 7px; text-align: left; vertical-align: top; }
.hp-report .rpt-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.hp-report .rpt-kv div { padding: 2px 0; }
.hp-report .muted { color: var(--hp-ink-soft); font-size: 11px; }
.hp-report .rpt-foot { margin-top: 16px; border-top: 2px solid var(--hp-red); padding-top: 10px; font-size: 12px; }
@media print {
  body.printing-report > *:not(.hp-report) { display: none !important; }
  body.printing-report .hp-report { display: block !important; }
  .hp-report { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ============================================================
   v1.8 — light visual polish (refinement, not redesign)
   ============================================================ */
/* badges: clearer Απαραίτητο / Συνιστώμενο / Προς επιβεβαίωση */
.hp-tag--confirm { background: #fff1d6; color: var(--hp-warn); }
.hp-tag { letter-spacing: .01em; }

/* App2 grouped product cards (replaces dense table) */
.hp-sys-group { display: flex; flex-direction: column; gap: 10px; }
.hp-sys-item { border: 1px solid var(--hp-line); border-radius: var(--hp-radius-sm); padding: 12px 14px; background: var(--hp-surface-2); }
.hp-sys-item__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hp-sys-item__name { font-weight: 600; }
.hp-sys-item__name a { font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(179,0,21,.25); }
.hp-sys-item__name a:hover { border-bottom-color: var(--hp-red-dark); }
.hp-sys-item__meta { display: flex; gap: 12px; margin-top: 2px; font-size: .8rem; color: var(--hp-ink-soft); }
.hp-sys-item__code { font-variant-numeric: tabular-nums; }
.hp-sys-item__why { margin: 8px 0 0; font-size: .86rem; color: var(--hp-ink-soft); line-height: 1.45; }
.hp-link-cat { font-size: .85rem; }

/* slightly more breathing space + clearer hierarchy; soften nested borders/shadows */
.hp-tools h2 { margin-top: .2em; }
.hp-card { padding: 18px 18px; }
.hp-card .hp-card, .hp-card--flat { box-shadow: none; }
.hp-card + .hp-card { margin-top: 14px; }
.hp-kpis { gap: 10px; }

/* mobile spacing */
@media (max-width: 560px) {
  .hp-card { padding: 14px 13px; }
  .hp-sys-item__head { gap: 6px; }
  .hp-sys-item__meta { flex-wrap: wrap; gap: 8px; }
  .hp-tag { font-size: .68rem; }
}

/* v1.9 — size-dependent accessory alternatives (no auto-selected exact link) */
.hp-altlinks__name { font-weight: 600; }
.hp-altlinks__label { font-size: .82rem; color: var(--hp-ink-soft); margin: 4px 0 4px; }
.hp-altlinks__list { margin: 0; padding-left: 18px; font-size: .9rem; }
.hp-altlinks__list li { margin: 2px 0; }

/* v1.9.3 — confidence clarity + ready-set card */
.hp-conf-wrap { display: block; }
.hp-conf-note { font-size: .78rem; color: var(--hp-ink-soft); margin: 6px 0 0; line-height: 1.4; max-width: 60ch; }
.hp-conf-missing { margin-top: 8px; font-size: .86rem; }
.hp-conf-missing__h { font-weight: 600; }
.hp-set-card { border: 1.5px solid var(--hp-red); border-radius: var(--hp-radius-sm); padding: 14px; background: var(--hp-surface-2); }
.hp-set-card h3 { margin-top: 0; }
.hp-set-incl { margin: 6px 0 0; padding-left: 18px; }
.hp-set-note { font-size: .85rem; color: var(--hp-ink-soft); }
.hp-set-incl-h { font-weight: 600; margin-top: 10px; }
.hp-commercial-status { font-size: .82rem; color: var(--hp-ink-soft); margin: 6px 0 0; }

/* v1.9.6 — case-specific ready-set badges (visually distinct from "recommended") */
.hp-tag--official { background: #eef4f9; color: var(--hp-info); }       /* Case B — neutral official set */
.hp-tag--alternative { background: #f1eef9; color: #5b4bbf; }            /* Case C — secondary alternative */
.hp-set-card--alt { border-style: dashed; opacity: .98; }
