/* wearRTC — 门店对讲 panel (js/talk-panel.js). Uses the dashboard's theme variables from style.css. */

.talk-pill { position: relative; }
.talk-pill .talk-badge {
    position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px;
    text-align: center; font-weight: 700;
}

.talk-drawer {
    position: fixed; top: 56px; right: 12px; bottom: 12px; width: 420px; max-width: calc(100vw - 24px);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); display: flex; flex-direction: column; z-index: 900; overflow: hidden;
}
.talk-drawer.hidden { display: none; }
.talk-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.talk-head h3 { margin: 0; font-size: 15px; flex: 1; }
.talk-stores { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.talk-store {
    flex: none; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
    border-radius: 16px; padding: 4px 10px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.talk-store.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.talk-store .n { font-weight: 700; margin-left: 4px; color: var(--danger); }
.talk-store.active .n { color: #fff; }
.talk-online { padding: 6px 14px; font-size: 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.talk-list { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.talk-empty { color: var(--text-secondary); text-align: center; margin-top: 40px; font-size: 13px; }
.talk-msg {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid var(--border);
}
.talk-msg.unheard { border-color: var(--warning); background: #fffbeb; }
.talk-msg.mine { background: #ecfdf5; }
.talk-msg .who { font-weight: 600; font-size: 14px; }
.talk-msg .meta { font-size: 12px; color: var(--text-secondary); }
.talk-msg .body { flex: 1; min-width: 0; }
.talk-play {
    width: 34px; height: 34px; border-radius: 17px; border: none; background: var(--primary); color: #fff;
    cursor: pointer; font-size: 13px; flex: none;
}
.talk-play.playing { background: var(--success); }
.talk-foot { padding: 10px 12px; border-top: 1px solid var(--border); }
.talk-ptt {
    width: 100%; height: 52px; border: none; border-radius: var(--radius); background: var(--primary); color: #fff;
    font-size: 16px; font-weight: 700; cursor: pointer; user-select: none; -webkit-user-select: none;
}
.talk-ptt.recording { background: var(--danger); }
.talk-ptt:disabled { background: var(--offline); cursor: not-allowed; }
.talk-hint { font-size: 12px; color: var(--text-secondary); margin-top: 6px; text-align: center; }

/* Above the dashboard's shortcut bar; beside the drawer while it is open, never over its talk button. */
.talk-toasts { position: fixed; right: 16px; bottom: 48px; display: flex; flex-direction: column; gap: 8px; z-index: 950; }
.talk-toasts.beside-drawer { right: 444px; }
@media (max-width: 900px) { .talk-toasts.beside-drawer { right: 16px; bottom: auto; top: 64px; } }
.talk-toast {
    display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 360px; padding: 10px 12px;
    background: var(--bg-dark); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 13px;
}
.talk-toast .t { flex: 1; }
.talk-toast button { border: none; border-radius: var(--radius-sm); padding: 5px 10px; cursor: pointer; font-size: 12px; }
.talk-toast .go { background: var(--primary); color: #fff; }
.talk-toast .x { background: transparent; color: #cbd5e1; }
