/* =====================================================
   FAKE WHATSAPP UI – COMPLETE CSS (SALIENT SAFE)
===================================================== */

/* Overlay background blur */
#wa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  animation: fadeIn 0.3s ease;
}

/* Fade in animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Phone container */
#wa-phone {
  width: 380px;
  max-width: 92%;
  height: 78vh;
  max-height: 680px;
  background: #ece5dd;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);

  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

/* Header */
#wa-header {
  background: #075e54;
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#wa-header .left-header {
  display: flex;
  align-items: center; 
  gap: 12px;
}

#wa-header img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

#wa-header .text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

#wa-header .name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

/* typing status */
#wa-header .status {
  display: block;
  font-size: 13px;
  color: #cfe9e5;
  margin-top: 2px;
}

/* Close button */
#wa-close {
  font-size: 26px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  user-select: none;
}

/* Chat area */
#wa-chat {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
}

/* Rows – scoped */
#wa-phone .row { 
  display: flex; 
  margin-bottom: 12px; 
}
#wa-phone .row.right { justify-content: flex-end; }
#wa-phone .row.left  { justify-content: flex-start; }

/* Bubbles – scoped */
#wa-phone .bubble {
  padding: 10px 12px;
  border-radius: 10px;
  max-width: 78%;
  font-size: 15px;
  position: relative;
  word-break: break-word;
}

#wa-phone .bubble.bot {
  background: #fff;
  color: #111;
  border-top-left-radius: 0;
}

#wa-phone .bubble.me {
  background: #dcf8c6;
  color: #222;
  border-top-right-radius: 0;
}

/* Time */
#wa-phone .time {
  font-size: 10px;
  opacity: 0.6;
  margin-left: 6px;
}

/* Typing animation – scoped */
#wa-phone .typing {
  display: inline-flex;
  gap: 3px;
}
#wa-phone .typing span {
  width: 6px;
  height: 6px;
  background: #999;
  border-radius: 50%;
  animation: blink 1.4s infinite;
}
#wa-phone .typing span:nth-child(2) { animation-delay: 0.2s; }
#wa-phone .typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0% { opacity: 0.2; transform: translateY(0); }
  20% { opacity: 1; transform: translateY(-2px); }
  40% { opacity: 0.2; transform: translateY(0); }
}

/* Buttons row – scoped */
#wa-phone .buttons-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 4px;
}

/* Quick reply buttons – scoped */
#wa-phone .buttons-row button {
  padding: 10px 14px;
  border-radius: 8px;
  background: #ffffff;
  color: #222;
  border: 1px solid #d3d3d3;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#wa-phone .buttons-row button:hover {
  background: #f2f2f2;
  border-color: #c2c2c2;
}

/* Input bar */
#wa-inputbar {
  background: #e5ddd5 !important;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#wa-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: none;
  font-size: 14px;
  outline: none;
}

#wa-sendbtn {
  width: 40px;
  height: 40px;
  background: #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  transition: 0.2s;
  pointer-events: none;
}

#wa-sendbtn.send {
  background: #25d366;
  opacity: 1;
  pointer-events: auto;
}

#wa-sendbtn i {
  color: #fff;
  font-size: 16px;
}

/* =====================================================
   MOBILE FULLSCREEN + 16PX FONT
===================================================== */
@media (max-width: 600px) {

  #wa-overlay {
    padding: 0;
    backdrop-filter: blur(0px);
  }

  #wa-phone {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
  }

  #wa-phone,
  #wa-phone * {
    font-size: 16px !important;
    line-height: 1.36 !important;

    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
  }

  #wa-header {
    padding: 14px 16px;
  }

  #wa-chat {
    padding: 20px 16px;
  }

  #wa-inputbar {
    padding: 12px 14px;
  }
}

/* intl-tel-input container binnen de bot */
#wa-phone .iti {
  position: relative;
}

/* Groen FontAwesome vinkje alleen in de bot */
#wa-phone .iti.wa-valid::after {
  content: "\f00c"; /* FA-check */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #25d366;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
  z-index: 50;
}