.iwe-help {
    --iwe-ink: #162a3a;
    --iwe-accent: #37a3d4;
    --iwe-header: #162a3a;
    --iwe-line: #ccdce6;
    --iwe-bg: #f4f8fb;
    color: var(--iwe-ink);
    font-family: "Montserrat", system-ui, sans-serif;
    line-height: 1.45;
}

.iwe-help *, .iwe-help *::before, .iwe-help *::after { box-sizing: border-box; }
.iwe-help [hidden] { display: none !important; }

.iwe-help--floating {
    position: fixed;
    inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto;
    z-index: 9999;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    justify-items: end;
    gap: .65rem;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - max(1rem, env(safe-area-inset-top)) - max(1rem, env(safe-area-inset-bottom)));
}

.iwe-help .iwe-panel {
    max-width: 44rem;
    overflow: hidden;
    border: 1px solid var(--iwe-line);
    border-radius: .75rem;
    background: var(--iwe-panel, #fff);
}

.iwe-help--floating .iwe-panel {
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: min(36rem, calc(100vw - 1rem - max(1rem, env(safe-area-inset-right))));
    max-height: 46rem;
    box-shadow: 0 12px 36px #162a3a28;
}

.iwe-help--floating .iwe-launch { grid-row: 2; }

.iwe-help .iwe-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem clamp(1rem, 4vw, 1.5rem);
    background: var(--iwe-header);
    color: var(--iwe-header-text, #fff);
}

.iwe-help .iwe-header h2 { color: inherit; font: inherit; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.iwe-help .iwe-step-number { color: inherit; font-size: .85rem; margin: .2rem 0 0; }

.iwe-help .iwe-content {
    padding: clamp(1rem, 4vw, 1.5rem);
}

.iwe-help--floating .iwe-content {
    overflow: auto;
    overscroll-behavior: contain;
}

.iwe-help .iwe-prompt {
    margin: 0 0 1rem;
    font-size: clamp(1.08rem, 2.5vw, 1.3rem);
    font-weight: 700;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.iwe-help .iwe-prompt--result {
    padding: .85rem 1rem;
    border-radius: .55rem;
    background: var(--iwe-bg);
    font-size: 1rem;
    font-weight: 400;
}

.iwe-help .iwe-history {
    margin-top: 1rem;
    padding-top: .8rem;
    border-top: 1px solid var(--iwe-line);
    overflow-wrap: anywhere;
}

.iwe-help .iwe-history summary { cursor: pointer; font-weight: 600; }
.iwe-help .iwe-history ol { margin: .65rem 0 0; padding-inline-start: 1.5rem; }
.iwe-help .iwe-history li + li { margin-top: .65rem; }
.iwe-help .iwe-history li p { margin: 0; white-space: pre-wrap; }

.iwe-help .iwe-choices, .iwe-help .iwe-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.iwe-help .iwe-actions:not(:empty) { margin-top: .75rem; }

.iwe-help button, .iwe-help .iwe-service {
    min-height: 44px;
    margin: 0;
    padding: .45rem .8rem;
    border: 1px solid var(--iwe-line);
    border-radius: .55rem;
    background: white;
    color: var(--iwe-answer-text, #174b72);
    font: inherit;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.iwe-help .iwe-answers { display: grid; grid-template-columns: minmax(0, 1fr); }
.iwe-help .iwe-answers button { width: 100%; height: auto; padding: .65rem .85rem; }

.iwe-help button:hover, .iwe-help .iwe-service:hover { background: var(--iwe-bg); }
.iwe-help button:focus-visible, .iwe-help .iwe-service:focus-visible { outline: 2px solid #2795d9; outline-offset: 2px; }
.iwe-help button.iwe-launch {
    display: inline-flex;
    align-items: center;
    background: var(--iwe-accent);
    font-weight: 700;
    max-width: calc(100vw - 2rem);
    overflow-wrap: anywhere;
    padding: var(--iwe-padding-y, 9px) var(--iwe-padding-x, 14px);
    border: var(--iwe-border-width, 1px) solid var(--iwe-button-border, var(--iwe-accent));
    border-radius: var(--iwe-radius, 3px);
    color: var(--iwe-button-text, #000);
    font-size: var(--iwe-font-size, 16px);
}

.iwe-help button.iwe-launch:hover,
.iwe-help button.iwe-launch:focus-visible {
    background: var(--iwe-hover, #247da4);
    color: var(--iwe-hover-text, #fff);
    border-color: var(--iwe-hover-border, #247da4);
}

.iwe-help .iwe-close { min-width: 44px; text-align: center; font-size: 1.2rem; }
.iwe-help .iwe-status { margin: .5rem 0 0; }
.iwe-help .iwe-status:empty { margin: 0; }
.iwe-help textarea { width: 100%; min-height: 7rem; }

.iwe-help .iwe-request {
    display: grid;
    gap: .65rem;
    margin-top: .85rem;
    padding: .85rem;
    border: 1px solid var(--iwe-line);
    border-radius: .55rem;
}

.iwe-help .iwe-request p { margin: 0; }
.iwe-help .iwe-request-status:empty { display: none; }
.iwe-help .iwe-request label { display: grid; gap: .2rem; }
.iwe-help .iwe-request input:not([type="hidden"]),
.iwe-help .iwe-request textarea {
    width: 100%;
    padding: .4rem .55rem;
    border: 1px solid var(--iwe-line);
    border-radius: .3rem;
    font: inherit;
}
.iwe-help .iwe-request button { justify-self: start; }

.iwe-help .iwe-next-heading {
    margin: 1.15rem 0 .65rem;
    color: inherit;
    font: inherit;
    font-weight: 700;
}

/* Antwoordknoppen behouden een afzonderlijk instelbare tekstkleur bij hover/focus. */
.iwe-help .iwe-choices button:hover,
.iwe-help .iwe-choices button:focus-visible {
    color: var(--iwe-answer-hover-text, #174b72) !important;
}

/* v0.3.0 – vernieuwde diagnose-interface; alleen binnen de plugin gescoped. */
.iwe-help .iwe-panel { border-radius: 16px; box-shadow: 0 8px 32px rgba(22,42,58,.07); }
.iwe-help .iwe-header { padding: 1.15rem clamp(1rem, 4vw, 1.65rem); }
.iwe-help .iwe-header h2 { font-size: 1.15rem; letter-spacing: -.02em; }
.iwe-help .iwe-content { padding: clamp(1.15rem, 4vw, 1.85rem); }
.iwe-help .iwe-journey { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1.65rem; }
.iwe-help .iwe-journey-stage { border-top: 3px solid #d8e4ec; padding-top: .6rem; color: #647787; font-size: .76rem; font-weight: 650; line-height: 1.4; }
.iwe-help .iwe-journey-stage.is-current { border-top-color: var(--iwe-accent); color: var(--iwe-ink); }
.iwe-help .iwe-prompt { font-size: clamp(1.22rem, 2.5vw, 1.65rem); line-height: 1.32; letter-spacing: -.025em; margin-bottom: 1.3rem; }
.iwe-help .iwe-answers { gap: .7rem; }
.iwe-help .iwe-answers button { position: relative; min-height: 58px; padding: .95rem 3rem .95rem 1.15rem; border: 1px solid #cbdce7; border-radius: 12px; background: #fff; font-weight: 500; line-height: 1.4; box-shadow: 0 2px 5px rgba(22,42,58,.025); transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.iwe-help .iwe-answers button::after { content: '›'; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-53%); color: var(--iwe-accent); font-size: 1.5rem; line-height: 1; }
.iwe-help .iwe-answers button:hover { background: #f3f9fc; border-color: var(--iwe-accent); box-shadow: 0 5px 14px rgba(22,42,58,.07); transform: translateY(-1px); }
.iwe-help .iwe-answers button:active { transform: translateY(0); }
.iwe-help .iwe-actions { gap: .6rem; margin-top: 1.35rem !important; }
.iwe-help .iwe-actions button { border-radius: 8px; font-size: .9rem; font-weight: 600; padding: .65rem .9rem; }
.iwe-help .iwe-prompt--result { border-radius: 12px; border-left: 4px solid var(--iwe-accent); padding: 1.15rem 1.25rem; line-height: 1.6; }
.iwe-help .iwe-request { border-radius: 12px; padding: 1.1rem; }
.iwe-help .iwe-history { margin-top: 1.35rem; }
@media (max-width: 480px) { .iwe-help .iwe-journey-stage { font-size: .7rem; } .iwe-help .iwe-answers button { min-height: 56px; padding: .85rem 2.6rem .85rem .95rem; } .iwe-help .iwe-panel { border-radius: 12px; } }
@media (prefers-reduced-motion: reduce) { .iwe-help .iwe-answers button { transition: none; } }

/* Fase 2: machineselectie */
.iwe-help .iwe-model-select:not([hidden]) { display: grid; gap: 12px; padding: 14px 0 20px; }
.iwe-help .iwe-model-select label { font-weight: 700; color: var(--iwe-ink, #162a3a); }
.iwe-help .iwe-model-select select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #b7cbd5; border-radius: 8px; background: #fff; color: #162a3a; font: inherit; }
.iwe-help .iwe-model-continue { padding: 12px 16px; border: 0; border-radius: 8px; background: var(--iwe-accent, #00a3e3); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.iwe-help .iwe-model-continue:disabled { opacity: .5; cursor: not-allowed; }
.iwe-help .iwe-model-select p { margin: 0; font-size: 13px; color: var(--iwe-ink, #162a3a); }

/* v0.3.3: consistente hover voor lichte secundaire knoppen, onafhankelijk van Elementor */
.iwe-help .iwe-actions button:hover,
.iwe-help .iwe-actions button:focus-visible,
.iwe-help .iwe-request button:hover,
.iwe-help .iwe-request button:focus-visible,
.iwe-help .iwe-model-continue:hover,
.iwe-help .iwe-model-continue:focus-visible,
.iwe-help .iwe-choices:not(.iwe-answers) button:hover,
.iwe-help .iwe-choices:not(.iwe-answers) button:focus-visible {
    background: var(--iwe-secondary-hover-bg, #eef7fc) !important;
    color: var(--iwe-secondary-hover-text, #174b72) !important;
    border-color: var(--iwe-hover-border, #247da4) !important;
}
.iwe-help .iwe-result-media { display: grid; gap: 1rem; margin: 1rem 0; color: var(--iwe-ink, #162a3a); }
.iwe-help .iwe-result-media[hidden] { display: none !important; }
.iwe-help .iwe-result-media h4 { margin: 0; font-size: 1rem; }
.iwe-help .iwe-result-media ol { margin: 0; padding-left: 1.5rem; }
.iwe-help .iwe-result-media li { margin: .4rem 0; }
.iwe-help .iwe-result-media img { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: 10px; }
.iwe-help .iwe-result-media iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; }
.iwe-help .iwe-safety-warning { padding: 1rem; background: #fff4e5; border-left: 4px solid #c57a17; border-radius: 6px; color: #5b3b13; }

/* Fase 4: optionele ontvangstbevestiging */
[data-iwe-help] .iwe-request .iwe-request-copy { display:flex; align-items:flex-start; gap:10px; font-size:0.9em; line-height:1.5; }
[data-iwe-help] .iwe-request .iwe-request-copy input[type="checkbox"] { width:auto; min-width:16px; height:16px; margin-top:3px; flex:none; }


/* v0.3.6 — geïsoleerde, toegankelijke styling voor alle chat- en formuliercontrols. */
.iwe-help .iwe-live button:not(.iwe-launch),
.iwe-help .iwe-request button,
.iwe-help .iwe-actions button {
  appearance: none;
  background: #fff !important;
  color: #174b72 !important;
  border: 1px solid #cbdce7 !important;
  border-radius: 9px;
  opacity: 1;
  -webkit-text-fill-color: #174b72;
  text-shadow: none !important;
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
  padding: .7rem 1rem;
  cursor: pointer;
}
.iwe-help .iwe-live button:not(.iwe-launch):hover,
.iwe-help .iwe-request button:hover,
.iwe-help .iwe-actions button:hover {
  background: #eaf6fc !important;
  color: #174b72 !important;
  -webkit-text-fill-color: #174b72;
  border-color: #00a3e3 !important;
}
.iwe-help .iwe-live button:disabled,
.iwe-help .iwe-request button:disabled { opacity: .55; cursor: not-allowed; }
.iwe-help .iwe-live input:not([type=checkbox]),
.iwe-help .iwe-live textarea,
.iwe-help .iwe-request input:not([type=checkbox]):not([type=hidden]),
.iwe-help .iwe-request textarea {
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  background: #fff !important;
  color: #162a3a !important;
  border: 1px solid #b9cfde !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  outline: none;
  padding: .65rem .75rem;
  font: inherit;
}
.iwe-help .iwe-live input:focus-visible,
.iwe-help .iwe-live textarea:focus-visible,
.iwe-help .iwe-request input:focus-visible,
.iwe-help .iwe-request textarea:focus-visible {
  border-color: #007fb3 !important;
  outline: 2px solid #007fb3 !important;
  outline-offset: 2px;
  box-shadow: none !important;
}
.iwe-help .iwe-live button:focus-visible,
.iwe-help .iwe-request button:focus-visible,
.iwe-help .iwe-actions button:focus-visible {
  outline: 2px solid #007fb3 !important;
  outline-offset: 3px;
}

/* Full-page support experience */
.iwe-help--page {width:100%;max-width:1200px;margin-inline:auto;}
.iwe-help--page .iwe-page-intro {padding:clamp(24px,5vw,56px);background:var(--iwe-header);color:var(--iwe-header-text,#fff);border-radius:12px;margin-bottom:24px;}
.iwe-page-intro span {font-size:12px;letter-spacing:.12em;font-weight:700;}
.iwe-help--page .iwe-page-intro h2 {color:inherit;font-size:clamp(25px,4vw,42px);line-height:1.15;margin:12px 0;}
.iwe-page-intro p {margin:0;color:inherit;}
.iwe-page-layout {display:grid;grid-template-columns:minmax(0,2.2fr) minmax(0,1fr);gap:24px;align-items:start;}
.iwe-help--page .iwe-panel {max-width:none;width:100%;border-radius:12px;}
.iwe-help--page .iwe-content {padding:clamp(18px,3vw,36px);}
.iwe-help--page .iwe-choices {display:grid;grid-template-columns:minmax(0,1fr);gap:12px;}
.iwe-help--page .iwe-choices button {width:100%;text-align:left;min-height:48px;white-space:normal;}
.iwe-page-sidebar {display:grid;gap:16px;min-width:0;}
.iwe-side-card {padding:24px;background:var(--iwe-bg);border:1px solid var(--iwe-line);border-radius:12px;}
.iwe-side-card h3 {font-size:18px;color:var(--iwe-ink);margin:0 0 12px;}
.iwe-side-card p,.iwe-side-card ol {font-size:14px;margin:0 0 12px;}
.iwe-side-card ol {padding-left:20px;}
.iwe-side-card li+li {margin-top:8px;}
.iwe-link-only {display:block;}
.iwe-help.iwe-link-only a.iwe-launch {display:inline-flex;align-items:center;text-decoration:none;background:var(--iwe-accent);color:var(--iwe-button-text,#000);font-weight:700;font-size:var(--iwe-font-size,16px);padding:var(--iwe-padding-y,9px) var(--iwe-padding-x,14px);border:var(--iwe-border-width,1px) solid var(--iwe-button-border);border-radius:var(--iwe-radius,3px);box-shadow:0 4px 16px #162a3a25;max-width:calc(100vw - 2rem);}
.iwe-help.iwe-link-only a.iwe-launch:hover,.iwe-help.iwe-link-only a.iwe-launch:focus-visible {background:var(--iwe-hover);color:var(--iwe-hover-text);border-color:var(--iwe-hover-border);}
.iwe-help.iwe-link-only a.iwe-launch:focus-visible {outline:2px solid var(--iwe-ink);outline-offset:3px;}
@media(max-width:760px){.iwe-page-layout{grid-template-columns:minmax(0,1fr);gap:16px;}.iwe-help--page .iwe-page-intro{margin-bottom:16px;}.iwe-side-card{padding:18px;}}
/* v0.5.1: page-only layout, preserving configured palette */
.iwe-help--page .iwe-page-intro {border-radius:8px;margin-bottom:16px;padding:clamp(24px,4vw,48px)}
.iwe-help--page .iwe-page-journey {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 24px;padding:0;background:transparent;border:0}
.iwe-help--page .iwe-page-journey .iwe-journey-stage {border:0;border-top:3px solid var(--iwe-line);border-radius:0;background:transparent;color:var(--iwe-ink);padding:12px 4px 4px;font-weight:600;white-space:normal}
.iwe-help--page .iwe-page-journey .is-current {border-top-color:var(--iwe-accent);color:var(--iwe-ink)}
.iwe-help--page .iwe-panel,.iwe-help--page .iwe-side-card {border-radius:8px;box-shadow:none}
.iwe-help--page .iwe-header {background:var(--iwe-panel,#fff);color:var(--iwe-ink);padding:24px 24px 0}
.iwe-help--page .iwe-header h2 {display:none}
.iwe-help--page .iwe-step-number {font-weight:600;margin:0}
.iwe-help--page .iwe-content {padding:24px;min-width:0}
.iwe-help--page .iwe-prompt,.iwe-help--page .iwe-model-select label {font-size:clamp(19px,2.4vw,25px);line-height:1.35}
.iwe-help--page .iwe-prompt--result {font-size:1rem}
.iwe-help--page .iwe-choices.iwe-answers button {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;border-radius:8px}
.iwe-help--page .iwe-actions {gap:8px;margin-top:24px}
.iwe-help--page .iwe-diagnosis-card {background:var(--iwe-bg);overflow-wrap:anywhere}
.iwe-help--page .iwe-selected-model {display:block;margin-bottom:12px}
.iwe-help--page .iwe-history ol {padding-inline-start:20px;font-size:14px}
.iwe-help--page .iwe-history li p {font-size:13px;margin:0 0 4px}
.iwe-help--page .iwe-model-select select {width:100%;max-width:100%;min-height:48px}
@media(max-width:760px){.iwe-help--page .iwe-page-journey {gap:6px;margin-bottom:16px}.iwe-help--page .iwe-page-journey .iwe-journey-stage {font-size:12px}.iwe-help--page .iwe-content {padding:18px}.iwe-help--page .iwe-header {padding:18px 18px 0}}
