/* ===================================================
   LUIZA HOT FUNNEL — WhatsApp Light Mode Clássico
   =================================================== */

:root {
  /* WhatsApp Official Light Palette */
  --wa-header-bg:     #075E54;
  --wa-bg-chat:       #E5DDD5;
  --wa-bubble-in:     #FFFFFF;
  --wa-bubble-out:    #DCF8C6;
  --wa-text-primary:  #000000;
  --wa-text-secondary:#808080;
  --wa-text-meta:     #999999;
  --wa-teal:          #128C7E;
  --wa-blue-check:    #34B7F1;
  --wa-sys-msg-bg:    #FFF5C4;
  --wa-sys-msg-txt:   #4A4A4A;
  
  --wa-input-bg:      #FFFFFF;
  --wa-footer-bg:     #F0F0F0;
  --wa-icon-color:    #858B90;

  /* Font */
  --font-wa: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font-wa);
  background: var(--wa-bg-chat);
  color: var(--wa-text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* === System Message Box === */
.system-msg-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.system-msg {
  background-color: var(--wa-sys-msg-bg);
  color: var(--wa-sys-msg-txt);
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  max-width: 90%;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.system-msg svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #7A7A7A;
}

/* === Business Info System Notice === */
.biz-msg-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 12px 8px;
  margin-bottom: 4px;
}
.biz-msg {
  background-color: #DDF5F0;
  color: #111B21;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 10px;
  text-align: center;
  max-width: 90%;
  line-height: 1.35;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.biz-msg-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #007A65;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  font-family: sans-serif;
  flex-shrink: 0;
  font-style: italic;
}

/* === Date Separator === */
.date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 8px;
}
.date-separator-text {
  background: rgba(225, 243, 251, 0.9);
  color: #556269;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: uppercase;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}

/* === Chat Area === */
#screen-chat {
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  background: #E5DDD5 url("https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png") repeat;
  background-size: 400px;
}

/* === Header === */
.wa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--wa-header-bg);
  color: #fff;
  z-index: 10;
  min-height: 60px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

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

.wa-back-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  border-radius: 50%;
}

.wa-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.wa-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wa-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wa-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.wa-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.verified-icon {
  margin-left: 2px;
}

.wa-status {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  white-space: nowrap;
}

.wa-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wa-action-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
}

/* === Chat Background === */
.wa-chat-bg {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px 8px;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}
.wa-chat-bg::-webkit-scrollbar { width: 6px; }
.wa-chat-bg::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }

/* === Messages Container === */
.wa-messages {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

/* === Message Bubbles === */
.wa-msg {
  display: flex;
  margin-bottom: 2px;
  position: relative;
}

.wa-msg--in { justify-content: flex-start; }
.wa-msg--out { justify-content: flex-end; }

.wa-msg--in + .wa-msg--out,
.wa-msg--out + .wa-msg--in {
  margin-top: 6px;
}

.wa-bubble {
  max-width: 80%;
  padding: 6px 7px 8px 9px;
  border-radius: 7.5px;
  position: relative;
  word-wrap: break-word;
  font-size: 14.5px;
  line-height: 1.35;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* Incoming bubble */
.wa-msg--in .wa-bubble {
  background: var(--wa-bubble-in);
  border-top-left-radius: 0;
  color: var(--wa-text-primary);
}
.wa-msg--in .wa-bubble--first::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 8px solid var(--wa-bubble-in);
  border-left: 8px solid transparent;
}

/* Outgoing bubble */
.wa-msg--out .wa-bubble {
  background: var(--wa-bubble-out);
  border-top-right-radius: 0;
  color: var(--wa-text-primary);
}
.wa-msg--out .wa-bubble--first::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 8px solid var(--wa-bubble-out);
  border-right: 8px solid transparent;
}

/* Message meta (time + checkmarks) */
.wa-msg-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  float: right;
  margin-left: 10px;
  margin-top: 4px;
  margin-bottom: -4px;
}
.wa-msg-time {
  font-size: 11px;
  color: var(--wa-text-meta);
  white-space: nowrap;
}
.wa-check-svg {
  flex-shrink: 0;
  display: inline-block;
}

/* === Typing Indicator === */
.wa-typing {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.wa-typing-bubble {
  background: var(--wa-bubble-in);
  border-radius: 7.5px;
  border-top-left-radius: 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  position: relative;
}
.wa-typing-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 8px solid var(--wa-bubble-in);
  border-left: 8px solid transparent;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wa-text-meta);
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%            { transform: translateY(-4px); opacity: 1; }
}

