/* ==========================================================================
   css/plus_menu.css — "+" composer menu + shared add-on picker panel
   (js/plus_menu.js). Matches the emoticon button / #emoPanel look.
   ========================================================================== */
.chat-plus-btn {
    background: none;
    border: none;
    color: #a3a3a3;
    font-size: 17px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    height: 32px;
    width: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, color .15s ease, background .15s ease;
}
.chat-plus-btn:hover { color: #d4d4d4; background: rgba(255, 255, 255, 0.05); }
.chat-plus-btn.active { color: #fff; background: rgba(212, 178, 106, 0.18); transform: rotate(45deg); }
.chat-plus-btn.hidden { display: none; }

/* ── popover menu ─────────────────────────────────────── */
.plus-menu {
    position: absolute;
    left: 8px;
    bottom: 60px;
    min-width: 180px;
    background: rgba(16,16,16, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    padding: 6px;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: plusPop .14s ease-out;
}
.plus-menu.hidden { display: none; }
@keyframes plusPop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.plus-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    background: none;
    border: none;
    border-radius: 8px;
    color: #e5e5e5;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.plus-menu-item:hover, .plus-menu-item:focus-visible { background: rgba(255, 255, 255, 0.06); outline: none; }
.plus-menu-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* ── shared picker panel (same slot as .emo-panel) ────── */
.plus-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 55px;
    background: rgba(10,10,10, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    height: 340px;
    max-height: 340px;
    z-index: 1000;
}
.plus-panel.hidden { display: none; }

.plus-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.plus-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #e5e5e5;
    flex-shrink: 0;
}
.plus-panel-title i { font-size: 16px; }
.plus-panel-search {
    flex: 1;
    min-width: 0;
    position: relative;
}
.plus-panel-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #737373;
    font-size: 12px;
    pointer-events: none;
}
.plus-panel-search input {
    width: 100%;
    height: 32px;
    padding: 0 10px 0 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
    font: inherit;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}
.plus-panel-search input:focus { border-color: rgba(212, 178, 106, 0.55); }
.plus-panel-close {
    background: none;
    border: none;
    color: #a3a3a3;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}
.plus-panel-close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.plus-panel-tabs {
    display: flex;
    gap: 4px;
    padding: 6px 10px 0;
    flex-shrink: 0;
}
.plus-panel-tabs.hidden { display: none; }
.plus-panel-tab {
    background: none;
    border: none;
    color: #a3a3a3;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
}
.plus-panel-tab:hover { color: #e5e5e5; background: rgba(255, 255, 255, 0.05); }
.plus-panel-tab.active { color: #fff; background: rgba(212, 178, 106, 0.22); }

.plus-panel-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 10px;
    overscroll-behavior: contain;
}
.plus-panel-foot {
    flex-shrink: 0;
    padding: 5px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    color: #737373;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
.plus-panel-foot.hidden { display: none; }
.plus-panel-foot img { height: 14px; display: block; }

.plus-panel-msg {
    padding: 36px 12px;
    text-align: center;
    color: #737373;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.plus-panel-msg i { font-size: 20px; }
.plus-panel-msg a { color: #d4b26a; }
.plus-panel-more { grid-column: 1 / -1; text-align: center; color: #737373; font-size: 12px; padding: 10px 0; }

@media (max-width: 900px) {
    .plus-panel { height: min(55vh, 340px); max-height: min(55vh, 340px); }
    .plus-panel-title span { display: none; }       /* icon only — room for the search box */
    .chat-plus-btn { width: 34px; height: 38px; }
    .plus-menu { bottom: 62px; }
}

/* ── Private messages: 📎 + "+" in the PM composer (system/box/pms_box.php) ── */
.pm-tool-btn {
    width: 34px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 8px;
    color: #a3a3a3;
    font-size: 16px;
    cursor: pointer;
    transition: color .15s, background .15s, transform .15s;
}
.pm-tool-btn:hover { color: #e5e5e5; background: rgba(255,255,255,.06); }
.pm-tool-btn.busy { opacity: .7; cursor: progress; }
.pm-tool-btn.hidden { display: none; }
.pm-box-input { gap: 4px !important; }
.pm-box-input #pmInput { margin-left: 4px; }

/* The PM box is position:fixed, so these float inside it above its input row. */
.pm-plus-menu { left: 8px; bottom: 66px; z-index: 30; }
.pm-plus-panel {
    left: 0; right: 0; bottom: 60px;
    height: min(320px, calc(100% - 120px));
    max-height: min(320px, calc(100% - 120px));
    z-index: 25;
    border-radius: 12px 12px 0 0;
}
.pm-plus-panel .plus-panel-title span { display: none; }   /* narrow box: icon only */
.pm-plus-panel .gfp-grid { column-count: 2; }
.pm-plus-panel .ytp-thumb { width: 104px; }
.pm-plus-panel .ytp-send { display: none; }

/* Media inside PM bubbles (js/pms.js fmtBody) */
.pm-media { line-height: 0; }
.pm-embed-image {
    display: block;
    max-width: min(240px, 100%);
    max-height: 260px;
    width: auto;
    height: auto;
    border-radius: 10px;
    cursor: zoom-in;
    background: rgba(0,0,0,.2);
}
.pm-msg.pm-msg-media .pm-msg-text { padding: 4px !important; }
.pm-embed-yt { width: min(240px, 58vw); max-width: 100%; margin: 6px 0 2px; }
.pm-msg .pm-msg-text { min-width: 0; max-width: 100%; box-sizing: border-box; }
.pm-embed-image { max-width: min(240px, 58vw); }
.pm-msg.pm-msg-media .pm-embed-yt { margin: 0; }
