/* Marian Eye Care - Floating Chatbot Widget */
:root{
  --mec-green:#509964;
  --mec-green-dark:#3f7a50;
  --mec-blue:#002F5F;
  --mec-blue-light:#0056b3;
}

#mec-chatbot-fab{
  position:fixed;
  bottom:24px;
  right:24px;
  width:62px;
  height:62px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--mec-green),var(--mec-green-dark));
  box-shadow:0 6px 20px rgba(0,0,0,0.25);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:99998;
  border:none;
  transition:transform .2s ease, box-shadow .2s ease;
  font-family:'Poppins', sans-serif;
}
#mec-chatbot-fab:hover{
  transform:translateY(-3px) scale(1.04);
  box-shadow:0 10px 26px rgba(0,0,0,0.32);
}
#mec-chatbot-fab i{
  color:#fff;
  font-size:26px;
}
#mec-chatbot-fab .mec-avatar-animated{
  width:44px;
  height:44px;
}
#mec-chatbot-fab .mec-bubble-badge{
  position:absolute;
  bottom:-2px;
  right:-2px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 1px 4px rgba(0,0,0,0.3);
}
#mec-chatbot-fab .mec-bubble-badge i{
  color:var(--mec-green);
  font-size:11px;
}
#mec-chatbot-fab .mec-fab-ring{
  position:absolute;
  width:62px;
  height:62px;
  border-radius:50%;
  border:2px solid var(--mec-green);
  animation:mec-pulse 2.2s ease-out infinite;
}
@keyframes mec-pulse{
  0%{transform:scale(1);opacity:.7;}
  100%{transform:scale(1.55);opacity:0;}
}
#mec-chatbot-fab .mec-fab-badge{
  position:absolute;
  top:-4px;
  right:-4px;
  background:#e74c3c;
  color:#fff;
  font-size:11px;
  font-weight:600;
  min-width:18px;
  height:18px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 4px;
  border:2px solid #fff;
}

#mec-chatbot-window{
  position:fixed;
  bottom:100px;
  right:24px;
  width:360px;
  max-width:92vw;
  height:540px;
  max-height:78vh;
  background:#fff;
  border-radius:18px;
  box-shadow:0 16px 48px rgba(0,0,0,0.28);
  display:none;
  flex-direction:column;
  overflow:hidden;
  z-index:99999;
  font-family:'Poppins', sans-serif;
  opacity:0;
  transform:translateY(16px) scale(.97);
  transition:opacity .22s ease, transform .22s ease;
}
#mec-chatbot-window.mec-open{
  display:flex;
  opacity:1;
  transform:translateY(0) scale(1);
}

.mec-header{
  background:linear-gradient(120deg,var(--mec-blue),var(--mec-blue-light));
  color:#fff;
  padding:14px 16px;
  display:flex;
  align-items:center;
  gap:10px;
}
.mec-header .mec-avatar{
  width:40px;
  height:40px;
  border-radius:50%;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  overflow:hidden;
}
.mec-header .mec-avatar i{
  color:var(--mec-blue);
  font-size:18px;
}
.mec-header .mec-avatar .mec-avatar-animated{
  width:40px;
  height:40px;
}

/* ---- Animated doctor avatar ---- */
.mec-avatar-animated{
  display:block;
  animation:mec-bob 3.2s ease-in-out infinite;
  transform-origin:center;
}
@keyframes mec-bob{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(-2px);}
}
.mec-eye-lid{
  transform-box:fill-box;
  transform-origin:center;
  animation:mec-eye-blink 4.5s ease-in-out infinite;
}
.mec-eye-lid.mec-eye-2{animation-delay:.05s;}
@keyframes mec-eye-blink{
  0%,90%,100%{transform:scaleY(1);}
  94%{transform:scaleY(0.12);}
}
.mec-header .mec-title{
  flex:1;
  line-height:1.25;
}
.mec-header .mec-title strong{
  display:block;
  font-size:14.5px;
  font-weight:600;
}
.mec-header .mec-title span{
  font-size:11.5px;
  opacity:.85;
  display:flex;
  align-items:center;
  gap:5px;
}
.mec-header .mec-title span::before{
  content:'';
  width:7px;
  height:7px;
  border-radius:50%;
  background:#3ddc84;
  display:inline-block;
}
.mec-header .mec-close{
  background:transparent;
  border:none;
  color:#fff;
  font-size:18px;
  cursor:pointer;
  opacity:.85;
  padding:4px;
}
.mec-header .mec-close:hover{opacity:1;}

