/* ════════════════════════════════════════════
   Practiquette Offerte Chat — Stijl
   Goud #C9A84C  |  Diepzwart #1a1a1a  |  Crème #FAF7F0
   ════════════════════════════════════════════ */

:root {
  --pq-gold:       #C9A84C;
  --pq-gold-light: #E4C97E;
  --pq-gold-dark:  #A8873A;
  --pq-black:      #1a1a1a;
  --pq-dark:       #222222;
  --pq-mid:        #3a3a3a;
  --pq-cream:      #FAF7F0;
  --pq-cream2:     #F2EDE3;
  --pq-white:      #ffffff;
  --pq-radius:     16px;
  --pq-shadow:     0 12px 48px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.12);
}

/* ── Bubble knop ─────────────────────────── */
#pq-chat-bubble {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--pq-gold) 0%, var(--pq-gold-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99999;
  box-shadow: 0 4px 20px rgba(201,168,76,0.45), 0 2px 6px rgba(0,0,0,0.18);
  transition: transform 0.22s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s;
  border: 2px solid rgba(255,255,255,0.18);
}
#pq-chat-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(201,168,76,0.6), 0 2px 8px rgba(0,0,0,0.2);
}
#pq-chat-bubble:focus-visible {
  outline: 3px solid var(--pq-gold-light);
  outline-offset: 3px;
}
#pq-bubble-icon svg path,
#pq-bubble-close svg path {
  stroke: var(--pq-black);
}

/* Pulse ring animatie */
#pq-chat-bubble::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--pq-gold);
  opacity: 0;
  animation: pq-pulse 2.4s ease-out infinite;
}
@keyframes pq-pulse {
  0%   { transform: scale(1);    opacity: 0.6; }
  70%  { transform: scale(1.35); opacity: 0;   }
  100% { transform: scale(1.35); opacity: 0;   }
}

/* ── Chat venster ────────────────────────── */
#pq-chat-window {
  position: fixed;
  bottom: 102px;
  right: 28px;
  width: 360px;
  max-height: 560px;
  background: var(--pq-cream);
  border-radius: var(--pq-radius);
  box-shadow: var(--pq-shadow);
  display: flex;
  flex-direction: column;
  z-index: 99998;
  overflow: hidden;
  font-family: 'Georgia', 'Times New Roman', serif;
  transform: scale(0.88) translateY(20px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(.34,1.4,.64,1), opacity 0.22s ease;
  border: 1px solid rgba(201,168,76,0.25);
}
#pq-chat-window.pq-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ── Header ──────────────────────────────── */
#pq-chat-header {
  background: linear-gradient(135deg, var(--pq-black) 0%, var(--pq-dark) 100%);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--pq-gold-dark);
  flex-shrink: 0;
}
#pq-chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
#pq-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pq-gold) 0%, var(--pq-gold-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: var(--pq-black);
  font-family: 'Georgia', serif;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
#pq-chat-name {
  color: var(--pq-cream);
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'Georgia', serif;
}
#pq-chat-status {
  color: var(--pq-gold-light);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: Arial, sans-serif;
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.pq-dot {
  width: 7px;
  height: 7px;
  background: #6fcf97;
  border-radius: 50%;
  display: inline-block;
  animation: pq-blink 2s ease-in-out infinite;
}
@keyframes pq-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
#pq-chat-tagline {
  color: var(--pq-gold);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: Arial, sans-serif;
  opacity: 0.85;
}

/* ── Berichten gebied ────────────────────── */
#pq-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
#pq-chat-messages::-webkit-scrollbar { width: 4px; }
#pq-chat-messages::-webkit-scrollbar-track { background: transparent; }
#pq-chat-messages::-webkit-scrollbar-thumb { background: var(--pq-cream2); border-radius: 4px; }

/* Bot bericht */
.pq-msg-bot {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  animation: pq-fadein 0.28s ease;
}
@keyframes pq-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pq-msg-bot-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pq-gold) 0%, var(--pq-gold-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: var(--pq-black);
  flex-shrink: 0;
  font-family: 'Georgia', serif;
}
.pq-msg-bot-bubble {
  background: var(--pq-white);
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--pq-black);
  padding: 11px 15px;
  border-radius: 14px 14px 14px 4px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 260px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

/* Gebruiker bericht */
.pq-msg-user {
  display: flex;
  justify-content: flex-end;
  animation: pq-fadein 0.22s ease;
}
.pq-msg-user-bubble {
  background: linear-gradient(135deg, var(--pq-gold) 0%, var(--pq-gold-dark) 100%);
  color: var(--pq-black);
  padding: 11px 15px;
  border-radius: 14px 14px 4px 14px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 240px;
  font-weight: 500;
}

/* Snelkeuze knoppen */
.pq-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
  padding-left: 36px;
  animation: pq-fadein 0.3s ease 0.1s both;
}
.pq-choice-btn {
  background: var(--pq-white);
  border: 1.5px solid var(--pq-gold);
  color: var(--pq-black);
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Georgia', serif;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s, transform 0.12s;
  line-height: 1.3;
}
.pq-choice-btn:hover {
  background: var(--pq-gold);
  color: var(--pq-black);
  transform: translateY(-1px);
}
.pq-choice-btn:active { transform: translateY(0); }

/* Typing indicator */
.pq-typing {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  animation: pq-fadein 0.2s ease;
}
.pq-typing-bubble {
  background: var(--pq-white);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 12px 16px;
  border-radius: 14px 14px 14px 4px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.pq-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--pq-gold);
  border-radius: 50%;
  animation: pq-type-bounce 1.2s ease infinite;
}
.pq-typing-dot:nth-child(2) { animation-delay: 0.18s; }
.pq-typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes pq-type-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* Bevestiging scherm */
.pq-success {
  text-align: center;
  padding: 12px 8px;
  animation: pq-fadein 0.3s ease;
}
.pq-success-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--pq-gold) 0%, var(--pq-gold-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 22px;
}
.pq-success-title {
  font-family: 'Georgia', serif;
  font-size: 15px;
  color: var(--pq-black);
  font-weight: normal;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.pq-success-sub {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

/* ── Invoerveld ──────────────────────────── */
#pq-chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--pq-white);
  border-top: 1px solid rgba(201,168,76,0.2);
  flex-shrink: 0;
}
#pq-chat-input {
  flex: 1;
  border: 1.5px solid rgba(201,168,76,0.35);
  border-radius: 22px;
  padding: 9px 15px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  background: var(--pq-cream);
  color: var(--pq-black);
  outline: none;
  transition: border-color 0.18s;
}
#pq-chat-input:focus {
  border-color: var(--pq-gold);
}
#pq-chat-input::placeholder { color: #aaa; }
#pq-chat-send {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--pq-gold) 0%, var(--pq-gold-dark) 100%);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(201,168,76,0.35);
}
#pq-chat-send:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(201,168,76,0.5);
}
#pq-chat-send svg path { stroke: var(--pq-black); }

/* ── Mobiel ──────────────────────────────── */
@media (max-width: 480px) {
  #pq-chat-window {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 96px;
  }
  #pq-chat-bubble {
    right: 16px;
    bottom: 20px;
  }
}
