/* Support-assistent en account-drawer (09 §2.4/2.5). Alleen tokens; geen hexwaarden. */

.zp-assistant {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zp-assistant__log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 2px;
}

.zp-assistant__row {
  display: flex;
}

.zp-assistant__row--user {
  justify-content: flex-end;
}

.zp-assistant__answer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.zp-assistant__msg {
  background: var(--zp-bg-soft);
  color: var(--zp-text);
  border-radius: var(--zp-radius-md);
  border-bottom-left-radius: 4px;
  padding: 10px 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 85%;
  white-space: pre-line;
}

.zp-assistant__msg--user {
  background: var(--zp-petrol-text);
  color: var(--zp-white);
  border-bottom-left-radius: var(--zp-radius-md);
  border-bottom-right-radius: 4px;
}

.zp-assistant__msg.zp-assistant__typing {
  color: var(--zp-muted);
  animation: zpAssistPulse 1s ease-in-out infinite;
}

@keyframes zpAssistPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.zp-assistant__card {
  width: 100%;
  max-width: 380px;
  padding: 16px;
  margin: 0;
}

.zp-assistant__card-title {
  font-weight: 800;
  margin-bottom: 4px;
}

.zp-assistant__card-text {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.zp-assistant__card .zp-btn {
  display: inline-block;
}

.zp-assistant__order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.zp-assistant__steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 12px;
  padding: 0;
}

.zp-assistant__step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.zp-assistant__step::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zp-line);
}

.zp-assistant__step--done::before {
  background: var(--zp-ok-text);
}

.zp-assistant__step--current::before {
  background: var(--zp-magenta);
}

.zp-assistant__step-label {
  font-size: 0.8rem;
  color: var(--zp-muted);
}

.zp-assistant__step--current .zp-assistant__step-label {
  color: var(--zp-text);
  font-weight: 700;
}

.zp-assistant__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.zp-assistant__faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.zp-assistant__faq details {
  border: 1px solid var(--zp-line);
  border-radius: var(--zp-radius-sm);
  background: var(--zp-white);
  padding: 10px 14px;
}

.zp-assistant__faq summary {
  font-weight: 700;
  cursor: pointer;
}

.zp-assistant__faq details p {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.zp-assistant__suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap; /* geen scrollbalk: suggesties lopen door op een volgende regel */
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 2px;
}

.zp-assistant__suggestion {
  flex: 0 0 auto;
  font: inherit;
  cursor: pointer;
}

.zp-assistant__form {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.zp-assistant__form .zp-input {
  flex: 1;
  min-width: 0;
}

.zp-assistant__sep {
  text-align: center;
  font-size: 0.78rem;
  color: var(--zp-muted);
  border-top: 1px solid var(--zp-line);
  padding-top: 10px;
  margin: 4px 0;
}

.zp-assistant__feedback {
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--zp-muted);
}

.zp-assistant__vote {
  border: 1px solid var(--zp-line);
  background: var(--zp-white);
  color: var(--zp-petrol-text);
  font: 700 0.8rem var(--zp-font-body);
  border-radius: var(--zp-radius-pill);
  padding: 4px 12px;
  min-height: 28px;
  cursor: pointer;
}

.zp-assistant__vote:hover {
  border-color: var(--zp-petrol-text);
}

.zp-assistant__vote:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Drawer (09 §2.5) */

.zp-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: flex-end;
}

.zp-drawer[hidden] {
  display: none;
}

.zp-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: var(--zp-overlay);
}

.zp-drawer__panel {
  position: relative;
  z-index: 1; /* boven de backdrop (die staat later in de DOM en lag anders over het paneel) */
  width: 100%;
  height: 100%;
  background: var(--zp-white);
  box-shadow: var(--zp-shadow-float);
  display: flex;
  flex-direction: column;
  animation: zpDrawerIn 0.2s ease;
}

@keyframes zpDrawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.zp-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--zp-line);
}

.zp-drawer__head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.zp-drawer .zp-assistant {
  flex: 1;
  min-height: 0;
  padding: 20px;
}

.zp-drawer .zp-assistant__log {
  flex: 1;
  max-height: none;
}

@media (min-width: 640px) {
  .zp-drawer__panel {
    width: 420px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zp-drawer__panel {
    animation: none;
  }

  .zp-assistant__msg.zp-assistant__typing {
    animation: none;
  }
}

/* Vaste Hulp-knop rechtsonder (footer.php, zp_help_fab()) */

.zp-help-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  background: var(--zp-petrol-text);
  color: var(--zp-white);
  font: 800 15px var(--zp-font-display);
  text-decoration: none;
  box-shadow: var(--zp-shadow-float);
  transition: background 0.15s ease, transform 0.15s ease;
}

.zp-help-fab:hover,
.zp-help-fab:focus-visible {
  background: var(--zp-petrol-dark);
  color: var(--zp-white);
  transform: translateY(-1px);
}

.zp-help-fab .zp-icon {
  width: 22px;
  height: 22px;
}

/* Mobiel alleen het icoon, zodat hij geen knoppen onderaan afdekt. */
@media (max-width: 639px) {
  .zp-help-fab {
    right: 16px;
    bottom: 16px;
    width: 52px;
    padding: 0;
    justify-content: center;
  }

  .zp-help-fab span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

@media print {
  .zp-help-fab { display: none; }
}
