.mm-chat-widget{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1200;
  font-family:var(--mm-font, "Manrope", system-ui, sans-serif);
}

.mm-chat-widget *,
.mm-chat-widget *::before,
.mm-chat-widget *::after{
  box-sizing:border-box;
}

.mm-chat-launcher{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg, #0f6bdc, #1ea4ff);
  color:#fff;
  padding:13px 18px;
  font:inherit;
  font-size:13px;
  font-weight:800;
  box-shadow:0 18px 42px rgba(15, 107, 220, .28);
  cursor:pointer;
}

.mm-chat-launcher__dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#8fffbd;
  box-shadow:0 0 0 6px rgba(143, 255, 189, .16);
}

.mm-chat-panel{
  position:absolute;
  right:0;
  bottom:70px;
  width:min(340px, calc(100vw - 28px));
  max-height:min(560px, calc(100vh - 110px));
  background:#fff;
  border:1px solid rgba(15, 23, 42, .08);
  border-radius:20px;
  box-shadow:0 26px 60px rgba(15, 23, 42, .18);
  overflow:hidden;
  opacity:0;
  visibility:hidden;
  transform:translateY(10px);
  transition:opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.mm-chat-widget.is-open .mm-chat-panel{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

.mm-chat-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:14px 14px 12px;
  color:#fff;
  background:linear-gradient(135deg, #0b3f8d, #1171de);
}

.mm-chat-head__eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.92;
}

.mm-chat-head__eyebrow::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:#83ffad;
}

.mm-chat-head h3{
  margin:6px 0 4px;
  font-size:18px;
  line-height:1.2;
  font-weight:800;
}

.mm-chat-head p{
  margin:0;
  font-size:12px;
  line-height:1.5;
  color:rgba(255,255,255,.86);
}

.mm-chat-close{
  flex:0 0 auto;
  border:0;
  background:rgba(255,255,255,.12);
  color:#fff;
  width:30px;
  height:30px;
  border-radius:10px;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}

.mm-chat-body{
  padding:14px;
  background:#fff;
  display:flex;
  flex-direction:column;
}

.mm-chat-state{
  display:none;
}

.mm-chat-state.is-active{
  display:block;
}

.mm-chat-card{
  border:1px solid #e6edf8;
  border-radius:16px;
  background:#f8fbff;
  padding:12px;
}

.mm-chat-card h4{
  margin:0 0 6px;
  font-size:15px;
  font-weight:800;
  color:#10264d;
}

.mm-chat-card p{
  margin:0;
  font-size:12px;
  line-height:1.55;
  color:#5a6f93;
}

.mm-chat-fields{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.mm-chat-fields label{
  display:grid;
  gap:6px;
  font-size:12px;
  font-weight:800;
  color:#173562;
}

.mm-chat-fields input,
.mm-chat-compose textarea{
  width:100%;
  border:1px solid #dbe5f2;
  border-radius:12px;
  background:#fff;
  padding:11px 12px;
  font:inherit;
  font-size:13px;
  color:#10264d;
  outline:none;
}

.mm-chat-fields input:focus,
.mm-chat-compose textarea:focus{
  border-color:#2094ff;
  box-shadow:0 0 0 4px rgba(32, 148, 255, .12);
}

.mm-chat-submit,
.mm-chat-send{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:0;
  border-radius:12px;
  background:linear-gradient(135deg, #0f6bdc, #1ea4ff);
  color:#fff;
  padding:11px 16px;
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.mm-chat-submit{
  width:100%;
}

.mm-chat-send{
  min-width:96px;
}

.mm-chat-note{
  margin-top:10px;
  font-size:12px;
  line-height:1.5;
  color:#7084a4;
}

.mm-chat-transcript{
  height:220px;
  max-height:220px;
  overflow:auto;
  padding-right:2px;
  display:grid;
  gap:10px;
}

.mm-chat-bubble{
  max-width:86%;
  padding:10px 12px;
  border-radius:16px;
  font-size:13px;
  line-height:1.55;
  box-shadow:0 6px 16px rgba(15, 23, 42, .06);
}

.mm-chat-bubble small{
  display:block;
  margin-top:8px;
  font-size:11px;
  font-weight:700;
  color:inherit;
  opacity:.72;
}

.mm-chat-bubble--visitor{
  margin-left:auto;
  background:linear-gradient(135deg, #0f6bdc, #178ef4);
  color:#fff;
  border-bottom-right-radius:6px;
}

.mm-chat-bubble--agent,
.mm-chat-bubble--system{
  margin-right:auto;
  background:#f5f8fd;
  color:#173562;
  border:1px solid #e4ebf6;
  border-bottom-left-radius:6px;
}

.mm-chat-empty{
  padding:12px;
  border-radius:16px;
  background:#f8fbff;
  border:1px dashed #d7e4f4;
  font-size:12px;
  line-height:1.55;
  color:#5b6f90;
}

.mm-chat-compose{
  display:grid;
  gap:8px;
  padding-top:10px;
}

.mm-chat-compose textarea{
  min-height:74px;
  max-height:120px;
  resize:vertical;
}

.mm-chat-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.mm-chat-status{
  font-size:11px;
  font-weight:700;
  color:#6680a6;
}

.mm-chat-error{
  margin-top:10px;
  font-size:12px;
  line-height:1.5;
  color:#c53737;
}

@media (max-width: 767px){
  .mm-chat-widget{
    right:12px;
    bottom:12px;
  }

  .mm-chat-launcher{
    padding:12px 16px;
    font-size:13px;
  }

  .mm-chat-panel{
    right:0;
    left:auto;
    width:min(320px, calc(100vw - 20px));
    bottom:64px;
    max-height:min(78vh, 520px);
    border-radius:18px;
  }

  .mm-chat-head{
    padding:13px 13px 11px;
  }

  .mm-chat-head h3{
    font-size:17px;
  }

  .mm-chat-body{
    padding:12px;
  }

  .mm-chat-transcript{
    height:200px;
    max-height:200px;
  }

  .mm-chat-toolbar{
    align-items:flex-end;
  }
}