/* Outer Avatar for Incoming Messages */
.wa-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 6px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.wa-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === AUTHENTIC AUDIO PLAYER === */
.wa-audio-bubble {
  padding: 6px 8px 4px 8px !important;
  min-width: 250px;
  max-width: 285px;
  box-sizing: border-box;
}
.wa-audio-player {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.audio-play-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #667781;
  padding: 0;
}
.audio-play-btn.playing { background: transparent; color: #667781; }
.audio-play-btn svg { fill: currentColor; }

.audio-center-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.audio-waveform-wrap {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
}
.audio-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  padding-left: 5px;
}
.audio-bar {
  flex: 1;
  background: #CCCCCC;
  border-radius: 2px;
  transition: background 0.08s;
}
.audio-bar.played {
  background: #34B7F1;
}
.audio-thumb {
  position: absolute;
  left: 0%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #34B7F1;
  border-radius: 50%;
  z-index: 10;
  pointer-events: none;
  transition: left 0.05s linear;
}
.audio-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.audio-time {
  font-size: 11px;
  color: var(--wa-text-meta);
}

.audio-right-col {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 4px;
  width: 36px;
  height: 36px;
}
.audio-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #ccc;
}
.audio-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.audio-mic-icon {
  position: absolute;
  bottom: -2px;
  left: -4px;
  background: #02B099;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border: 1.5px solid #fff;
}
}

/* === Blurred Image Bubble === */
.wa-img-bubble {
  border-radius: 6px;
  overflow: hidden;
  max-width: 240px;
  cursor: pointer;
  position: relative;
  margin: 2px 2px 0 2px;
}
.wa-img-bubble img {
  display: block;
  width: 100%;
  border-radius: 6px;
}
.wa-img-blur {
  filter: blur(15px);
  transition: filter 0.3s;
}
.wa-img-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
}

/* === Quick Replies (Styled neutrally to fit WhatsApp Light) === */
.wa-quick-replies {
  padding: 8px 12px;
  background: var(--wa-footer-bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.wa-quick-replies:empty { display: none; }
.btn-qr {
  padding: 10px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #d1d1d1;
  color: var(--wa-teal);
  font-size: 15px;
  font-family: var(--font-wa);
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.btn-qr:active { background: #f0f0f0; }

/* === Footer Input Bar (Like original WhatsApp) === */
.wa-footer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px;
  background: var(--wa-chat-bg);
  flex-shrink: 0;
}
.wa-input-wrap {
  flex: 1;
  background: var(--wa-input-bg);
  border-radius: 24px;
  padding: 0 8px 0 14px;
  display: flex;
  align-items: center;
  min-height: 48px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}
.wa-action-icon {
  background: none;
  border: none;
  color: var(--wa-icon-color);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.wa-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--wa-text-primary);
  font-size: 16px;
  font-family: var(--font-wa);
  padding: 12px 0;
  min-width: 0;
}
.wa-input::placeholder { color: #999999; }
.wa-send-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--wa-teal);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  color: #fff;
}
.wa-send-btn svg { fill: currentColor; }



/* Desktop Frame */
@media (min-width: 520px) {
  body {
    background: #d1d7db;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .screen.active {
    position: relative;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    max-width: 420px;
  }
  .wa-header {
    border-radius: 12px 12px 0 0;
  }
}

/* === Testimonials === */
.wa-testimonials-bubble {
  padding: 12px 10px !important;
  max-width: 300px !important;
}
.testimonials-title {
  font-size: 14px;
  font-weight: 700;
  color: #111B21;
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e5e5;
}
.testimonial-card {
  background: #F9F9F9;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid #EFEFEF;
}
.testimonial-card:last-child { margin-bottom: 0; }
.testimonial-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.testimonial-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #E0E0E0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.testimonial-name {
  font-size: 13px;
  font-weight: 600;
  color: #111B21;
  flex: 1;
}
.testimonial-stars {
  font-size: 11px;
  letter-spacing: 1px;
}
.testimonial-text {
  font-size: 12.5px;
  color: #3B4A54;
  line-height: 1.4;
}

/* === CTA WhatsApp Button === */
.wa-cta-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 16px 4px;
}
.wa-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 4px 12px rgba(37,211,102,0.35);
  transition: background 0.2s, transform 0.1s;
}
.wa-cta-btn:hover { background: #1ebe5a; transform: scale(1.02); }
.wa-cta-btn:active { transform: scale(0.98); }