.mec-callbar{
  display:flex;
  gap:8px;
  padding:10px 12px;
  background:#f1f7f3;
  border-bottom:1px solid #e3ede6;
}
.mec-callbar a{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  background:var(--mec-green);
  color:#fff !important;
  text-decoration:none;
  font-size:12px;
  font-weight:600;
  padding:8px 6px;
  border-radius:8px;
  transition:background .15s ease;
}
.mec-callbar a:hover{background:var(--mec-green-dark);}
.mec-callbar a i{font-size:13px;}

.mec-messages{
  flex:1;
  padding:14px;
  overflow-y:auto;
  background:#fafbfa;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.mec-messages::-webkit-scrollbar{width:6px;}
.mec-messages::-webkit-scrollbar-thumb{background:#d5ded8;border-radius:3px;}

.mec-msg{
  max-width:82%;
  padding:9px 13px;
  border-radius:14px;
  font-size:13.5px;
  line-height:1.45;
  animation:mec-fade-in .18s ease;
}
@keyframes mec-fade-in{
  from{opacity:0;transform:translateY(4px);}
  to{opacity:1;transform:translateY(0);}
}
.mec-msg.mec-bot{
  align-self:flex-start;
  background:#fff;
  border:1px solid #e7ede9;
  color:#2b2b2b;
  border-bottom-left-radius:4px;
}
.mec-msg.mec-user{
  align-self:flex-end;
  background:var(--mec-green);
  color:#fff;
  border-bottom-right-radius:4px;
}
.mec-msg a{color:var(--mec-blue-light);font-weight:600;}
.mec-msg.mec-user a{color:#fff;text-decoration:underline;}
.mec-msg.mec-wide{max-width:96%;}

.mec-doc-intro{margin:0 0 8px;}
.mec-doc-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.mec-doc-item{
  display:flex;
  align-items:center;
  gap:10px;
  background:#f6f9f7;
  border:1px solid #e7ede9;
  border-radius:10px;
  padding:6px 8px;
}
.mec-doc-item img{
  width:38px;
  height:38px;
  border-radius:50%;
  object-fit:cover;
  flex-shrink:0;
  border:2px solid #fff;
  box-shadow:0 0 0 1px var(--mec-green);
}
.mec-doc-info{line-height:1.3;}
.mec-doc-name{
  display:block;
  font-size:12.5px;
  font-weight:700;
  color:var(--mec-blue);
}
.mec-doc-role{
  display:block;
  font-size:11px;
  color:#666;
}
.mec-doc-link{
  display:inline-block;
  margin-top:8px;
  font-size:12.5px;
}

.mec-typing{
  align-self:flex-start;
  display:flex;
  gap:4px;
  padding:10px 13px;
  background:#fff;
  border:1px solid #e7ede9;
  border-radius:14px;
  border-bottom-left-radius:4px;
}
.mec-typing span{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#b7c3bb;
  animation:mec-blink 1.2s infinite;
}
.mec-typing span:nth-child(2){animation-delay:.2s;}
.mec-typing span:nth-child(3){animation-delay:.4s;}
@keyframes mec-blink{
  0%,80%,100%{opacity:.3;}
  40%{opacity:1;}
}

.mec-quick{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:0 14px 12px;
  background:#fafbfa;
}
.mec-quick button{
  background:#fff;
  border:1px solid var(--mec-green);
  color:var(--mec-green-dark);
  font-size:12px;
  font-weight:600;
  padding:6px 11px;
  border-radius:16px;
  cursor:pointer;
  transition:background .15s ease, color .15s ease;
  white-space:nowrap;
}
.mec-quick button:hover{
  background:var(--mec-green);
  color:#fff;
}

.mec-inputbar{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-top:1px solid #eceeec;
  background:#fff;
}
.mec-inputbar input{
  flex:1;
  border:1px solid #dfe4e1;
  border-radius:20px;
  padding:9px 14px;
  font-size:13px;
  outline:none;
  font-family:'Poppins', sans-serif;
}
.mec-inputbar input:focus{border-color:var(--mec-green);}
.mec-inputbar button{
  width:36px;
  height:36px;
  border-radius:50%;
  background:var(--mec-green);
  border:none;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex-shrink:0;
  transition:background .15s ease;
}
.mec-inputbar button:hover{background:var(--mec-green-dark);}

@media (max-width:480px){
  #mec-chatbot-window{
    right:12px;
    left:12px;
    width:auto;
    bottom:88px;
    height:72vh;
  }
  #mec-chatbot-fab{
    right:16px;
    bottom:16px;
  }
}
