/* OwlVerse hub — social (dynamic). Shared styles for the components
 * owlverse-social.js renders (04, 17, 18, 19). Every rule here styles
 * a class the module emits that is NOT already in styles.css or the
 * screens' page-local <style>. Where a screen already defines the
 * same class (.post, .post-head, .post-actions, .person, .s2-event),
 * the page-local rule (later in the cascade) wins with identical
 * values — the shared definitions exist so the SAME component renders
 * on screens whose page CSS does not define it (e.g. .person cards
 * inside 04's buddies summary, .s2-event cards on 19).
 *
 * Visual language follows the existing design: white cards, var(--line)
 * borders, var(--radius), var(--shadow-sm), green accent. No new
 * colours, no new iconography — initial-letter avatars only (no
 * AI-look icons). */

/* --- generic ------------------------------------------------------- */
.hidden{display:none!important}
.ic{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ic.sm{width:16px;height:16px}
.btn.ghost{background:transparent;border-color:transparent;color:var(--muted)}
.btn.ghost:hover{background:#e9f7ec;color:var(--green-dark)}
.chip.sm{font-size:12px;padding:4px 10px}

/* Initial-letter avatars (divs the module renders). img.avatar keeps
   the styles.css behaviour; only div.avatar gets the tint + centring. */
div.avatar{display:inline-flex;align-items:center;justify-content:center;background:#e9f7ec;color:var(--green-dark);font-weight:700;font-size:15px;flex:none}
div.avatar.sm{width:32px;height:32px;font-size:13px}
div.avatar.xs{width:26px;height:26px;font-size:11px}
div.avatar.lg{width:64px;height:64px;font-size:24px}

/* --- honest state blocks ------------------------------------------- */
.ov-state{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:22px;text-align:center}
.ov-state-title{font-weight:700;font-size:16px;margin-bottom:6px}
.ov-state-sub{font-size:13.5px;color:var(--muted);margin-bottom:12px}
.ov-state .btn{margin-top:6px}
.ov-optin{text-align:left;max-width:520px;margin:0 auto}
.ov-optin .ov-state-title,.ov-optin .ov-state-sub{text-align:left}
.ov-optin-list{margin:0 0 14px 18px;font-size:13.5px;color:var(--muted);display:grid;gap:6px}
.ov-note{font-size:13px;color:#92400e;background:#fef3c7;border:1px solid #fde68a;border-radius:10px;padding:9px 12px;margin-top:10px}

/* --- posts ---------------------------------------------------------- */
.post-who{flex:1;min-width:0}
.post-name{font-weight:700;font-size:14.5px}
.post-meta{font-size:12.5px;color:var(--muted)}
.post-text{padding:12px 18px 16px;font-size:14.5px}
.post-actions button.liked{color:var(--red)}
.poll-readonly{padding:0 18px 14px;display:grid;gap:8px}
.poll-row{display:flex;justify-content:space-between;gap:10px;background:#f8faf9;border:1px solid var(--line2);border-radius:10px;padding:9px 12px;font-size:13.5px}

/* --- comments ------------------------------------------------------- */
.comments{border-top:1px solid var(--line2);padding:12px 18px 16px}
.comment-list{display:grid;gap:12px;margin-bottom:12px}
.comment{display:flex;gap:10px;align-items:flex-start}
.comment-body{flex:1;min-width:0}
.comment-head{display:flex;gap:6px;align-items:baseline}
.comment-name{font-weight:700;font-size:13.5px}
.comment-text{font-size:13.5px}
.comment-form{display:flex;gap:8px}
.input{border:1.5px solid var(--line);border-radius:11px;padding:11px 13px;outline:none;background:#fff;font-size:14px;flex:1;min-width:0}
.input:focus{border-color:var(--green)}
.input.sm{padding:8px 11px;font-size:13.5px;border-radius:999px}

/* --- groups --------------------------------------------------------- */
.group-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm);cursor:pointer}
.group-head{display:flex;gap:12px;align-items:center;padding:15px 16px 0}
.group-who{flex:1;min-width:0}
.group-name{font-weight:700;font-size:15.5px}
.group-meta{font-size:12.5px;color:var(--muted)}
.group-card .btn{margin:12px 16px 16px}

/* --- threads + chat ------------------------------------------------- */
.thread-row{display:flex;gap:12px;align-items:center;width:100%;text-align:left;background:none;border:0;border-bottom:1px solid var(--line2);padding:14px 16px;cursor:pointer;font:inherit}
.thread-row:hover{background:#f4faf5}
.thread-body{flex:1;min-width:0}
.thread-name{font-weight:700;font-size:14.5px}
.thread-last{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thread-time{font-size:12px;flex:none}
.chat-head-body{flex:1;min-width:0}
.chat-head-name{font-weight:700;font-size:15px}
.chat-head-meta{font-size:12.5px;color:var(--muted)}
.msg{max-width:70%;padding:11px 15px;border-radius:16px;font-size:14.5px;margin-bottom:10px}
.msg.theirs{background:#f1f5f9;border-bottom-left-radius:4px}
.msg.mine{background:var(--green);color:#fff;margin-left:auto;border-bottom-right-radius:4px}
.msg-name{font-size:12px;font-weight:700;margin-bottom:3px;opacity:.85}
.msg-text{word-break:break-word}
.msg-time{font-size:11px;margin-top:4px;opacity:.75}

/* --- events (.s2-event base — 04 defines the same values locally) ---- */
.s2-event{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm);display:flex;flex-direction:column}
.s2-event .ev-top{display:flex;gap:12px;padding:16px 16px 0;align-items:flex-start}
.s2-date{flex:none;width:56px;text-align:center;background:#e9f7ec;border:1px solid var(--line);border-radius:12px;padding:8px 0}
.s2-date b{display:block;font-size:19px;line-height:1;color:var(--green-dark)}
.s2-date span{font-size:11.5px;font-weight:700;color:#3c5544;text-transform:uppercase}
.s2-event .ev-body{padding:12px 16px 16px;display:flex;flex-direction:column;gap:8px;flex:1}
.s2-ev-meta{display:flex;gap:8px;align-items:center;font-size:13px;color:var(--muted)}
.s2-cap{height:8px;background:#eef2ef;border-radius:999px;overflow:hidden}
.s2-cap i{display:block;height:100%;background:var(--green);border-radius:999px}
.event-desc{font-size:13.5px;color:var(--muted)}
.event-foot{display:flex;gap:8px;margin-top:auto;padding-top:4px;flex-wrap:wrap;align-items:center}

/* --- buddies (.person base — 17 defines the same values locally) ----- */
.person{background:#fff;border:1.5px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:8px;cursor:pointer}
.person.sel{border-color:var(--green);box-shadow:0 0 0 3px rgba(22,163,74,.16)}
.person .p-top{display:flex;gap:12px;align-items:center}
.person-who{flex:1;min-width:0}
.person-name{font-weight:700;font-size:15px}
.person-meta{font-size:12.5px;color:var(--muted)}
.match-line{font-weight:700;font-size:14px;color:var(--green-dark)}
.why{font-size:13px}
.person-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}

/* --- requests / viewers --------------------------------------------- */
.request-row,.viewer-row{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;box-shadow:var(--shadow-sm)}
.request-body,.viewer-body{flex:1;min-width:0}
.request-name,.viewer-name{font-weight:700;font-size:14.5px}
.request-meta,.viewer-meta{font-size:12.5px;color:var(--muted)}
.viewer-time{font-size:12px;flex:none}

/* --- buddy detail panel (17) ---------------------------------------- */
.detail-name{font-weight:700;font-size:17px;margin-top:10px}
.detail-meta{font-size:13px;color:var(--muted);margin-bottom:8px}
.detail-list{margin:0 0 12px 18px;font-size:13.5px;display:grid;gap:4px}
.detail-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}

/* --- sidebar mini-lists (04 + 19) ------------------------------------ */
.side-event,.side-group{display:block;padding:10px 0;border-bottom:1px solid var(--line2);text-decoration:none;color:inherit}
.side-event:last-child,.side-group:last-child{border-bottom:0}
.side-event-title,.side-group-name{font-weight:700;font-size:13.5px}
.side-event-date,.side-group-meta{font-size:12px;color:var(--muted)}
