/**
 * Community Manager — shared "user bar + edit profile" styles.
 *
 * Used by both [cm_user] (render_user) and [cm_portal] (render_portal) via
 * CM_Shortcodes::render_profile_bar() — previously each shortcode re-declared
 * this same ~70-line ruleset verbatim inline, per instance, with no dedup at
 * all (a page with 2 instances of the same shortcode shipped it twice; a
 * page with both shortcodes shipped it twice more). Enqueued once via
 * wp_enqueue_style() — WP's own handle-based dedup makes a second enqueue
 * from the other shortcode a no-op, no custom guard needed.
 *
 * Selectors are unprefixed (no per-instance #cm-user-xxxxxxxx scoping) since
 * these are already specific, purpose-built class names with no observed
 * collisions elsewhere in this plugin's CSS.
 *
 * [cm_portal]'s slightly different bar sizing (bigger avatar + shadow,
 * different panel margin direction, since the panel sits above its tab bar
 * rather than below a standalone bar) is layered on via the .cm-u-bar--portal
 * / .cm-u-panel--portal modifier classes below, not a second copy of the
 * base rules.
 */

.cm-u-bar{display:flex;align-items:center;gap:8px;background:var(--hov,#f8fafc);border:1px solid var(--bd,#e2e8f0);border-radius:10px;padding:8px 12px}
.cm-u-bar--portal{margin-bottom:16px}
.cm-u-av{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-weight:700;font-size:.82rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.cm-u-bar--portal .cm-u-av{width:34px;height:34px;font-size:.85rem;box-shadow:0 2px 6px rgba(99,102,241,.3)}
.cm-u-bar-info{flex:1;min-width:0}
.cm-u-name{font-weight:600;color:var(--tx,#1e293b);font-size:.88rem;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cm-u-tg-display{font-size:.7rem;color:var(--accent,#6366f1);display:block;margin-top:1px}
.cm-u-badges{display:flex;gap:3px;flex-shrink:0}
.cm-u-badge{font-size:.6rem;font-weight:700;padding:2px 6px;border-radius:99px;text-transform:uppercase;letter-spacing:.03em}
.cm-u-badge-wp{background:#e0e7ff;color:#4338ca}
.cm-u-badge-ms{background:#dbeafe;color:#1d4ed8}
.cm-u-badge-cm{background:#f0fdf4;color:#16a34a}
.cm-u-badge-tier{background:#eef2ff;color:#6366f1}
.cm-u-badge-status{background:#fef2f2;color:#b91c1c}
.cm-u-bar-acts{display:flex;gap:4px;flex-shrink:0}
.cm-u-act{background:none;border:none;font-size:.75rem;cursor:pointer;padding:4px 9px;border-radius:6px;white-space:nowrap;font-family:inherit;transition:background .15s,color .15s}
.cm-u-act-edit{color:var(--accent,#6366f1);border:1px solid #c7d2fe}
.cm-u-act-edit:hover{background:#eef2ff}
.cm-u-act-out{color:var(--mt,#94a3b8)}
.cm-u-act-out:hover{color:var(--tx2,#64748b);background:var(--hov,#f1f5f9)}
.cm-u-panel{margin-top:8px;background:var(--card,#fff);border:1px solid var(--bd,#e2e8f0);border-radius:10px;padding:16px 18px}
.cm-u-panel--portal{margin-top:0;margin-bottom:16px}
.cm-u-field{margin-bottom:12px}
.cm-u-field-row{display:flex;gap:10px}
.cm-u-field-row .cm-u-field{flex:1;margin-bottom:0}
@media (max-width:480px){
  .cm-u-field-row{flex-direction:column;gap:0}
  .cm-u-field-row .cm-u-field{margin-bottom:12px}
}
.cm-u-label{display:block;font-size:.75rem;font-weight:600;color:var(--tx2,#475569);margin-bottom:4px}
.cm-u-input{width:100%;padding:7px 10px;border:1px solid var(--bd,#cbd5e1);border-radius:6px;font-size:.85rem;color:var(--tx,#1e293b);outline:none;background:var(--card,#fff);font-family:inherit}
.cm-u-input:focus{border-color:var(--accent,#6366f1);box-shadow:0 0 0 2px rgba(99,102,241,.13)}
.cm-u-save-btn{margin-top:14px;padding:8px 18px;background:var(--accent,#6366f1);color:#fff;border:none;border-radius:7px;font-size:.85rem;font-weight:600;cursor:pointer;font-family:inherit}
.cm-u-save-btn:hover{background:#4f46e5}
.cm-u-save-btn:disabled{opacity:.6;cursor:not-allowed}
.cm-u-save-msg{display:inline-block;margin-left:10px;font-size:.8rem;padding:3px 9px;border-radius:5px}
.cm-u-save-msg.ok{background:#f0fdf4;color:#16a34a}
.cm-u-save-msg.err{background:#fef2f2;color:#b91c1c}
.cm-u-addr-link{display:inline-flex;align-items:center;gap:5px;margin-top:12px;font-size:.8rem;color:var(--accent,#6366f1);text-decoration:none;border:1px solid #c7d2fe;border-radius:6px;padding:6px 12px;background:#eef2ff}
.cm-u-addr-link:hover{background:#e0e7ff}
.cm-u-hint{font-size:.72rem;color:var(--mt,#94a3b8);margin-top:2px}
.cm-u-field-err{color:#dc2626;font-size:.73rem;margin-top:4px;display:none}
.cm-u-form-row{display:flex;gap:8px;align-items:center}
.cm-u-cont-btn{padding:7px 16px;background:var(--accent,#6366f1);color:#fff;border:none;border-radius:7px;font-size:.875rem;font-weight:600;cursor:pointer;white-space:nowrap;flex-shrink:0;font-family:inherit}
.cm-u-cont-btn:hover{background:#4f46e5}
