/* ===========================
   ChatPrivate.css - Ajou
   Compatible ak nouvo ChatPrive.js
=========================== */

/* Fenèt chat prive */
.private-chat-window {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 360px;
  max-width: calc(100% - 40px);
  height: 480px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  font-family: Inter, "Segoe UI", Roboto, Arial;
  overflow: hidden;
  z-index: 9999;
}

/* Header chat */
.pc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: linear-gradient(90deg,#0052d4,#4364f7);
  color: white;
  font-weight: 600;
  cursor: move;
}

.pc-header .controls button {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  margin-left: 6px;
  font-size: 16px;
}

/* Kontenè mesaj */
.pc-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #f7f8fb;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Mesaj incoming/outgoing */
.msg {
  display: inline-block;
  max-width: 80%;
  padding: 8px 12px;
  margin: 8px 0;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.3;
  word-wrap: break-word;
}

.msg.incoming {
  background: #fff;
  color: #111827;
  border: 1px solid rgba(0,0,0,0.04);
  align-self: flex-start;
}

.msg.outgoing {
  background: linear-gradient(90deg,#4f46e5,#06b6d4);
  color: white;
  align-self: flex-end;
  position: relative;
}

/* Seen ✓✓ pou outgoing messages */
.msg.outgoing .seen {
  font-size: 12px;
  color: #22c55e;
  margin-left: 4px;
  vertical-align: middle;
}

/* Typing indicator */
.typing-indicator {
  font-size: 13px;
  color: #6b7280;
  padding: 6px 0;
}

/* Input pou chat */
.pc-input {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
  align-items: center;
}

.pc-input textarea {
  flex: 1;
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.08);
  resize: none;
  height: 40px;
  font-family: inherit;
  font-size: 14px;
}

/* Attachment preview */
.msg .attachment {
  display: block;
  margin-top: 4px;
  max-width: 80%;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Audio player */
.msg audio {
  width: 100%;
  margin-top: 4px;
  border-radius: 8px;
}

/* Buttons pou Voice / Video Call */
.call-button {
  background: #06b6d4;
  border: none;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

/* Badge nouvo mesaj sou lis itilizatè */
.user.has-new-message::after {
  content: '1';
  position: absolute;
  top: 6px;
  right: 6px;
  background: red;
  color: white;
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 6px;
}

/* Scrollbar customize (optional) */
.pc-messages::-webkit-scrollbar {
  width: 6px;
}

.pc-messages::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 3px;
}
