/* whatsapp_widget.css - colorful redesigned version (structure unchanged) */
:root{
  /* Brighter & more lively palette */
  --wp-green: #12C269;         /* bright green */
  --wp-green-2: #04B182;       /* secondary green */
  --card-bg: #FFFFFF;
  --muted: #5D6E75;
  --accent: #055A4B;           /* deep teal */
  --glass: rgba(10, 20, 18, 0.05);
  --shadow-1: 0 6px 22px rgba(16, 30, 25, 0.12);
  --shadow-2: 0 10px 32px rgba(16, 30, 25, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --smoke: #F7FAFB;
  --surface: #FDFEFE;
  --success-contrast: #ffffff;
  --border: #E4EEF0;
  --input-bg: #FAFEFB;
  --max-width: 360px;
}

/* base */
#whatsapp-widget-root { font-family: var(--font-sans); -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }

/* Floating button */
.wh-widget-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(145deg, #00E676, #00C9A7, #00ACC1);
  box-shadow: 0 12px 30px rgba(0, 200, 140, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.9,.3,1), box-shadow .18s ease;
  border: none;
}
.wh-widget-fab:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 200, 140, 0.4);
}
.wh-widget-fab:active { transform: translateY(-2px) scale(.97); }
.wh-widget-fab svg { width: 28px; height: 28px; color: #fff; }

/* Chat card */
.wh-widget-chat {
  position: fixed;
  right: 22px;
  bottom: 100px;
  width: var(--max-width);
  max-width: calc(100% - 44px);
  height: 520px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  z-index: 99999;
  background: linear-gradient(180deg, #ffffff, #F4FFFB);
  border: 1px solid rgba(8, 46, 40, 0.05);
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transition: opacity .22s ease, transform .22s cubic-bezier(.2,.9,.3,1);
}
.wh-widget-chat.open { opacity: 1; transform: translateY(0) scale(1); }

/* Header */
.wh-header {
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 14px;
  background: linear-gradient(90deg, #00BFA5, #00E676);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.wh-header .avatar {
  width:44px;
  height:44px;
  border-radius:10px;
  background: linear-gradient(145deg,#FFFFFF,#C8FCEA);
  color:#00BFA5;
  font-weight:700;
  font-size:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 3px 10px rgba(0, 180, 140, 0.2);
}
.wh-header .title {
  font-weight:600;
  color:#fff;
  font-size:15px;
}
.wh-header .sub {
  font-size:12px;
  color:#E6FFEF;
  margin-top:4px;
  opacity:0.95;
}

/* Messages area */
.wh-messages {
  padding:18px;
  overflow:auto;
  flex:1;
  background: linear-gradient(180deg,#F9FFFC,#FFFFFF);
}

/* individual messages */
.wh-message {
  max-width:82%;
  margin-bottom:12px;
  padding:10px 14px;
  border-radius:12px;
  line-height:1.35;
  font-size:14px;
  word-break:break-word;
}
.wh-message.in {
  background: linear-gradient(180deg,#ffffff,#EFFFF6);
  margin-right:auto;
  border-radius: 12px 12px 12px 6px;
  color:#044E3F;
  border: 1px solid rgba(8, 46, 40, 0.05);
}
.wh-message.out {
  background: linear-gradient(145deg,#00E676,#00BFA5,#00ACC1);
  color:#fff;
  margin-left:auto;
  border-radius: 12px 12px 6px 12px;
  box-shadow: 0 6px 18px rgba(0,180,140,0.25);
}

/* timestamps */
.wh-message small {
  display:block;
  margin-top:6px;
  font-size:11px;
  color:rgba(255,255,255,0.85);
}

/* typing dots */
.wh-typing .dot {
  width:8px;
  height:8px;
  border-radius:50%;
  background:rgba(0,190,140,0.4);
  animation:pulse 1s infinite ease-in-out;
}
@keyframes pulse {
  0%{opacity:.3; transform:translateY(0)}
  50%{opacity:1; transform:translateY(-4px)}
  100%{opacity:.3; transform:translateY(0)}
}

/* Quick replies */
.wh-quick button {
  background: linear-gradient(90deg, #E3FFF1, #EFFFF8);
  border: 1px solid rgba(10,120,80,0.08);
  padding:8px 12px;
  font-size:13px;
  border-radius:999px;
  color:#05664E;
  box-shadow: 0 2px 6px rgba(10, 50, 36, 0.05);
  transition: all .15s ease;
}
.wh-quick button:hover {
  background: linear-gradient(90deg, #C9FFE3, #D6FFF0);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(12,95,64,0.08);
}

/* Input area */
.wh-input {
  padding:12px;
  background:#fff;
  border-top:1px solid var(--border);
  display:flex;
  gap:8px;
  align-items:center;
}
.wh-input input[type="text"] {
  flex:1;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  outline:none;
  font-size:14px;
  background: linear-gradient(180deg, var(--input-bg), #fff);
  transition: all .12s ease;
}
.wh-input input[type="text"]:focus {
  border-color: rgba(0,180,120,0.4);
  box-shadow: 0 6px 18px rgba(0,180,120,0.12);
}

/* send button */
.wh-input button.send {
  min-width:44px;
  height:44px;
  border-radius:50%;
  border:none;
  background:linear-gradient(145deg,#00E676,#00C9A7,#00ACC1);
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 8px 22px rgba(0,180,120,0.22);
  transition: transform .12s ease;
}
.wh-input button.send:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,180,120,0.28);
}

/* footer area */
.wh-actions a {
  padding:8px 12px;
  font-size:13px;
  border-radius:10px;
  color:#00A37A;
  border:1px solid rgba(8,62,52,0.08);
  background: linear-gradient(180deg,#F3FFFA,#E9FFF3);
  transition: all .12s ease;
}
.wh-actions a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(8,62,52,0.06);
}

/* responsive */
@media (max-width:420px){
  .wh-widget-chat{ right:12px; left:12px; bottom:92px; width:auto; height:480px; border-radius:10px; }
  .wh-widget-fab{ right:12px; bottom:12px; width:58px; height:58px; border-radius:14px; }
}

/* Hindi bilingual */
.bilingual-hi {
  font-size:13px;
  color:#3a6656;
  margin-top:4px;
  opacity:0.98;
  font-weight:500;
}
.wh-quick button { white-space:normal; text-align:left; padding:8px 10px; max-width:100%; }
