/* ==========================
   Chat Modal / Input Styles
   ========================== */

/* Chat input */
.chat-input-editable {
    min-height: 36px;
    max-height: 120px;
    overflow-y: auto;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 6px;
    background: #222;
    color: #fff;
    outline: none;
    width: 100%;
    font-size: 1em;
    transition: border-color 0.2s;
}

.chat-input-editable:focus {
    border-color: #007bff;
    background: #1a1a1a;
}

.chat-input-editable:empty:before {
    content: attr(placeholder);
    color: #888;
    pointer-events: none;
    font-style: italic;
}

/* Pasted image preview */
#chatImagePreview {
    margin-top: 5px;
    display: none;
}

#chatImagePreview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 5px;
    border: 1px solid #444;
    box-shadow: 0 0 4px #111;
}

#removeImagePreview {
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    color: #fff;
    background: #d00;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 1.3em;
    line-height: 1;
    z-index: 2;
}

/* Chat message row */
.chat-message-row {
    margin: 10px 0;
}

/* Avatar */
.chat-avatar {
    margin-right: 10px;
}

.chat-bubble-stack{               /* <-- NEW class name */
    display:flex;                 /* Bootstrap flex-column */
    flex-direction:column;
    align-items:flex-start;
}

.avatar-img {
    font-size: 1.6em;
    background: #f5f5f5;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-meta{
    display:flex;
    align-items:center;      /* keeps text & clock baseline-aligned   */
    justify-content:space-between;
    gap:.25rem;              /* tiny breathing room                   */
    font-size:.8rem;
    margin-bottom:.25rem;    /* separates meta from first bubble      */
    min-width:140px;         /* prevents wrap when bubble is very narrow */
}
.chat-name {
    font-weight: 600;
    color: rgb(227, 228, 230);
}
.chat-time {
    font-size: 0.82em;
    color: #999;
}

.chat-bubble{
    /* force one per line inside .flex-column */
    display:inline-block;             /* ← key fix – no inline-block */
    background:#ffdddd;
    color:#222;
    border-radius:15px 15px 15px 5px;
    padding:.5rem 1rem;
    
    margin-bottom:.25rem;         /* gap between grouped msgs */
    word-break:break-word;
    width:fit-content;  
    max-width:calc(100%);
}


.chat-bubble.you-bubble{
    background:#b7e2ff;
}

.chat-bubble img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
}
.chat-bubble-stack .chat-bubble + .chat-bubble{
    border-top-left-radius:6px;
    
}


#chatTypingIndicator {

    font-size: 11px;
    position: absolute;
    right: 50px;
}
.orbbadge.has-unread::after {
    content: "";
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: #007bff;
    border-radius: 50%;
    border: 2px solid #fff;
  }
.chat-unread-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: #0d6efd;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 4px rgba(13,110,253,0.7);
  }

.picmo__popupContainer{
    z-index: 14000;
}
.picmo__picker {                      /* the popup box itself  */
    background-color: #202020 !important;   /* opaque */
    border: 1px solid #444 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.7) !important;
  }
  
  /* 2 – Shrink overall size */
  

 .picmo__emojiButton {
    font-size:1.3rem !important;
  }
  
#emojiToggleBtn{
    height:36px;
}