/* =============================================================
   Hover Widget – Contactformulier
   Stijl passend bij de Medispace huisstijl (#114566 / #57abd9)
   Modulair: koppel via <link> in de <head>
   ============================================================= */

/* ── Widget wrapper – vast rechtsonder op de pagina ── */
.hover-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: 'Montserrat', Arial, sans-serif;
}

/* ── Trigger: avatar + tekstballon ── */
.hover-widget__trigger {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 0;
}

.hover-widget__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #57abd9;
  object-fit: cover;
  object-position: top;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.hover-widget__trigger:hover .hover-widget__avatar {
  transform: scale(1.06);
}

.hover-widget__callout {
  background: linear-gradient(90deg, #57abd9 0%, #114566 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.25;
  padding: 10px 16px;
  border-radius: 8px 8px 0 8px;
  max-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin-right: 10px;
  position: relative;
}

/* pijltje naar de avatar */
.hover-widget__callout::after {
  content: '';
  position: absolute;
  right: -8px;
  bottom: 0;
  border-width: 8px 0 0 8px;
  border-style: solid;
  border-color: transparent transparent transparent #114566;
}

/* ── Paneel (vouwt open) ── */
.hover-widget__panel {
  width: 320px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  margin-top: 10px;
  overflow: hidden;

  /* animatie: inklappen via max-height */
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.hover-widget__panel.is-open {
  max-height: 740px;
  opacity: 1;
  pointer-events: auto;
}

/* ── Paneelkop ── */
.hover-widget__header {
  position: relative;
  background: #114566;
  color: #fff;
  padding: 12px 36px 12px 16px;
  font-size: 13px;
  font-weight: 700;
}

.hover-widget__header-title {
  display: block;
}

.hover-widget__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hover-widget__close:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.8);
}

/* ── Paneelinhoud ── */
.hover-widget__body {
  padding: 16px;
}

.hover-widget__intro {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 14px;
}

/* ── Formulier ── */
.hover-widget__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Veld met label (verplichte velden) */
.hover-widget__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hover-widget__field label {
  font-size: 11px;
  font-weight: 600;
  color: #777;
  line-height: 1;
}

.hover-widget__req {
  color: #c0392b;
  font-weight: 700;
}

/* Rij met twee velden naast elkaar (naam + bedrijfsnaam) */
.hover-widget__form-row {
  display: flex;
  gap: 8px;
}

.hover-widget__form-row input {
  flex: 1;
  min-width: 0;
}

.hover-widget__form input,
.hover-widget__form textarea {
  width: 100%;
  padding: 13px 12px;
  border: 1px solid #ccd6e0;
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  transition: border-color 0.2s;
  background: #f7f9fb;
}

.hover-widget__form input:focus,
.hover-widget__form textarea:focus {
  outline: none;
  border-color: #57abd9;
  background: #fff;
}

.hover-widget__form textarea {
  resize: vertical;
  min-height: 72px;
}

/* Validatiefout */
.hover-widget__form input.error,
.hover-widget__form textarea.error {
  border-color: #c0392b;
}

.hover-widget__form .field-error {
  font-size: 11px;
  color: #c0392b;
  margin-top: -6px;
}

/* Verzendknop – zelfde stijl als .button in het project */
.hover-widget__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: none;
  border-radius: 5px;
  background: linear-gradient(90deg, #57abd9 0%, #114566 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.hover-widget__submit:hover {
  opacity: 0.88;
}

.hover-widget__submit svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ── Succesbericht (na verzenden) ── */
.hover-widget__success {
  display: none;
  padding: 24px 16px;
  font-size: 15px;
  color: #114566;
  font-weight: 700;
  text-align: center;
  line-height: 1.6;
  background: #f0f8ff;
  border-radius: 6px;
  border: 1px solid #c8e6f5;
}

/* ── Responsief: op kleine schermen volledig breed onderin ── */
@media (max-width: 480px) {
  .hover-widget {
    right: 0;
    bottom: 0;
    width: 100%;
    align-items: stretch;
  }

  .hover-widget__trigger {
    justify-content: flex-end;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
  }

  .hover-widget__panel {
    width: 100%;
    border-radius: 0;
    margin-top: 0;
  }

  .hover-widget__panel.is-open {
    max-height: 700px;
  }
}
