/* Scherpstelhulp widget, in de merkstijl van Ronnie Couwenberg. */
:root {
  --sh-rood: #d23233;
  --sh-zwart: #000000;
  --sh-wit: #ffffff;
  --sh-grijs: #f2f5fa;
  --sh-donkergrijs: #adb4b9;
  --sh-font: "Flecha S", Georgia, "Times New Roman", serif;
}

/* CTA-norm gelijk aan de website (.s-cta): Flecha S, gewicht 500, 17px,
   letter-spacing 0.02em, pill, hover van rood naar zwart. */
.sh-launcher {
  position: fixed; right: 24px; bottom: 24px; z-index: 9998;
  font-family: var(--sh-font); font-size: 17px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--sh-wit); background: var(--sh-rood);
  border: none; border-radius: 999px; padding: 14px 28px;
  cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,.18);
  text-wrap: balance; transition: background-color .15s ease;
}
.sh-launcher:hover { background: var(--sh-zwart); }

.sh-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 9999;
  width: min(420px, calc(100vw - 32px)); height: min(620px, calc(100vh - 32px));
  display: none; flex-direction: column;
  background: var(--sh-wit); border-radius: 20px; overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.22); font-family: var(--sh-font);
}
.sh-panel.sh-open { display: flex; }

.sh-head {
  background: var(--sh-zwart); color: var(--sh-wit);
  padding: 16px 18px; display: flex; justify-content: space-between; align-items: center;
}
.sh-head b { font-weight: 500; font-size: 16px; }
.sh-head .sh-rood { color: var(--sh-rood); }
.sh-close { background: none; border: none; color: var(--sh-wit); font-size: 22px; cursor: pointer; line-height: 1; }

.sh-log { flex: 1; overflow-y: auto; padding: 18px; background: var(--sh-grijs); }
.sh-msg { margin-bottom: 14px; line-height: 1.5; font-size: 16px; }
.sh-msg.sh-hulp { color: var(--sh-zwart); }
.sh-msg.sh-jij { text-align: right; }
.sh-msg.sh-jij span {
  display: inline-block; background: var(--sh-zwart); color: var(--sh-wit);
  padding: 8px 14px; border-radius: 14px; max-width: 85%; text-align: left;
}
.sh-msg.sh-hulp span {
  display: inline-block; background: var(--sh-wit); padding: 10px 14px;
  border-radius: 14px; max-width: 90%; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.sh-cta { margin: 6px 0 4px; display: flex; flex-direction: column; gap: 8px; }
/* Knoppen in de gespreksflow volgen de site-CTA: gewicht 500, 17px, pill,
   hover naar zwart. De grote rode is hier de leidende actie. */
.sh-cta a, .sh-cta button {
  font-family: var(--sh-font); font-weight: 500; font-size: 17px; letter-spacing: 0.02em;
  line-height: 1.2; text-decoration: none; text-align: center;
  padding: 13px 24px; border-radius: 999px; cursor: pointer; border: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.sh-cta .sh-primair { background: var(--sh-rood); color: var(--sh-wit); }
.sh-cta .sh-primair:hover { background: var(--sh-zwart); color: var(--sh-wit); }
.sh-cta .sh-secundair { background: var(--sh-wit); color: var(--sh-zwart); border: 1px solid var(--sh-donkergrijs); }
.sh-cta .sh-secundair:hover { background: var(--sh-zwart); color: var(--sh-wit); border-color: var(--sh-zwart); }

.sh-foot { padding: 12px; background: var(--sh-wit); border-top: 1px solid var(--sh-grijs); }
.sh-foot form { display: flex; gap: 8px; }
.sh-foot input[type=text] {
  flex: 1; font-family: var(--sh-font); font-size: 16px;
  padding: 11px 14px; border: 1px solid var(--sh-donkergrijs); border-radius: 12px;
}
.sh-foot button { background: var(--sh-rood); color: var(--sh-wit); border: none; border-radius: 999px; padding: 0 20px; cursor: pointer; font-family: var(--sh-font); font-weight: 500; letter-spacing: 0.02em; transition: background-color .15s ease; }
.sh-foot button:hover { background: var(--sh-zwart); }
.sh-leadform { display: flex; flex-direction: column; gap: 8px; }
.sh-leadform input { font-family: var(--sh-font); font-size: 15px; padding: 10px 12px; border: 1px solid var(--sh-donkergrijs); border-radius: 10px; }
.sh-typing { color: var(--sh-donkergrijs); font-style: italic; }

.sh-fine { margin-top: 8px; font-size: 12px; line-height: 1.4; color: var(--sh-donkergrijs); text-align: center; text-wrap: balance; }

/* Mobiel: schermvullend paneel. De kop respecteert de veilige zone bovenaan
   (statusbalk en notch), zodat de openingstekst zichtbaar blijft. 100dvh volgt
   het zichtbare scherm, dus het toetsenbord snijdt niets af. */
@media (max-width: 480px) {
  .sh-panel {
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100%; height: 100vh; height: 100dvh;
    border-radius: 0;
  }
  .sh-head { padding-top: calc(16px + env(safe-area-inset-top)); }
  .sh-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
