.behtaryar-shell{
  --bt-navy:#385385;
  --bt-teal:#5aa8a1;
  --bt-assistant:#f2f8f7;
  --bt-border:#dfe8e7;
  max-width:760px;
  border:1px solid var(--bt-border);
  border-radius:24px;
  background:#fff;
  box-shadow:0 12px 38px rgba(30,55,80,.08);
  overflow:hidden;
  font-family:inherit;
}
.behtaryar-head{display:flex;gap:12px;align-items:center;padding:18px 20px;border-bottom:1px solid #edf2f1}
.behtaryar-head strong{display:block;color:var(--bt-navy);font-size:18px}
.behtaryar-head small{color:#63707c}
.behtaryar-mark{width:38px;height:38px;border-radius:13px;background:#e9f7f5;color:var(--bt-teal);display:grid;place-items:center}
.behtaryar-messages{padding:22px 20px;min-height:220px;max-height:520px;overflow:auto;background:#fbfdfd;direction:rtl}
.behtaryar-message{
  width:fit-content;
  max-width:min(82%,620px);
  padding:11px 15px;
  margin-bottom:12px;
  border-radius:18px;
  line-height:1.9;
  text-align:right;
  direction:rtl;
  overflow-wrap:anywhere;
}
/* Behtaryar = physical LEFT side, while Persian text remains RTL. */
.behtaryar-message.is-assistant{
  margin-right:auto;
  margin-left:0;
  background:var(--bt-assistant);
  color:#263742;
  border:1px solid #e1ecea;
  border-bottom-left-radius:7px;
}
/* User = physical RIGHT side. */
.behtaryar-message.is-user{
  margin-left:auto;
  margin-right:0;
  background:var(--bt-navy);
  color:#fff;
  border:1px solid rgba(0,0,0,.03);
  border-bottom-right-radius:7px;
}
.behtaryar-message.is-pending{opacity:.62;font-size:13px}
.behtaryar-form{display:flex;gap:10px;padding:14px 16px;border-top:1px solid #edf2f1;background:#fff}
.behtaryar-form textarea{flex:1;resize:vertical;min-height:52px;border:1px solid #d8e1e0;border-radius:14px;padding:10px 12px;font:inherit;text-align:right;direction:rtl;background:#fff}
.behtaryar-form textarea:focus{outline:2px solid rgba(56,83,133,.14);border-color:var(--bt-navy)}
.behtaryar-form button{border:0;border-radius:14px;padding:0 20px;background:var(--bt-teal);color:#fff;font:inherit;font-weight:700;cursor:pointer}
.behtaryar-form button:disabled{opacity:.5}
.behtaryar-note,.behtaryar-status{padding:0 18px 14px;margin:0;color:#7a858f;font-size:12px}
.behtaryar-status{color:#51626d;text-align:right}
.behtaryar-product-link{color:var(--bt-navy);font-weight:700}
.behtaryar-recommendations{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-start;direction:rtl;margin:0 20px 14px}
.behtaryar-recommendations a,.behtaryar-end-cta a{display:inline-block;padding:8px 12px;border-radius:999px;background:#e9f7f5;color:#315b61;text-decoration:none;font-weight:700}
.behtaryar-end-cta{margin-top:12px}
.behtaryar-crisis-card{max-width:560px;text-align:right;direction:rtl}
.behtaryar-crisis-card p{margin:0 0 12px}
.behtaryar-crisis-link{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:12px;background:var(--bt-navy);color:#fff!important;text-decoration:none;font-weight:750}
.behtaryar-dashboard-block{display:grid;gap:16px}
.behtaryar-member-intro{padding:18px 20px;border-radius:20px;background:linear-gradient(135deg,#eef8f7,#f7f9fd);border:1px solid #dfeae8}
.behtaryar-member-intro span{color:#4c9992;font-size:12px;font-weight:700}
.behtaryar-member-intro h3{margin:5px 0;color:#385385}
.behtaryar-member-intro p{margin:0;color:#63707c}
@media(max-width:680px){
  .behtaryar-shell{border-radius:18px}
  .behtaryar-messages{padding:18px 14px}
  .behtaryar-message{max-width:88%}
  .behtaryar-form{align-items:flex-end}
  .behtaryar-form button{height:48px;padding:0 16px}
}
.behtaryar-welcome-main{display:block}
.behtaryar-welcome-limit{display:block;margin-top:5px;color:#8a969e;font-size:11px;font-weight:400;line-height:1.6}

/* -------------------------------------------------------------------------
 * Public floating launcher — v0.5.2
 * ---------------------------------------------------------------------- */
.behtaryar-launcher{
  position:fixed;
  right:24px!important;
  left:auto!important;
  bottom:24px!important;
  z-index:99980;
  font-family:inherit;
  opacity:1!important;
  transform:none!important;
  pointer-events:auto!important;
  transition:none;
}
.behtaryar-launcher.is-visible{opacity:1!important;transform:none!important;pointer-events:auto!important}
.behtaryar-launcher [hidden]{display:none!important}
.behtaryar-launcher-prompt{
  position:relative;
  display:flex;
  align-items:stretch;
  width:min(340px,calc(100vw - 32px));
  border:1px solid rgba(56,83,133,.14);
  border-radius:20px;
  background:rgba(255,255,255,.98);
  box-shadow:0 16px 42px rgba(31,49,70,.16);
  overflow:hidden;
  direction:rtl;
}
.behtaryar-launcher-question{
  appearance:none;
  flex:1;
  border:0;
  background:transparent;
  text-align:right;
  direction:rtl;
  padding:15px 17px 14px 42px;
  cursor:pointer;
  color:#263742;
  font:inherit;
}
.behtaryar-launcher-question span{display:block;font-size:15px;font-weight:750;line-height:1.8}
.behtaryar-launcher-question small{display:block;margin-top:2px;color:#579b95;font-size:11px;font-weight:700}
.behtaryar-launcher-question:hover{background:#fbfdfd}
.behtaryar-launcher-panel{
  position:relative;
  width:min(430px,calc(100vw - 32px));
  max-height:min(720px,calc(100vh - 48px));
  border-radius:22px;
  box-shadow:0 22px 64px rgba(25,42,61,.24);
}
.behtaryar-launcher-panel .behtaryar-shell{
  width:100%;
  max-width:none;
  max-height:min(720px,calc(100vh - 48px));
  border-radius:22px;
  box-shadow:none;
}
.behtaryar-launcher-panel .behtaryar-messages{
  min-height:260px;
  max-height:min(460px,calc(100vh - 280px));
}
.behtaryar-launcher-close{
  appearance:none;
  position:absolute;
  left:12px;
  top:12px;
  z-index:5;
  width:30px;
  height:30px;
  border:1px solid #e3e9e9;
  border-radius:999px;
  background:#fff;
  color:#65727c;
  font:21px/1 Arial,sans-serif;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(25,42,61,.06);
}
.behtaryar-launcher-close:hover{background:#f5f8f8;color:#263742}

@media(max-width:680px){
  .behtaryar-launcher{
    right:12px!important;
    left:auto!important;
    bottom:max(12px,env(safe-area-inset-bottom))!important;
  }
  .behtaryar-launcher-prompt{width:min(340px,calc(100vw - 24px))}
  .behtaryar-launcher-panel{
    width:min(430px,calc(100vw - 24px));
    max-height:calc(100vh - 24px - env(safe-area-inset-bottom));
  }
  .behtaryar-launcher-panel .behtaryar-shell{
    max-height:calc(100vh - 24px - env(safe-area-inset-bottom));
    border-radius:20px;
  }
  .behtaryar-launcher-panel .behtaryar-messages{max-height:calc(100vh - 280px)}
}
