/* SocialComposer — shared styles for the V2 Quill (bubble + quill-mention)
   timeline / comment composers (the comment box, Post and Challenge editors).
   Linked from V2 _Site.cshtml and _Popup.cshtml so editors render correctly in
   both full-page and popup-layout views (styles.css is NOT loaded under _Popup). */

/* ---------------------------------------------------------------------- */
/*  Base editor look                                                        */
/* ---------------------------------------------------------------------- */
.social-composer-editor .ql-container { font-size: inherit; border: none; }
.social-composer-editor .ql-editor { padding: 3px 10px; min-height: 26px; }
.social-composer-editor .ql-editor.ql-blank::before { font-style: normal; color: #999; left: 10px; right: 10px; }

/* ---------------------------------------------------------------------- */
/*  Comment box composer row                                                */
/*  Editor fills the available width; the action buttons sit on the right.  */
/*  (Replaces the old CKEditor inline-block + JS width-resize timer.)        */
/* ---------------------------------------------------------------------- */
.commentbox-composer {
    display: flex;
    align-items: flex-end;
    gap: 0.375rem;
}

.commentbox-composer .commentbox-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--input-border, rgba(0, 0, 0, 0.12));
    border-radius: 0.375rem;
    background: var(--custom-white, #fff);
}

.commentbox-composer .social-composer-editor { width: 100%; }
.commentbox-composer .social-composer-editor .ql-editor { max-height: 8rem; overflow-y: auto; }

.commentbox-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
}

/* ---------------------------------------------------------------------- */
/*  WhatsApp-style attach (+) popover (Photo / Document)                    */
/*  Mirrors the messaging composer's attach menu, scoped to the comment box.*/
/* ---------------------------------------------------------------------- */
.commentbox-attach-wrap {
    position: relative;
    display: inline-flex;
}

.commentbox-attach-menu {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    z-index: 1050;
    min-width: 11rem;
    padding: 0.375rem;
    background: var(--custom-white, #fff);
    border: 1px solid var(--default-border, rgba(0, 0, 0, 0.08));
    border-radius: 0.625rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.commentbox-attach-menu[hidden] { display: none; }

.commentbox-attach-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    background: transparent;
    border: 0;
    border-radius: 0.5rem;
    text-align: left;
    white-space: nowrap;
    font-size: 0.8125rem; /* match the comment input (.form-control) */
    color: inherit;
    cursor: pointer;
}

.commentbox-attach-item:hover,
.commentbox-attach-item:focus-visible {
    background: rgba(0, 0, 0, 0.04);
    outline: 0;
}

/* Colored circular icon badges (Photo = purple, Document = blue) — mirrors the
   messaging composer's attach menu (.composer-attach-icon). */
.commentbox-attach-icon {
    width: 1.75rem;   /* match .btn-icon.btn-sm (emoji / + / send) */
    height: 1.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem; /* match .btn-icon.btn-sm glyph */
    color: #fff;
    flex: 0 0 auto;
}

.commentbox-attach-icon.image    { background: #635bff; }
.commentbox-attach-icon.document { background: #0ea5e9; }
