/* Van Hameren Houthulp 98.8.0 - professionele drietalige houthulp */
:root{
  --hh-blue:#0787ca;
  --hh-blue-dark:#056b9f;
  --hh-ink:#0c2f45;
  --hh-soft:#f3f8fb;
  --hh-line:#d3e3eb;
  --hh-shadow:0 22px 64px rgba(8,55,83,.24);
}

/* Bestaand headergedrag behouden. */
@media(min-width:768px){
  .header-row{grid-template-columns:230px minmax(340px,1fr) auto!important;gap:24px!important}
  .header-search{display:none!important;grid-template-columns:24px minmax(0,1fr) 48px;align-items:center;position:relative;max-width:760px;width:100%;justify-self:center}
  body.vh-nonhome-route .header-search{display:grid!important}
  body.vh-home-route .header-row{grid-template-columns:270px minmax(0,1fr)!important;gap:34px!important}
}

.houthulp-launcher{
  position:fixed!important;
  right:max(18px,env(safe-area-inset-right))!important;
  bottom:max(20px,env(safe-area-inset-bottom))!important;
  z-index:2147483000!important;
  display:flex!important;align-items:center;justify-content:center;gap:9px;
  border:0;border-radius:999px;padding:11px 15px;
  background:linear-gradient(180deg,#159add,#087fc3);color:#fff;
  font:inherit;font-weight:850;box-shadow:0 12px 30px rgba(3,103,161,.28);
  cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,opacity .16s ease;
}
.houthulp-launcher:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(3,103,161,.34)}
.houthulp-launcher svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8}
.houthulp-launcher__badge{position:absolute;right:-2px;top:-4px;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:#ef7d00;color:#fff;font-size:10px;border:2px solid #fff}

.houthulp-panel{
  position:fixed!important;right:20px;bottom:82px;z-index:2147483001!important;
  width:min(410px,calc(100vw - 24px));height:min(650px,calc(100vh - 108px));
  display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;
  background:#fff;border:1px solid #c8dce7;border-radius:22px;box-shadow:var(--hh-shadow);overflow:hidden;
  opacity:0;pointer-events:none;transform:translateY(12px) scale(.985);transform-origin:bottom right;
  transition:opacity .18s ease,transform .18s ease;
}
.houthulp-panel.is-open{opacity:1;pointer-events:auto;transform:none}

.houthulp-head{
  min-height:60px;display:flex;align-items:center;gap:9px;padding:9px 10px 9px 11px;
  background:linear-gradient(135deg,#0878b5,#0b98d4);color:#fff;
}
.houthulp-avatar{width:36px;height:36px;flex:0 0 36px;border-radius:11px;display:grid;place-items:center;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.25);font-size:18px}
.houthulp-head__text{min-width:0;flex:1}
.houthulp-head__text strong{display:block;font-size:.94rem;line-height:1.12;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.houthulp-head__text span{display:flex;align-items:center;gap:5px;margin-top:3px;font-size:.68rem;line-height:1.1;opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.houthulp-status-dot{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:#83efb0;box-shadow:0 0 0 3px rgba(131,239,176,.13)}
.houthulp-head button{width:34px;height:34px;flex:0 0 34px;border:0;border-radius:10px;background:rgba(255,255,255,.12);color:#fff;display:grid;place-items:center;cursor:pointer}
.houthulp-head button:hover{background:rgba(255,255,255,.2)}
.houthulp-head button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}

.houthulp-body{min-height:0;overflow:auto;padding:12px;background:linear-gradient(180deg,#f8fbfd 0,#fff 90px);scroll-behavior:smooth;overscroll-behavior:contain}
.houthulp-msg{display:flex;margin:0 0 9px}
.houthulp-msg--user{justify-content:flex-end}
.houthulp-bubble{max-width:82%;padding:9px 11px;border-radius:14px;line-height:1.4;font-size:.87rem;white-space:pre-wrap;overflow-wrap:anywhere}
.houthulp-msg--assistant .houthulp-bubble{background:#eef5f9;color:#14364a;border:1px solid #d9e7ee;border-bottom-left-radius:5px}
.houthulp-msg--user .houthulp-bubble{max-width:76%;background:#0b88c9;color:#fff;border-bottom-right-radius:5px}
.houthulp-meta{margin-top:5px;display:flex;justify-content:flex-end;align-items:center;min-height:20px}
.houthulp-feedback{display:flex;gap:3px}
.houthulp-feedback button{width:24px;height:22px;border:1px solid #d4e2e9;border-radius:7px;background:#fff;color:#547080;cursor:pointer;font-size:12px;line-height:1}
.houthulp-feedback button.is-selected{background:#dff4e7;border-color:#8ed3a8;color:#0e7340}
.houthulp-typing{display:inline-flex;gap:4px;align-items:center;padding:10px 12px;border-radius:13px;background:#eef5f9;border:1px solid #d9e7ee}
.houthulp-typing i{width:5px;height:5px;border-radius:50%;background:#6d8a99;animation:hhblink 1s infinite ease-in-out}.houthulp-typing i:nth-child(2){animation-delay:.15s}.houthulp-typing i:nth-child(3){animation-delay:.3s}
@keyframes hhblink{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}

.houthulp-chips{display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;margin:0 0 12px;padding:1px 1px 4px;scrollbar-width:none;overscroll-behavior-x:contain}
.houthulp-chips::-webkit-scrollbar{display:none}
.houthulp-chip{flex:0 0 auto;border:1px solid #c3dbe7;background:#fff;color:#09658f;border-radius:999px;padding:6px 9px;font:inherit;font-size:.72rem;font-weight:750;cursor:pointer;white-space:nowrap;box-shadow:0 2px 6px rgba(18,91,126,.04)}
.houthulp-chip:hover{background:#edf8fd}

.houthulp-products{display:grid;gap:7px;margin:7px 0 12px}
.houthulp-product{display:grid;grid-template-columns:54px minmax(0,1fr) auto;gap:9px;align-items:center;border:1px solid #d5e4eb;border-radius:12px;padding:8px;background:#fff}
.houthulp-product img{width:54px;height:54px;object-fit:cover;border-radius:8px;background:#eef4f7}
.houthulp-product__info{min-width:0}
.houthulp-product__info strong{display:block;color:#0c3148;font-size:.79rem;line-height:1.22}
.houthulp-product__info span,.houthulp-product__info small{display:block;margin-top:2px;color:#607887;font-size:.67rem;line-height:1.22;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.houthulp-product__action{display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.houthulp-product__price{font-weight:850;color:#0b4669;font-size:.77rem;white-space:nowrap}
.houthulp-product__price small{font-size:.62rem}
.houthulp-product__action button{border:0;border-radius:8px;padding:6px 8px;background:#0b8bce;color:#fff;font:inherit;font-size:.68rem;font-weight:800;cursor:pointer}

.houthulp-quote{margin:7px 0 12px;border:1px solid #bcd8e7;border-radius:13px;background:#fff;overflow:hidden}
.houthulp-quote__head{padding:9px 11px;background:#eaf6fb;color:#0c4667;display:flex;justify-content:space-between;gap:8px}
.houthulp-quote__head strong{font-size:.84rem}.houthulp-quote__head span{font-size:.68rem;font-weight:750}
.houthulp-quote__body{padding:9px 11px;display:grid;gap:6px}
.houthulp-quote__row{display:flex;justify-content:space-between;gap:10px;font-size:.75rem}.houthulp-quote__row b{white-space:nowrap}.houthulp-quote__row--discount{color:#13723f}.houthulp-quote__row--total{border-top:1px solid #dce8ee;margin-top:3px;padding-top:8px;font-size:.88rem}
.houthulp-quote__note{font-size:.65rem;color:#6d828e;line-height:1.35}.houthulp-quote__actions{display:flex;gap:7px;margin-top:3px}.houthulp-quote__actions button{flex:1;border:1px solid #aed2e3;background:#fff;color:#0a6e9f;border-radius:8px;padding:7px 8px;font:inherit;font-size:.68rem;font-weight:800;cursor:pointer}
.houthulp-context{margin:0 0 9px;padding:7px 9px;border-radius:9px;background:#fff7df;border:1px solid #f0d99f;color:#765814;font-size:.69rem;line-height:1.35}

.houthulp-foot{border-top:1px solid #d9e7ee;background:#fff;padding:8px 9px 9px;box-shadow:0 -6px 18px rgba(8,55,83,.045)}
.houthulp-inputrow{display:grid;grid-template-columns:36px minmax(0,1fr) 40px;gap:6px;align-items:end}
.houthulp-mic,.houthulp-send{width:36px;min-width:36px;height:40px;border:0;border-radius:11px;display:grid;place-items:center;cursor:pointer}
.houthulp-mic{background:#eef5f8;color:#335d72}.houthulp-mic.is-listening{background:#fde7e7;color:#ba2828}.houthulp-send{width:40px;min-width:40px;background:#0788ca;color:#fff}
.houthulp-mic svg,.houthulp-send svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2}
.houthulp-input{box-sizing:border-box;width:100%;min-width:0;min-height:40px;max-height:110px;resize:none;overflow-y:auto;border:1px solid #c6dce7;border-radius:11px;padding:9px 10px;font:inherit;font-size:.86rem;line-height:1.3;outline:none}
.houthulp-input:focus{border-color:#43a7d6;box-shadow:0 0 0 3px rgba(9,135,200,.09)}
.houthulp-foot__hint{text-align:center;margin-top:5px;color:#7a8e99;font-size:.58rem;line-height:1.25}

/* Mobiel: kleiner zwevend venster in plaats van schermvullende app. */
@media(max-width:767px){
  html{--hh-mobile-vh:100dvh;--hh-mobile-vw:100vw;--hh-mobile-vtop:0px;--hh-mobile-vleft:0px}
  body.houthulp-is-open{overflow:hidden!important;overscroll-behavior:none!important}
  body.houthulp-is-open .houthulp-launcher{opacity:0!important;pointer-events:none!important;transform:translateY(8px) scale(.94)!important}

  .houthulp-launcher{
    right:max(12px,env(safe-area-inset-right))!important;
    bottom:calc(110px + max(0px,env(safe-area-inset-bottom)))!important;
    width:54px!important;height:54px!important;min-width:54px!important;padding:0!important;border-radius:50%!important;
  }
  .houthulp-launcher span{display:none!important}.houthulp-launcher svg{width:25px!important;height:25px!important}

  .houthulp-panel{
    top:auto!important;
    left:10px!important;right:10px!important;
    bottom:calc(82px + max(0px,env(safe-area-inset-bottom)))!important;
    width:auto!important;max-width:420px!important;
    margin-left:auto!important;
    height:min(78dvh,680px)!important;max-height:calc(100dvh - 104px)!important;
    border:1px solid #c8dce7!important;border-radius:22px!important;box-shadow:0 18px 48px rgba(8,55,83,.26)!important;
    transform:translateY(18px) scale(.985)!important;transform-origin:bottom right!important;
  }
  .houthulp-panel.is-open{transform:none!important}
  .houthulp-head{min-height:58px!important;padding:8px 9px!important;gap:8px!important}
  .houthulp-avatar{width:34px!important;height:34px!important;flex-basis:34px!important;font-size:17px!important;border-radius:10px!important}
  .houthulp-head__text strong{font-size:.9rem!important}.houthulp-head__text span{font-size:.64rem!important}
  .houthulp-head button{width:32px!important;height:32px!important;flex-basis:32px!important;border-radius:9px!important}
  .houthulp-head button svg{width:16px!important;height:16px!important}

  .houthulp-body{padding:10px!important;scroll-padding-bottom:16px!important}
  .houthulp-bubble{max-width:82%!important;padding:8px 10px!important;font-size:.84rem!important;line-height:1.38!important}
  .houthulp-msg--user .houthulp-bubble{max-width:76%!important}
  .houthulp-msg{margin-bottom:8px!important}
  .houthulp-feedback button{width:23px!important;height:21px!important;font-size:11px!important}
  .houthulp-chips{gap:5px!important;margin-bottom:9px!important}.houthulp-chip{padding:6px 9px!important;font-size:.7rem!important}

  .houthulp-product{grid-template-columns:50px minmax(0,1fr) auto!important;gap:8px!important;padding:7px!important;border-radius:11px!important}
  .houthulp-product img{width:50px!important;height:50px!important;border-radius:8px!important}
  .houthulp-product__info strong{font-size:.75rem!important}.houthulp-product__info span,.houthulp-product__info small{font-size:.64rem!important}
  .houthulp-product__price{font-size:.72rem!important}.houthulp-product__action button{padding:6px 7px!important;font-size:.65rem!important}

  .houthulp-foot{padding:7px 8px calc(7px + max(0px,env(safe-area-inset-bottom)))!important}
  .houthulp-inputrow{grid-template-columns:34px minmax(0,1fr) 39px!important;gap:5px!important;align-items:end!important}
  .houthulp-mic{width:34px!important;min-width:34px!important;height:42px!important}.houthulp-send{width:39px!important;min-width:39px!important;height:42px!important}
  .houthulp-input{min-height:42px!important;height:auto!important;max-height:88px!important;padding:10px 9px!important;font-size:16px!important;line-height:1.25!important;border-radius:11px!important}
  .houthulp-input::placeholder{font-size:16px!important}.houthulp-foot__hint{display:none!important}

  /* Als het iOS-toetsenbord opent, gebruikt de chat vrijwel de hele zichtbare
     VisualViewport. Hierdoor blijven header, gesprek en invoerveld tegelijk zichtbaar. */
  body.houthulp-keyboard-open .houthulp-panel{
    top:calc(var(--hh-mobile-vtop,0px) + 7px)!important;
    left:calc(var(--hh-mobile-vleft,0px) + 7px)!important;
    right:auto!important;bottom:auto!important;
    width:calc(var(--hh-mobile-vw,100vw) - 14px)!important;max-width:none!important;margin:0!important;
    height:calc(var(--hh-mobile-vh,100dvh) - 14px)!important;max-height:none!important;
    border-radius:17px!important;
  }
  body.houthulp-keyboard-open .houthulp-head{min-height:52px!important;padding:6px 8px!important}
  body.houthulp-keyboard-open .houthulp-avatar{width:31px!important;height:31px!important;flex-basis:31px!important;font-size:15px!important}
  body.houthulp-keyboard-open .houthulp-body{padding-top:7px!important;padding-bottom:7px!important}
  body.houthulp-keyboard-open .houthulp-foot{padding-bottom:6px!important}
  body.houthulp-input-focused .mobile-bottom-nav,
  body.houthulp-input-focused .mobile-nav,
  body.houthulp-input-focused .bottom-nav{pointer-events:none!important}
}

@media(max-width:370px){
  .houthulp-panel{left:6px!important;right:6px!important}
  .houthulp-head__text span{max-width:135px}
  .houthulp-product{grid-template-columns:46px minmax(0,1fr)!important}
  .houthulp-product img{width:46px!important;height:46px!important}
  .houthulp-product__action{grid-column:2;display:flex!important;flex-direction:row!important;justify-content:space-between!important;align-items:center!important}
}

@media(prefers-reduced-motion:reduce){.houthulp-panel,.houthulp-launcher{transition:none}.houthulp-typing i{animation:none}}

/* 98.5.1: gecontroleerde servicelink in Houthulp-antwoord */
.houthulp-inline-link{color:#006cae;font-weight:800;text-decoration:underline;text-underline-offset:2px;}
.houthulp-inline-link:focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:3px;}

/* 98.5.2: compacte verkoop-CTA voor plaatmateriaal / meubelpanelen. */
.houthulp-service-cta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:6px 0 12px;padding:9px 10px;border:1px solid #c5dfe9;border-radius:12px;background:#f4fbfe}
.houthulp-service-cta div{min-width:0;display:grid;gap:2px}.houthulp-service-cta strong{font-size:.76rem;color:#0b4669}.houthulp-service-cta span{font-size:.64rem;line-height:1.3;color:#657d89}
.houthulp-service-cta a{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;background:#0788ca;color:#fff;text-decoration:none;padding:7px 9px;font-size:.67rem;font-weight:850;white-space:nowrap}
@media(max-width:767px){.houthulp-service-cta{padding:8px 9px;gap:8px}.houthulp-service-cta span{display:none}.houthulp-service-cta a{font-size:.65rem;padding:7px 8px}}


/* 98.5.3: rustige balie-cross-sell onder het hoofdadvies. */
.houthulp-related{margin:8px 10px 10px;padding:10px;border:1px solid #d7e5ee;border-radius:14px;background:#f8fbfd}
.houthulp-related__head{display:flex;flex-direction:column;gap:2px;margin-bottom:8px;color:#0b3550}
.houthulp-related__head strong{font-size:13px}.houthulp-related__head span{font-size:11px;line-height:1.35;color:#597184}
.houthulp-related__items{display:grid;gap:7px}.houthulp-related__item{display:grid;grid-template-columns:42px 1fr auto;gap:8px;align-items:center;background:#fff;border:1px solid #deebf2;border-radius:11px;padding:7px}
.houthulp-related__item img{width:42px;height:42px;object-fit:cover;border-radius:8px}.houthulp-related__item div{min-width:0;display:flex;flex-direction:column;gap:1px}.houthulp-related__item strong{font-size:12px;line-height:1.25;color:#0a334e}.houthulp-related__item span,.houthulp-related__item small{font-size:10.5px;line-height:1.25;color:#657e8f}.houthulp-related__item button{border:0;border-radius:9px;background:#078fca;color:#fff;font-weight:700;font-size:11px;padding:8px 9px;cursor:pointer}
@media(max-width:600px){.houthulp-related{margin:6px 8px 8px;padding:8px}.houthulp-related__head span{font-size:10.5px}.houthulp-related__item{grid-template-columns:38px 1fr auto}.houthulp-related__item img{width:38px;height:38px}}

/* 98.8.0 - taalkeuze altijd zichtbaar, ook op mobiel en bij hardnekkige browsercache. */
.houthulp-panel{grid-template-rows:auto auto minmax(0,1fr) auto}
.houthulp-head{position:relative;z-index:6}
.houthulp-languagebar{
  position:relative;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:8px;
  min-height:44px;padding:6px 9px;border-bottom:1px solid #d4e4eb;background:#f5fafd;color:#17445d;
}
.houthulp-languagebar__label{display:flex;align-items:center;gap:5px;flex:0 0 auto;font-size:.67rem;color:#587486}
.houthulp-languagebar__label>span{font-size:15px;color:#087fc3}.houthulp-languagebar__label b{font-weight:850}
.houthulp-languagebar__choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;min-width:230px}
.houthulp-languagebar__choices button{
  min-width:0;height:32px;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 7px;
  border:1px solid #c6dce7;border-radius:9px;background:#fff;color:#214b62;font:inherit;cursor:pointer;
  transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease;
}
.houthulp-languagebar__choices button:hover{border-color:#56acd5;background:#eef9fe}
.houthulp-languagebar__choices button.is-active{border-color:#0787ca;background:#0787ca;color:#fff;box-shadow:0 4px 10px rgba(7,135,202,.2)}
.houthulp-languagebar__choices button b{font-size:.67rem;letter-spacing:.03em}.houthulp-languagebar__choices button span{font-size:.65rem;font-weight:760;white-space:nowrap}
.houthulp-languagebar__choices button:focus-visible{outline:2px solid #0b93d0;outline-offset:2px}

/* Professionelere eerste indruk: iets rustiger, meer baliegevoel. */
.houthulp-msg--assistant:first-child .houthulp-bubble{background:#eef7fb;border-color:#cce2ec}
.houthulp-chip{transition:background .15s ease,border-color .15s ease,transform .15s ease}
.houthulp-chip:hover{border-color:#73b9d9;transform:translateY(-1px)}

@media(max-width:767px){
  .houthulp-languagebar{min-height:42px;padding:5px 8px;gap:6px}
  .houthulp-languagebar__label b{display:none}.houthulp-languagebar__label{width:24px;justify-content:center}.houthulp-languagebar__label>span{font-size:16px}
  .houthulp-languagebar__choices{min-width:0;flex:1;grid-template-columns:repeat(3,1fr)}
  .houthulp-languagebar__choices button{height:32px;padding:0 5px}
  .houthulp-languagebar__choices button b{font-size:.68rem}.houthulp-languagebar__choices button span{font-size:.61rem}
}
@media(max-width:390px){
  .houthulp-languagebar__choices button span{display:none}
  .houthulp-languagebar__choices button{height:31px}
}

/* 101.3.7 Houthulp 2.0: contextuele productadviseur */
.houthulp-advisor-start{margin:10px 0 4px;padding:14px;border:1px solid #c9e1ef;border-radius:14px;background:#f5fbfe;display:grid;gap:10px}
.houthulp-advisor-start>strong{font-size:15px;line-height:1.35;color:#0c3650}
.houthulp-advisor-start>small{font-size:12px;color:#627889;font-weight:700}
.houthulp-chips--primary .houthulp-chip{background:#fff;border-color:#9ccfe8;color:#064e73;font-weight:800}
.houthulp-chips--quick .houthulp-chip{font-size:12px}
.houthulp-page-cta{margin:16px auto;max-width:1500px;border:1px solid #b8dcec;background:linear-gradient(135deg,#f7fcff,#eef8fd);border-radius:18px;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:18px;box-shadow:0 8px 24px rgba(4,77,112,.07)}
.houthulp-page-cta>div{display:grid;gap:3px}.houthulp-page-cta small{font-weight:900;letter-spacing:.09em;color:#0078b5}.houthulp-page-cta strong{font-size:20px;color:#0b3149}.houthulp-page-cta span{font-size:14px;color:#536c7c}
.houthulp-page-cta button{border:0;border-radius:12px;background:#0798d1;color:#fff;padding:12px 18px;font-weight:900;cursor:pointer;white-space:nowrap}
@media(max-width:767px){.houthulp-page-cta{margin:12px 14px;align-items:stretch;flex-direction:column}.houthulp-page-cta button{width:100%}.houthulp-page-cta strong{font-size:18px}}
