/* =====================================================================
   Ask Miryalan Dynasty — lightweight, honest quick-help chat widget.
   No live AI backend: canned answers pulled from real site content,
   keyword-matched. Clearly labelled as a quick-help assistant.
   ===================================================================== */

.md-chat-launcher{
  position:fixed; right:24px; bottom:24px; z-index:400;
  width:58px; height:58px; border-radius:50%;
  background:linear-gradient(135deg,#e0b830,var(--gold));
  border:none; cursor:pointer; box-shadow:0 8px 24px rgba(0,0,0,.4);
  display:flex; align-items:center; justify-content:center;
  transition:transform .2s ease;
}
.md-chat-launcher:hover{transform:translateY(-2px) scale(1.04);}
.md-chat-launcher svg{width:26px; height:26px; color:#100c02;}
.md-chat-launcher .ping{
  position:absolute; top:-3px; right:-3px; width:13px; height:13px; border-radius:50%;
  background:#8b2f2f; border:2px solid var(--navy-deep);
}
.md-chat-launcher.open .ico-chat{display:none;}
.md-chat-launcher .ico-close{display:none;}
.md-chat-launcher.open .ico-close{display:block;}

.md-chat-panel{
  position:fixed; right:24px; bottom:94px; z-index:400; width:360px; max-width:calc(100vw - 32px);
  height:min(560px, calc(100vh - 140px));
  background:var(--panel); border:1px solid var(--line); border-radius:10px;
  box-shadow:0 20px 60px rgba(0,0,0,.55); display:flex; flex-direction:column; overflow:hidden;
  opacity:0; pointer-events:none; transform:translateY(14px) scale(.98); transition:all .25s ease;
}
.md-chat-panel.open{opacity:1; pointer-events:auto; transform:translateY(0) scale(1);}

.md-chat-head{
  padding:16px 18px; background:linear-gradient(135deg, var(--navy), var(--panel));
  border-bottom:1px solid var(--line); display:flex; align-items:center; gap:12px;
}
.md-chat-head .avatar{
  width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg,#e0b830,var(--gold));
  display:flex; align-items:center; justify-content:center; font-weight:700; color:#100c02; font-size:14px; flex-shrink:0;
  font-family:'Fraunces',serif;
}
.md-chat-head .t1{color:var(--white); font-size:14px; font-weight:700; font-family:'Fraunces',serif;}
.md-chat-head .t2{color:var(--gold); font-size:11px; display:flex; align-items:center; gap:5px;}
.md-chat-head .t2 .dot{width:6px; height:6px; border-radius:50%; background:#3fb673;}

.md-chat-body{flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:12px;}
.md-msg{max-width:86%; font-size:13.5px; line-height:1.55; padding:10px 13px; border-radius:10px;}
.md-msg.bot{align-self:flex-start; background:rgba(255,255,255,.05); color:var(--gray-light); border-bottom-left-radius:2px;}
.md-msg.user{align-self:flex-end; background:linear-gradient(135deg,#e0b830,var(--gold)); color:#100c02; font-weight:600; border-bottom-right-radius:2px;}
.md-msg a{color:var(--gold); text-decoration:underline;}
.md-msg.user a{color:#100c02; text-decoration:underline;}

.md-quick-replies{display:flex; flex-wrap:wrap; gap:8px; padding:0 16px 12px;}
.md-quick-replies button{
  background:rgba(255,255,255,.04); border:1px solid var(--line); color:var(--white);
  font-size:12px; padding:7px 12px; border-radius:20px; cursor:pointer; font-family:inherit; transition:all .15s ease;
}
.md-quick-replies button:hover{background:rgba(201,162,39,.14); border-color:var(--gold); color:var(--gold);}

.md-chat-input{display:flex; gap:8px; padding:12px 14px; border-top:1px solid var(--line); background:var(--navy);}
.md-chat-input input{
  flex:1; background:rgba(255,255,255,.05); border:1px solid var(--line); border-radius:20px;
  padding:9px 14px; color:var(--white); font-size:13px; font-family:inherit;
}
.md-chat-input input::placeholder{color:var(--gray);}
.md-chat-input button{
  width:36px; height:36px; border-radius:50%; border:none; cursor:pointer; flex-shrink:0;
  background:linear-gradient(135deg,#e0b830,var(--gold)); color:#100c02;
  display:flex; align-items:center; justify-content:center;
}

@media (max-width:480px){
  .md-chat-panel{right:16px; bottom:86px; width:calc(100vw - 32px);}
  .md-chat-launcher{right:16px; bottom:16px;}
}
