/* Nucleus: the editor's emoji picker, a message's attachments, the files to add — the same in Orion
   and Citadelle. Loaded by each app's base.html after its base.css. */

/* The emoji picker (components/emoji_picker.html): the editor's, a message's reactions'. */
.editor-emoji-menu {
    /* No wider than a phone's screen. */
    width: min(20rem, calc(100vw - 1rem));
}
.editor-emoji-search {
    margin: .5rem .5rem .25rem;
    width: calc(100% - 1rem);
}
.editor-emoji-tabs {
    display: flex;
    border-bottom: 1px solid var(--bs-border-color);
}
.editor-emoji-menu .editor-emoji-tab {
    flex: 1;
    border: none;
    border-radius: 0;
    font-size: 1.1rem;
    padding: .35rem 0;
    opacity: .55;
}
.editor-emoji-menu .editor-emoji-tab.active {
    opacity: 1;
    box-shadow: inset 0 -2px 0 var(--bs-primary);
}
.editor-emoji-category {
    font-size: .75rem;
    font-weight: 600;
    opacity: .7;
    padding: .35rem .5rem 0;
}
.editor-emoji-grid {
    display: flex;
    flex-wrap: wrap;
    max-height: 13rem;
    overflow-y: auto;
    padding: .25rem;
}
.editor-emoji-menu .editor-emoji {
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    padding: .3rem;
}

/* A message's attachments (components/message_documents.html): cards — an image's thumbnail, another
   document's icon —, their name and size under them. */
.message-documents { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.message-document { width: 150px; overflow: hidden; color: var(--bs-body-color); }
.message-document-preview { display: flex; align-items: center; justify-content: center; height: 100px;
                            background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); text-decoration: none; }
.message-document-preview img { width: 100%; height: 100%; object-fit: cover; }
.message-document-preview i { font-size: 2.6rem; }
.message-document-body { padding: 4px 8px 6px; font-size: .8rem; }
.message-document-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.message-document-meta { display: flex; justify-content: space-between; align-items: center; color: var(--bs-secondary-color); }
.message-document-meta a { color: inherit; }
@media (max-width: 575.98px) {
    .message-document { width: calc(50% - 4px); }
}

/* The Pièces jointes card (components/attachments_card.html): files dragged over it. */
.attachments-card.attachments-dragover { outline: 2px dashed #198754; outline-offset: 2px; }

/* A file to add (the conversation's field to write, the Pièces jointes card's window): its name, a cross. */
.chat-file { display: inline-flex; align-items: center; gap: 4px; max-width: 260px; font-size: .82rem;
             border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 1px 4px 1px 8px; }
.chat-file > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The Pièces jointes card's window: where to drop the files. */
.attachments-drop { border: 2px dashed var(--bs-border-color); }
.attachments-drop.attachments-dragover { border-color: #198754; background: rgba(25, 135, 84, .06); }
