/* Symbba Messenger v2 Dev Step 2 Documents */
.symbba-messenger{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#111827}
.sm-header{background:linear-gradient(135deg,#2457ff,#6ea8ff);color:#fff;border-radius:28px;padding:22px 18px;margin-bottom:14px;box-shadow:0 18px 45px rgba(25,41,89,.10);display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.sm-header span{font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:900;opacity:.9}
.sm-header h2{font-size:26px;margin:8px 0;color:#fff;line-height:1.08}
.sm-header p{margin:0;opacity:.92;line-height:1.5}
.sm-header-badge{background:#fff;color:#2457ff;border-radius:999px;min-width:32px;height:32px;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 25px rgba(0,0,0,.15)}
.sm-layout{display:grid;grid-template-columns:330px 1fr;gap:14px}
.sm-list,.sm-thread{background:#fff;border:1px solid rgba(17,24,39,.06);border-radius:24px;box-shadow:0 12px 32px rgba(25,41,89,.08);overflow:hidden}
.sm-list{padding:12px;min-height:420px}
.sm-search{display:flex;gap:10px;align-items:center;background:#f8fafc;border:1px solid #e5e7eb;border-radius:18px;padding:10px 12px;margin-bottom:10px}
.sm-search input{width:100%;border:0!important;outline:0!important;box-shadow:none!important;background:transparent;font-size:15px}
.sm-chat-card{width:100%;display:grid;grid-template-columns:48px 1fr auto;gap:10px;align-items:center;border:0;background:#fff;border-radius:18px;padding:10px;text-align:left;cursor:pointer;color:#111827}
.sm-chat-card:hover,.sm-chat-card.is-active{background:#eef4ff}
.sm-chat-card img{width:48px;height:48px;border-radius:16px;object-fit:cover}
.sm-chat-main strong{display:block;font-size:15px}
.sm-chat-main small{display:block;color:#667085;font-size:13px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.sm-unread{background:#2457ff;color:#fff;border-radius:999px;min-width:22px;height:22px;display:flex;align-items:center;justify-content:center;font-size:12px}
.sm-thread{min-height:420px;display:flex;flex-direction:column}
.sm-thread-empty{height:420px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#667085;text-align:center}
.sm-thread-empty div{font-size:44px;margin-bottom:8px}.sm-thread-empty strong{color:#111827;font-size:18px}
.sm-thread-inner{height:100%;min-height:420px;display:flex;flex-direction:column}
.sm-thread-top{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid #eef2f7}
.sm-thread-top img{width:44px;height:44px;border-radius:16px;object-fit:cover}.sm-thread-top strong{display:block}.sm-thread-top small{display:block;color:#667085}
.sm-messages{flex:1;padding:14px;overflow:auto;background:#f8fbff;max-height:470px}
.sm-start{text-align:center;color:#667085;background:#fff;border:1px dashed #cbd5e1;border-radius:18px;padding:18px;margin:40px auto;max-width:260px}
.sm-bubble-row{display:flex;margin:8px 0}.sm-bubble-row.is-own{justify-content:flex-end}.sm-bubble-row.is-friend{justify-content:flex-start}
.sm-bubble{max-width:78%;padding:10px 12px;border-radius:18px;background:#fff;box-shadow:0 8px 18px rgba(25,41,89,.06);line-height:1.4;word-break:break-word}
.sm-bubble-row.is-own .sm-bubble{background:#2457ff;color:#fff;border-bottom-right-radius:6px}.sm-bubble-row.is-friend .sm-bubble{border-bottom-left-radius:6px}
.sm-bubble small{display:block;font-size:10px;opacity:.72;margin-top:5px;text-align:right}
.sm-compose{display:flex;gap:8px;padding:12px;border-top:1px solid #eef2f7;background:#fff}
.sm-compose input{flex:1;border:1px solid #e5e7eb!important;border-radius:999px!important;min-height:44px!important;padding:0 14px!important;box-shadow:none!important}
.sm-compose button{border:0;border-radius:999px;background:#2457ff;color:#fff;font-weight:900;padding:0 16px}
.sm-empty{background:#fff;border:1px dashed #cbd5e1;border-radius:20px;padding:18px;text-align:center;color:#667085}.sm-empty strong{display:block;color:#111827}.sm-empty small{display:block;margin-top:5px}
.sm-loading{opacity:.6;pointer-events:none}
.sm-toast{position:fixed;left:50%;bottom:118px;transform:translateX(-50%);background:#111827;color:#fff;padding:12px 16px;border-radius:999px;box-shadow:0 18px 45px rgba(0,0,0,.22);z-index:999999;font-weight:900;font-size:14px}
.symbba-nav-btn[data-target="chat"]{position:relative}
.sm-bottom-badge{position:absolute;top:1px;right:14px;min-width:18px;height:18px;border-radius:999px;background:#ef4444;color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center;border:2px solid #fff}
@media(max-width:760px){.sm-layout{grid-template-columns:1fr}.sm-list{min-height:auto}.sm-thread{min-height:360px}.sm-thread-inner{min-height:360px}.sm-messages{max-height:380px}.sm-header h2{font-size:24px}.sm-chat-main small{max-width:210px}}

/* v2 dev step 1: image messages only */
.sm-image-picker{position:relative;width:44px;height:44px;min-width:44px;border-radius:999px;background:#f3f6fb;border:1px solid #e5e7eb;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:20px;line-height:1;user-select:none;overflow:hidden}
.sm-image-picker input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.sm-image-picker:hover{background:#eef4ff}
.sm-image-message{display:block;overflow:hidden;border-radius:14px;background:rgba(255,255,255,.12)}
.sm-image-message img{display:block;max-width:260px;max-height:320px;width:auto;height:auto;border-radius:14px;object-fit:cover}
.sm-media-name{display:block;font-size:11px;opacity:.82;margin-top:6px;max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:760px){.sm-image-picker{width:42px;height:42px;min-width:42px}.sm-compose{gap:6px}.sm-image-message img{max-width:220px;max-height:280px}}

/* v2 dev step 2: document messages */
.sm-file-message{display:flex;align-items:center;gap:10px;min-width:210px;max-width:280px;text-decoration:none!important;color:inherit!important;background:rgba(255,255,255,.16);border:1px solid rgba(148,163,184,.28);border-radius:14px;padding:10px}
.sm-file-icon{width:38px;height:38px;min-width:38px;border-radius:12px;background:rgba(255,255,255,.75);display:flex;align-items:center;justify-content:center;font-size:20px;color:#111827}
.sm-file-main{min-width:0;display:block}
.sm-file-main strong{display:block;font-size:13px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:205px}
.sm-file-main small{display:block!important;text-align:left!important;margin-top:3px!important;font-size:11px!important;opacity:.76!important}
.sm-bubble-row.is-friend .sm-file-message{background:#f8fafc}
@media(max-width:760px){.sm-file-message{max-width:230px;min-width:190px}.sm-file-main strong{max-width:160px}}


/* v2 dev step 3: video messages */
.sm-video-message{display:block;max-width:300px;border-radius:14px;overflow:hidden;background:rgba(255,255,255,.12);border:1px solid rgba(148,163,184,.22)}
.sm-video-message video{display:block;width:100%;max-height:340px;background:#000;border-radius:14px 14px 0 0}
.sm-video-download{display:block;padding:8px 10px;color:inherit!important;text-decoration:none!important;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:rgba(255,255,255,.08)}
.sm-bubble-row.is-friend .sm-video-message{background:#f8fafc}
@media(max-width:760px){.sm-video-message{max-width:240px}.sm-video-message video{max-height:300px}}


/* v2 dev step 4: audio file messages */
.sm-audio-message{display:block;min-width:230px;max-width:310px;border-radius:14px;background:rgba(255,255,255,.14);border:1px solid rgba(148,163,184,.24);padding:10px;overflow:hidden}
.sm-audio-title{display:flex;align-items:center;gap:8px;margin-bottom:8px;min-width:0}
.sm-audio-title span{width:30px;height:30px;min-width:30px;border-radius:10px;background:rgba(255,255,255,.75);display:flex;align-items:center;justify-content:center;color:#111827}
.sm-audio-title strong{display:block;font-size:13px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:235px}
.sm-audio-message audio{display:block;width:100%;height:38px}
.sm-audio-download{display:block;margin-top:7px;color:inherit!important;text-decoration:none!important;font-size:11px;opacity:.78;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sm-bubble-row.is-friend .sm-audio-message{background:#f8fafc}
@media(max-width:760px){.sm-audio-message{min-width:210px;max-width:245px}.sm-audio-title strong{max-width:170px}.sm-audio-message audio{height:36px}}


/* v2 dev step 5: voice notes */
.sm-voice-btn{width:44px;min-width:44px;height:44px;padding:0!important;display:flex;align-items:center;justify-content:center;font-size:18px;background:#f3f6fb!important;color:#111827!important;border:1px solid #e5e7eb!important;box-shadow:none!important}
.sm-voice-btn:hover{background:#eef4ff!important}
.sm-voice-btn.is-recording{width:auto;min-width:78px;background:#ef4444!important;color:#fff!important;border-color:#ef4444!important;font-weight:900;animation:smPulse 1.1s infinite}
.sm-compose.sm-recording input[name="message"]{background:#fff7f7!important;border-color:#fecaca!important;color:#991b1b!important}
.sm-compose.sm-recording input[name="message"]::placeholder{color:#b91c1c!important}
.sm-voice-message{border-color:rgba(239,68,68,.28)}
@keyframes smPulse{0%{box-shadow:0 0 0 0 rgba(239,68,68,.35)}70%{box-shadow:0 0 0 10px rgba(239,68,68,0)}100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}}
@media(max-width:760px){.sm-voice-btn{width:42px;min-width:42px;height:42px}.sm-voice-btn.is-recording{min-width:74px;font-size:14px}.sm-compose{align-items:center}}

/* v2 dev step 6.2: visible Delete icon with Delete for Me / Everyone */
.sm-bubble{position:relative}
.sm-delete-icon{position:absolute;top:-9px;right:-9px;width:26px;height:26px;border:1px solid rgba(148,163,184,.45)!important;border-radius:999px;background:#fff!important;color:#ef4444!important;box-shadow:0 8px 18px rgba(15,23,42,.16);display:flex;align-items:center;justify-content:center;font-size:13px;line-height:1;padding:0!important;cursor:pointer;z-index:20;opacity:.92}
.sm-delete-icon:hover{opacity:1;background:#fff5f5!important;color:#dc2626!important;transform:scale(1.04)}
.sm-bubble-row.is-own .sm-delete-icon{right:-9px;left:auto}
.sm-bubble-row.is-friend .sm-delete-icon{right:-9px;left:auto}
@media(max-width:760px){.sm-delete-icon{width:28px;height:28px;top:-10px;right:-10px;font-size:14px}}

.sm-bubble-row.is-deleted .sm-bubble{background:#f8fafc!important;color:#64748b!important;border:1px dashed #cbd5e1!important}
.sm-deleted-text{font-style:italic;color:#64748b;font-size:14px}
.sm-delete-choice{position:fixed;inset:0;background:rgba(15,23,42,.28);z-index:99999;display:flex;align-items:center;justify-content:center;padding:18px}
.sm-delete-choice-card{width:min(360px,94vw);background:#fff;border-radius:18px;box-shadow:0 18px 50px rgba(15,23,42,.22);padding:18px}
.sm-delete-choice-card h3{margin:0 0 8px!important;font-size:18px!important;color:#111827!important}
.sm-delete-choice-card p{margin:0 0 14px!important;color:#64748b!important;font-size:14px!important}
.sm-delete-choice-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.sm-delete-choice-actions button{border:0;border-radius:999px;padding:9px 13px;cursor:pointer;font-weight:800}
.sm-del-cancel{background:#f1f5f9;color:#334155}
.sm-del-me{background:#fee2e2;color:#991b1b}
.sm-del-everyone{background:#ef4444;color:#fff}

/* v2 dev step 7.1: forward one message to one friend */
.sm-forward-icon{position:absolute;top:-9px;right:22px;width:26px;height:26px;border:1px solid rgba(148,163,184,.45)!important;border-radius:999px;background:#fff!important;color:#2457ff!important;box-shadow:0 8px 18px rgba(15,23,42,.16);display:flex;align-items:center;justify-content:center;font-size:13px;line-height:1;padding:0!important;cursor:pointer;z-index:20;opacity:.92}
.sm-forward-icon:hover{opacity:1;background:#eef4ff!important;color:#1d4ed8!important;transform:scale(1.04)}
.sm-forwarded-label{display:block;font-size:11px;font-weight:800;opacity:.72;margin-bottom:5px}
.sm-forward-choice{position:fixed;inset:0;background:rgba(15,23,42,.28);z-index:99999;display:flex;align-items:center;justify-content:center;padding:18px}
.sm-forward-choice-card{width:min(380px,94vw);background:#fff;border-radius:18px;box-shadow:0 18px 50px rgba(15,23,42,.22);padding:18px;color:#111827}
.sm-forward-choice-card h3{margin:0 0 8px!important;font-size:18px!important;color:#111827!important}
.sm-forward-choice-card p{margin:0 0 12px!important;color:#64748b!important;font-size:14px!important}
.sm-forward-friends{display:flex;flex-direction:column;gap:8px;max-height:50vh;overflow:auto;margin-bottom:14px}
.sm-forward-friend{width:100%;border:1px solid #e5e7eb!important;border-radius:14px;background:#f8fafc!important;color:#111827!important;padding:10px 12px!important;text-align:left!important;font-weight:800!important;cursor:pointer}
.sm-forward-friend:hover{background:#eef4ff!important;border-color:#bfdbfe!important}
.sm-forward-choice-actions{display:flex;justify-content:flex-end}.sm-forward-cancel{border:0;border-radius:999px;padding:9px 13px;cursor:pointer;font-weight:800;background:#f1f5f9;color:#334155}
@media(max-width:760px){.sm-forward-icon{width:28px;height:28px;top:-10px;right:24px;font-size:14px}.sm-forward-choice-card{border-radius:20px}.sm-forward-friends{max-height:55vh}}


/* v2 dev step 8.1e: stable overlay typing indicator. It never reserves layout space. */
.sm-thread-inner{position:relative}
.sm-typing-indicator{display:none!important;position:absolute;left:14px;right:14px;bottom:72px;z-index:30;pointer-events:none;width:auto;min-height:0;margin:0;padding:7px 11px;font-size:12px;font-weight:900;color:#334155;line-height:1.2;background:rgba(255,255,255,.96);border:1px solid rgba(148,163,184,.25);border-radius:999px;box-shadow:0 10px 24px rgba(15,23,42,.10)}
.sm-typing-indicator.is-visible{display:inline-flex!important;align-items:center;max-width:max-content}
.sm-typing-indicator.is-visible:before{content:'• • •';display:inline-block;margin-right:7px;letter-spacing:1px;color:#2457ff;animation:smTypingDots 1.1s infinite}
@keyframes smTypingDots{0%{opacity:.35}50%{opacity:1}100%{opacity:.35}}
@media(max-width:760px){.sm-typing-indicator{left:10px;right:10px;bottom:68px;font-size:12px}}


/* v2 dev step 8.2: emoji reactions. One reaction per user per message. */
.sm-react-icon{position:absolute;top:-9px;right:53px;width:26px;height:26px;border:1px solid rgba(148,163,184,.45)!important;border-radius:999px;background:#fff!important;color:#111827!important;box-shadow:0 8px 18px rgba(15,23,42,.16);display:flex;align-items:center;justify-content:center;font-size:13px;line-height:1;padding:0!important;cursor:pointer;z-index:20;opacity:.92}
.sm-react-icon:hover{opacity:1;background:#fff7ed!important;transform:scale(1.04)}
.sm-reaction-summary{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-top:6px;line-height:1}
.sm-reaction-badge{display:inline-flex;align-items:center;justify-content:center;min-height:22px;padding:3px 7px;border-radius:999px;background:rgba(255,255,255,.82);border:1px solid rgba(148,163,184,.24);box-shadow:0 4px 12px rgba(15,23,42,.08);font-size:13px;color:#111827}
.sm-bubble-row.is-friend .sm-reaction-badge{background:#fff}
.sm-reaction-choice{position:fixed;inset:0;background:rgba(15,23,42,.18);z-index:99999;display:flex;align-items:center;justify-content:center;padding:18px}
.sm-reaction-choice-card{background:#fff;border-radius:999px;box-shadow:0 18px 50px rgba(15,23,42,.22);padding:8px;display:flex;gap:6px;align-items:center;color:#111827}
.sm-reaction-option{width:42px;height:42px;border:0!important;border-radius:999px;background:#f8fafc!important;font-size:22px;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0!important}
.sm-reaction-option:hover{background:#eef4ff!important;transform:scale(1.08)}
@media(max-width:760px){.sm-react-icon{width:28px;height:28px;top:-10px;right:57px;font-size:14px}.sm-reaction-choice-card{padding:7px;gap:4px}.sm-reaction-option{width:40px;height:40px;font-size:21px}.sm-reaction-badge{font-size:13px;min-height:21px;padding:3px 7px}}

/* v2 dev step 8.4: Reply to Message */
.sm-reply-icon{position:absolute;top:-9px;right:84px;width:26px;height:26px;border:1px solid rgba(148,163,184,.45)!important;border-radius:999px;background:#fff!important;color:#2457ff!important;box-shadow:0 8px 18px rgba(15,23,42,.16);display:flex;align-items:center;justify-content:center;font-size:14px;line-height:1;padding:0!important;cursor:pointer;z-index:20;opacity:.92}
.sm-reply-icon:hover{opacity:1;background:#eef4ff!important;color:#1d4ed8!important;transform:scale(1.04)}
.sm-reply-compose{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 12px 0 12px;padding:10px 11px;background:#f8fafc;border:1px solid #e5e7eb;border-left:4px solid #2457ff;border-radius:14px 14px 0 0;color:#111827;box-shadow:0 -3px 12px rgba(15,23,42,.06)}
.sm-reply-compose-body{min-width:0;flex:1}.sm-reply-compose strong{display:block;font-size:12px;line-height:1.2;color:#2457ff;margin-bottom:4px}.sm-reply-compose-message{font-size:13px;color:#334155;max-width:560px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sm-reply-mini-text{display:block;overflow:hidden;text-overflow:ellipsis}.sm-reply-mini-media{display:flex;align-items:center;gap:7px;min-width:0}.sm-reply-mini-media img{width:34px;height:34px;object-fit:cover;border-radius:8px;flex:0 0 auto}.sm-reply-mini-media span:last-child{overflow:hidden;text-overflow:ellipsis}.sm-reply-mini-icon{font-size:20px;line-height:1}
.sm-reply-cancel{width:28px;height:28px;min-width:28px;border:0!important;border-radius:999px;background:#e5e7eb!important;color:#111827!important;font-size:18px!important;line-height:1!important;padding:0!important;display:flex;align-items:center;justify-content:center;cursor:pointer}
.sm-reply-quote{display:block;width:100%;text-align:left;border:0!important;border-left:3px solid rgba(36,87,255,.85)!important;border-radius:10px;background:rgba(255,255,255,.18)!important;color:inherit!important;padding:7px 9px!important;margin:0 0 7px!important;cursor:pointer;box-shadow:none!important}
.sm-bubble-row.is-friend .sm-reply-quote{background:#f1f5f9!important;color:#111827!important}
.sm-reply-quote span{display:block;font-size:12px;font-weight:900;line-height:1.2;color:inherit}
.sm-reply-quote small{display:block!important;text-align:left!important;font-size:12px!important;opacity:.78!important;margin-top:3px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px}
.sm-reply-highlight .sm-bubble{animation:smReplyHighlight 1.4s ease;border-color:#f59e0b!important;box-shadow:0 0 0 3px rgba(245,158,11,.22),0 8px 18px rgba(25,41,89,.08)!important}
@keyframes smReplyHighlight{0%{transform:scale(1.01)}45%{transform:scale(1.02)}100%{transform:scale(1)}}
@media(max-width:760px){.sm-reply-icon{width:28px;height:28px;top:-10px;right:90px;font-size:15px}.sm-reply-compose{margin:0 10px;padding:8px 10px}.sm-reply-compose-message{max-width:240px}.sm-reply-mini-media img{width:30px;height:30px}.sm-reply-quote small{max-width:190px}}

/* v2 dev step 8.4c: richer reply previews for media */
.sm-reply-mini-media.sm-reply-mini-image img{width:46px!important;height:46px!important;border-radius:10px!important;object-fit:cover!important}
.sm-reply-quote-media{display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important;margin-top:4px!important}
.sm-reply-quote-media img{width:42px!important;height:42px!important;border-radius:9px!important;object-fit:cover!important;flex:0 0 auto!important}
.sm-reply-quote-media b{font-size:22px;line-height:1;flex:0 0 auto}
.sm-reply-quote-media small{margin-top:0!important;max-width:190px!important}
@media(max-width:760px){.sm-reply-mini-media.sm-reply-mini-image img{width:42px!important;height:42px!important}.sm-reply-quote-media img{width:38px!important;height:38px!important}}


/* v2 dev step 9.1: Online / Last Seen status under chat header name */
.sm-thread-top small[data-sm-presence-status]{font-weight:800;color:#64748b;letter-spacing:.01em}
.sm-thread-top small[data-sm-presence-status].is-online{color:#16a34a}


/* v2 dev step 9.2: Read Receipts */
.sm-message-meta{display:flex!important;align-items:center;justify-content:flex-end;gap:5px;font-size:10px;opacity:.78;margin-top:5px;text-align:right}
.sm-read-receipt{display:inline-flex;align-items:center;justify-content:center;min-width:16px;font-size:12px;font-weight:900;line-height:1;color:rgba(255,255,255,.72);letter-spacing:-2px}
.sm-bubble-row.is-friend .sm-read-receipt{display:none}
.sm-bubble-row.is-own .sm-read-receipt-sent,.sm-bubble-row.is-own .sm-read-receipt-delivered{color:rgba(255,255,255,.76)}
.sm-bubble-row.is-own .sm-read-receipt-read{color:#7dd3fc;text-shadow:0 0 0 rgba(0,0,0,0)}
@media(max-width:760px){.sm-message-meta{gap:5px}.sm-read-receipt{font-size:12px}}

/* v2 dev step 9.3: Shared Media read-only browser */
.sm-thread-title{min-width:0;display:flex;flex-direction:column;gap:3px}
.sm-thread-subline{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0}
.sm-media-link{border:0!important;background:transparent!important;color:#2457ff!important;font-size:12px!important;font-weight:900!important;line-height:1!important;padding:0!important;cursor:pointer;white-space:nowrap}
.sm-media-link:hover{text-decoration:underline}
.sm-media-modal{position:fixed;inset:0;z-index:99999;background:rgba(15,23,42,.34);display:flex;align-items:center;justify-content:center;padding:16px}
.sm-media-panel{width:min(760px,96vw);max-height:88vh;background:#fff;border-radius:22px;box-shadow:0 20px 60px rgba(15,23,42,.28);display:flex;flex-direction:column;overflow:hidden;color:#111827}
.sm-media-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 12px;border-bottom:1px solid #e5e7eb;background:#f8fafc}
.sm-media-head strong{display:block;font-size:18px;color:#111827}.sm-media-head small{display:block;margin-top:3px;color:#64748b;font-weight:700}
.sm-media-close{width:34px;height:34px;border:0!important;border-radius:999px;background:#e5e7eb!important;color:#111827!important;font-size:22px!important;line-height:1!important;padding:0!important;display:flex;align-items:center;justify-content:center;cursor:pointer}
.sm-media-cats{display:flex;gap:8px;overflow:auto;padding:12px 14px;border-bottom:1px solid #eef2f7;background:#fff}
.sm-media-cat{flex:0 0 auto;border:1px solid #e5e7eb!important;border-radius:999px;background:#f8fafc!important;color:#334155!important;font-weight:900!important;padding:8px 11px!important;cursor:pointer;font-size:13px!important;white-space:nowrap}
.sm-media-cat b{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;margin-left:4px;border-radius:999px;background:#e5e7eb;color:#111827;font-size:11px}
.sm-media-cat.is-active{background:#eef4ff!important;border-color:#bfdbfe!important;color:#2457ff!important}
.sm-media-sections{overflow:auto;padding:14px;min-height:240px}.sm-media-section{display:none}.sm-media-section.is-active{display:block}.sm-media-section h3{margin:0 0 12px!important;font-size:16px!important;color:#111827!important}
.sm-media-empty{padding:28px;border:1px dashed #cbd5e1;border-radius:16px;text-align:center;color:#64748b;font-weight:800;background:#f8fafc}
.sm-media-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.sm-media-photo{display:block;position:relative;border-radius:14px;overflow:hidden;background:#e5e7eb;aspect-ratio:1/1}.sm-media-photo img{width:100%;height:100%;object-fit:cover;display:block}.sm-media-photo span{position:absolute;left:6px;right:6px;bottom:6px;background:rgba(15,23,42,.66);color:#fff;border-radius:999px;padding:3px 6px;font-size:10px;font-weight:800;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sm-media-list{display:flex;flex-direction:column;gap:8px}.sm-media-item{border:1px solid #e5e7eb;border-radius:16px;background:#f8fafc;color:#111827;text-decoration:none!important}.sm-media-file{display:flex;align-items:center;gap:12px;padding:11px}.sm-media-file b{font-size:24px}.sm-media-file span{min-width:0}.sm-media-file strong{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:560px}.sm-media-file small{display:block;margin-top:3px;color:#64748b;font-weight:700}.sm-media-audio{padding:11px}.sm-media-audio>div{display:flex;align-items:center;gap:10px;margin-bottom:8px}.sm-media-audio b{font-size:24px}.sm-media-audio strong{display:block}.sm-media-audio small{display:block;color:#64748b;font-weight:700}.sm-media-audio audio{width:100%;height:36px}
@media(max-width:760px){.sm-media-modal{align-items:flex-end;padding:0}.sm-media-panel{width:100vw;max-height:88vh;border-radius:22px 22px 0 0}.sm-media-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.sm-media-sections{padding:12px}.sm-media-file strong{max-width:250px}.sm-thread-subline{gap:10px}.sm-media-link{font-size:12px!important}}

/* v2 dev step 11: Voice Calling */
.sm-thread-top{gap:10px}.sm-call-start{margin-left:auto;flex:0 0 auto;width:42px;height:42px;border:0!important;border-radius:999px;background:#eaf1ff!important;color:#2457ff!important;font-size:20px!important;line-height:1!important;padding:0!important;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 7px 18px rgba(36,87,255,.14)}
.sm-call-start:hover{background:#dbe8ff!important;transform:scale(1.03)}
.sm-call-overlay{display:none;position:fixed;inset:0;z-index:100000;background:linear-gradient(160deg,#14233f 0%,#07111f 100%);align-items:center;justify-content:center;padding:18px;color:#fff}
.sm-call-overlay.is-visible{display:flex}.sm-call-card{width:min(420px,100%);min-height:520px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:34px 22px;border-radius:30px;background:rgba(255,255,255,.075);border:1px solid rgba(255,255,255,.12);box-shadow:0 24px 70px rgba(0,0,0,.34);backdrop-filter:blur(18px)}
.sm-call-avatar{width:116px;height:116px;border-radius:999px;display:flex;align-items:center;justify-content:center;font-size:50px;background:rgba(255,255,255,.12);border:2px solid rgba(255,255,255,.18);box-shadow:0 0 0 12px rgba(255,255,255,.035);margin-bottom:28px;animation:smCallPulse 1.8s ease-in-out infinite;overflow:hidden}.sm-call-avatar img{width:100%;height:100%;object-fit:cover;display:none}.sm-call-avatar.has-image img{display:block}.sm-call-avatar.has-image [data-sm-call-avatar-fallback]{display:none}
@keyframes smCallPulse{0%,100%{transform:scale(1);box-shadow:0 0 0 10px rgba(255,255,255,.03)}50%{transform:scale(1.025);box-shadow:0 0 0 18px rgba(255,255,255,.015)}}
.sm-call-card>strong{font-size:27px;line-height:1.2;color:#fff}.sm-call-card>span{margin-top:10px;color:#d7e2f2;font-size:15px;font-weight:800}.sm-call-timer{height:24px;margin-top:8px;color:#9fb6d3;font-size:14px;font-weight:900;letter-spacing:.08em}
.sm-call-actions{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;margin-top:44px}.sm-call-action{width:70px;height:70px;border:0!important;border-radius:999px;padding:0!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:23px!important;line-height:1!important;cursor:pointer;background:rgba(255,255,255,.14)!important;color:#fff!important;box-shadow:0 10px 25px rgba(0,0,0,.18)}
.sm-call-action small{display:block!important;font-size:10px!important;line-height:1!important;color:inherit!important;font-weight:900!important}.sm-call-action.is-off{background:#fff!important;color:#17233a!important}.sm-call-accept{background:#22c55e!important}.sm-call-end{background:#ef4444!important}.sm-call-overlay[data-call-mode="incoming"] .sm-call-end{background:#ef4444!important}.sm-call-overlay audio{display:none}.sm-call-open{overflow:hidden!important}
@media(max-width:760px){.sm-call-start{width:40px;height:40px;font-size:19px!important}.sm-call-overlay{padding:0}.sm-call-card{width:100%;height:100%;min-height:100dvh;border-radius:0;border:0;background:transparent;box-shadow:none}.sm-call-avatar{width:108px;height:108px;font-size:46px}.sm-call-actions{gap:13px;margin-top:42px}.sm-call-action{width:66px;height:66px}.sm-call-card>strong{font-size:25px}}

/* Step 12: video calling and Jitsi group meetings */
.sm-thread-call-buttons{display:flex;gap:8px;margin-left:auto}.sm-video-call-start{background:#e8f0ff!important}.sm-jitsi-start{border:0;border-radius:999px;padding:10px 14px;font-weight:700;cursor:pointer;background:#fff;box-shadow:0 4px 16px rgba(0,0,0,.08)}
.sm-video-stage{display:none;position:absolute;inset:0;background:#101216;overflow:hidden}.sm-call-overlay.is-video .sm-call-card{width:min(920px,100vw);height:min(760px,100vh);max-width:none;position:relative;overflow:hidden;background:#101216;color:#fff}.sm-call-overlay.is-video .sm-video-stage{display:block}.sm-call-overlay.is-video [data-sm-call-remote-video]{width:100%;height:100%;object-fit:cover}.sm-call-overlay.is-video [data-sm-call-local-video]{position:absolute;right:18px;top:18px;width:min(28vw,190px);aspect-ratio:3/4;object-fit:cover;border-radius:18px;border:2px solid rgba(255,255,255,.8);box-shadow:0 8px 30px rgba(0,0,0,.35);background:#222}.sm-call-overlay.is-video .sm-call-avatar,.sm-call-overlay.is-video [data-sm-call-name],.sm-call-overlay.is-video [data-sm-call-status],.sm-call-overlay.is-video .sm-call-timer{position:relative;z-index:2;text-shadow:0 2px 8px #000}.sm-call-overlay.is-video .sm-call-actions{position:absolute;z-index:3;left:50%;bottom:28px;transform:translateX(-50%);background:rgba(0,0,0,.35);padding:10px;border-radius:999px;backdrop-filter:blur(10px)}
.sm-jitsi-overlay{position:fixed;inset:0;z-index:100000;background:rgba(0,0,0,.72);display:none;padding:18px}.sm-jitsi-overlay.is-visible{display:flex}.sm-jitsi-card{margin:auto;width:min(1200px,100%);height:min(850px,100%);background:#fff;border-radius:18px;overflow:hidden;display:flex;flex-direction:column}.sm-jitsi-top,.sm-jitsi-share{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid #e7e7e7}.sm-jitsi-top strong{flex:1}.sm-jitsi-top button,.sm-jitsi-share button{border:0;border-radius:10px;padding:9px 13px;cursor:pointer;font-weight:700}.sm-jitsi-share input{flex:1;min-width:0;padding:9px 11px;border:1px solid #ddd;border-radius:10px}.sm-jitsi-frame{flex:1;min-height:0}.sm-jitsi-frame iframe{width:100%;height:100%;border:0}
@media(max-width:700px){.sm-jitsi-start{padding:9px 11px;font-size:12px}.sm-jitsi-overlay{padding:0}.sm-jitsi-card{width:100%;height:100%;border-radius:0}.sm-jitsi-share{flex-wrap:wrap}.sm-jitsi-share input{flex-basis:100%}.sm-call-overlay.is-video .sm-call-card{width:100vw;height:100vh;border-radius:0}.sm-call-overlay.is-video [data-sm-call-local-video]{width:30vw;right:10px;top:10px}.sm-call-overlay.is-video .sm-call-actions{bottom:18px;width:calc(100% - 20px);justify-content:center;border-radius:20px;flex-wrap:wrap}.sm-thread-call-buttons{gap:5px}.sm-thread-call-buttons button{width:38px;height:38px}}
