.wgcp-chat{
  max-width: 780px;
  margin: 12px auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 6px 26px rgba(0,0,0,.06);
  direction: rtl;
}

.wgcp-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}

.wgcp-title{
  font-weight: 700;
  font-size: 14px;
}

.wgcp-group-select{
  display:flex;
  align-items:center;
  gap:8px;
}

.wgcp-group-select select{
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background:#fff;
}

.wgcp-auth{
  padding: 16px 14px;
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
}

.wgcp-auth-card{
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 14px;
  background: #fcfcfd;
}

.wgcp-auth-title{
  font-weight: 800;
  margin-bottom: 6px;
}

.wgcp-auth-desc{
  margin: 0 0 10px;
  opacity: .8;
  font-size: 13px;
  line-height: 1.6;
}

.wgcp-auth-form{
  display:flex;
  gap:10px;
}

#wgcp-guest-username{
  flex:1;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-family: inherit;
}

.wgcp-auth-btn{
  padding: 0 14px;
  border: 1px solid #111827;
  background: #111827;
  color:#fff;
  border-radius: 12px;
  cursor: pointer;
  min-width: 110px;
}

.wgcp-auth-error{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
  font-size: 13px;
}

.wgcp-denied{
  padding: 14px;
}

.wgcp-denied-card{
  padding: 12px 14px;
  border:1px solid #fecaca;
  border-radius: 12px;
  background: #fff1f2;
  color:#991b1b;
}

.wgcp-messages{
  height: 420px;
  overflow-y: auto;
  padding: 12px 14px;
  background: #ffffff;
}

.wgcp-msg{
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fcfcfd;
}

.wgcp-msg.is-highlight{
  border-color:#94a3b8;
  box-shadow: 0 0 0 3px rgba(148,163,184,.25);
}

.wgcp-msg-header{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom: 6px;
}

.wgcp-user{
  font-weight: 600;
}

.wgcp-actions{
  margin-right:auto;
  display:flex;
  align-items:center;
  gap:6px;
}

.wgcp-btn{
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  opacity: .9;
}

.wgcp-btn:hover{
  border-color:#cbd5e1;
}

.wgcp-del{
  border-color: #fecaca;
}

.wgcp-msg-body{
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: normal;
}

.wgcp-msg-body.is-deleted{
  opacity: .7;
  font-style: italic;
}

.wgcp-msg-footer{
  margin-top: 6px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

.wgcp-time{
  font-size: 12px;
  opacity: .7;
}

.wgcp-reply-quote{
  border: 1px solid #e5e7eb;
  border-right: 4px solid #cbd5e1;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  margin: 6px 0 8px;
  cursor: pointer;
}

.wgcp-reply-quote:hover{
  border-color:#cbd5e1;
}

.wgcp-reply-quote .wgcp-reply-to{
  font-size: 12px;
  opacity: .85;
  margin-bottom: 4px;
}

.wgcp-reply-quote .wgcp-reply-snippet{
  font-size: 13px;
  opacity: .9;
  line-height: 1.5;
}

.wgcp-attach{
  margin: 8px 0 6px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.wgcp-attach-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  text-decoration:none;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
}

.wgcp-attach-link:hover{
  border-color:#cbd5e1;
}

.wgcp-attach-size{
  font-size: 12px;
  opacity: .7;
}

.wgcp-attach-img{
  max-width: 220px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.wgcp-compose{
  display:flex;
  gap:10px;
  padding: 12px 14px;
  border-top: 1px solid #eef2f7;
  background: #f8fafc;
  align-items: flex-start;
}

.wgcp-compose-left{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.wgcp-replybar{
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background:#fff;
  padding: 8px 10px;
  display:flex;
  align-items:center;
  gap:10px;
}

.wgcp-replybar .wgcp-replybar-label{
  font-size: 12px;
  opacity: .75;
}

.wgcp-replybar .wgcp-replybar-text{
  font-size: 12px;
  opacity: .9;
  flex:1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wgcp-replybar .wgcp-replybar-cancel{
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  opacity: .7;
}

.wgcp-replybar .wgcp-replybar-cancel:hover{ opacity: 1; }

#wgcp-text{
  width:100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  resize: vertical;
  min-height: 44px;
  font-family: inherit;
}

.wgcp-file{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  height: 44px;
}

.wgcp-file input{ display:none; }

.wgcp-file-btn{
  font-size: 13px;
  font-weight: 700;
}

.wgcp-file-name{
  max-width: 180px;
  font-size: 12px;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wgcp-send{
  padding: 0 16px;
  border: 1px solid #111827;
  background: #111827;
  color:#fff;
  border-radius: 12px;
  cursor: pointer;
  min-width: 88px;
  height: 44px;
}

.wgcp-send.is-loading{ opacity: .7; }
