:root{
  --mca-cream:#dedbd1;
  --mca-ivory:#fffaf3;
  --mca-olive:#899477;
  --mca-orange:#c8793b;
  --mca-orange-dark:#a85f29;
  --mca-black:#03070b;
  --mca-gold:#c6a85f;
  --mca-muted:#6f6b62;
  --mca-line:rgba(76,49,33,.14);
}

.mca-floating-toggle,
.mca-floating-toggle * ,
.morbane-care-assistant-app,
.morbane-care-assistant-app *{
  box-sizing:border-box;
}

.mca-floating-toggle{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:999999;
  min-width:118px;
  height:56px;
  padding:0 18px 0 9px;
  border-radius:999px;
  background:#03070b;
  color:#fff;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  box-shadow:0 18px 46px rgba(0,0,0,.28);
  border:1px solid rgba(198,168,95,.35);
  font-family:Arial,Helvetica,sans-serif;
  transition:all .25s ease;
}

.mca-floating-toggle:hover{
  transform:translateY(-2px);
  background:#11100e;
}

.mca-floating-toggle span{
  width:40px;
  height:40px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--mca-gold),var(--mca-orange));
  color:#111;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:Georgia,"Times New Roman",serif;
  font-weight:900;
  font-size:18px;
}

.mca-floating-toggle strong{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.morbane-care-assistant-app{
  position:fixed;
  right:24px;
  bottom:92px;
  z-index:999999;
  width:min(420px, calc(100vw - 28px));
  height:min(680px, calc(100vh - 120px));
  background:#f4f0e7;
  border:1px solid rgba(76,49,33,.16);
  box-shadow:0 28px 90px rgba(0,0,0,.30);
  display:none;
  flex-direction:column;
  overflow:hidden;
  font-family:Arial,Helvetica,sans-serif;
  color:#262626;
}

.morbane-care-assistant-app.open{
  display:flex;
}

.mca-app-header{
  background:#03070b;
  color:#fff;
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.mca-app-brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.mca-app-avatar{
  width:46px;
  height:46px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--mca-gold),var(--mca-orange));
  color:#111;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:Georgia,"Times New Roman",serif;
  font-weight:900;
  flex:0 0 auto;
}

.mca-app-brand h3{
  margin:0 0 2px;
  color:#fff;
  font-family:Georgia,"Times New Roman",serif;
  font-size:20px;
  font-weight:500;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.mca-app-brand p{
  margin:0;
  color:rgba(255,255,255,.66);
  font-size:12px;
}

.mca-close{
  border:0;
  width:34px;
  height:34px;
  border-radius:50%;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}

.mca-app-body{
  display:grid;
  grid-template-rows:1fr auto auto auto;
  min-height:0;
  flex:1;
}

.mca-message-list{
  padding:18px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:12px;
  background:
    radial-gradient(circle at 95% 10%, rgba(137,148,119,.18), transparent 32%),
    #f4f0e7;
}

.mca-msg{
  max-width:88%;
  padding:14px 15px;
  font-size:13px;
  line-height:1.58;
  border:1px solid rgba(76,49,33,.12);
  box-shadow:0 8px 20px rgba(3,7,11,.04);
}

.mca-msg.bot{
  align-self:flex-start;
  background:#fffaf3;
  color:#433c34;
  border-left:4px solid var(--mca-orange);
}

.mca-msg.user{
  align-self:flex-end;
  background:#03070b;
  color:#fff;
  border-color:rgba(3,7,11,.2);
}

.mca-answer-links{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:10px;
}

.mca-answer-links a{
  background:rgba(200,121,59,.13);
  color:var(--mca-orange-dark);
  padding:7px 10px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  text-decoration:none;
}

.mca-quick-actions{
  padding:14px 16px 4px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  background:#fffaf3;
  border-top:1px solid rgba(76,49,33,.12);
}

.mca-quick-actions button{
  border:1px solid rgba(76,49,33,.18);
  background:#fff;
  color:#03070b;
  min-height:34px;
  padding:0 11px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}

.mca-quick-actions button:hover{
  background:rgba(200,121,59,.13);
  border-color:rgba(200,121,59,.36);
  color:var(--mca-orange-dark);
}

.mca-input-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  padding:12px 16px;
  background:#fffaf3;
}

.mca-input-row input{
  min-height:42px;
  border:1px solid rgba(76,49,33,.2);
  background:#fff;
  padding:0 12px;
  font-size:13px;
  outline:none;
}

.mca-input-row input:focus{
  border-color:var(--mca-orange);
  box-shadow:0 0 0 3px rgba(200,121,59,.12);
}

.mca-input-row button{
  min-height:42px;
  border:0;
  background:var(--mca-orange);
  color:#fff;
  border-radius:999px;
  padding:0 16px;
  cursor:pointer;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}

.mca-small-note{
  padding:0 16px 14px;
  background:#fffaf3;
  color:var(--mca-muted);
  font-size:11px;
}

@media(max-width:640px){
  .mca-floating-toggle{
    right:16px;
    bottom:16px;
  }

  .morbane-care-assistant-app{
    right:14px;
    bottom:82px;
    width:calc(100vw - 28px);
    height:calc(100vh - 108px);
  }

  .mca-msg{
    max-width:100%;
  }

  .mca-app-brand h3{
    font-size:17px;
  }
}
