:root{
  --wa-green:#075E54;
  --wa-green2:#128C7E;
  --wa-light:#DCF8C6;
  --wa-gray:#ECE5DD;
  --wa-text:#111B21;
}

.app-body{
  background: #f5f6f6;
  color: var(--wa-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.app-shell{
  min-height: 100vh;
}

.wa-topbar{
  background: var(--wa-green);
  color: #fff;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  gap:10px;
}

.wa-topbar-chat{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
}

.wa-back{
  color:#fff;
  text-decoration:none;
  font-size: 28px;
  line-height: 1;
  padding: 0 6px;
}

.wa-title{
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.wa-subtitle{
  font-size: 12px;
  opacity: .85;
}

.wa-title-wrap{
  display:flex;
  flex-direction:column;
  line-height:1.1;
  min-width: 0;
  flex: 1;
}

.wa-topbar-chat .wa-title{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-actions{
  margin-left:8px;
  flex-shrink: 0;
}

.wa-avatar{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  text-transform:uppercase;
}

.wa-chat{
  display:flex;
  flex-direction:column;
  position: fixed;
  inset: 0;
  height: var(--vvh, 100dvh);
  width: 100%;
  overflow: hidden;
}

.wa-chat-body{
  flex:1;
  padding: 72px 10px 86px;
  background: var(--wa-gray);
  background-image: radial-gradient(rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 18px 18px;
  overflow-y:auto;
  -webkit-overflow-scrolling: touch;
}

.wa-system{
  display:inline-block;
  background: rgba(255,255,255,.65);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 10px auto;
}

.wa-msg-row{
  display:flex;
  margin: 6px 0;
}
.wa-msg-row.me{ justify-content:flex-end; }
.wa-msg-row.them{ justify-content:flex-start; }

.wa-msg{
  max-width: 84%;
  border-radius: 10px;
  padding: 8px 10px 6px;
  box-shadow: 0 1px 1px rgba(0,0,0,.06);
}
.wa-msg-me{ background: var(--wa-light); border-top-right-radius: 4px; }
.wa-msg-them{ background: #fff; border-top-left-radius: 4px; }

.wa-msg-text{
  font-size: 15px;
  line-height: 1.35;
  word-wrap: break-word;
}
.wa-msg-meta{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top: 2px;
}
.wa-time{
  font-size: 11px;
  color: rgba(17,27,33,.6);
}

.wa-chat-input{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: #f0f2f5;
  padding: 10px;
  border-top: 1px solid rgba(0,0,0,.06);
  z-index: 6;
}

.wa-chat-input .form-control,
.wa-chat-input .btn{
  border-radius: 10px;
}

@supports (padding: max(0px)) {
  .wa-topbar-chat { padding-top: max(12px, env(safe-area-inset-top)); }
  .wa-chat-input { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

.btn-success{
  background: var(--wa-green2);
  border-color: var(--wa-green2);
}
.btn-outline-success{
  color: var(--wa-green2);
  border-color: var(--wa-green2);
}
.btn-outline-success:hover{
  background: var(--wa-green2);
  border-color: var(--wa-green2);
}
