/* Social media tools - counters, hashtags, mockups, embeds, threads */

.sm-form { display: flex; flex-direction: column; gap: 14px; }
.sm-help { font-size: .8125rem; color: var(--color-text-muted); margin: 8px 0 0; }

/* Character counter cards */
.sm-counter-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 12px; }
.sm-counter-card.is-warn { border-color: #FCD34D; background: #FFFBEB; }
.sm-counter-card.is-over { border-color: #FCA5A5; background: #FEF2F2; }
.sm-counter-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.sm-counter-label { font-size: .8125rem; font-weight: 700; color: var(--color-text); text-transform: uppercase; letter-spacing: .04em; }
.sm-counter-vals { font-size: 1rem; font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.sm-counter-help { font-size: .75rem; color: var(--color-text-muted); margin-top: 6px; }

.sm-bar { height: 8px; background: var(--color-bg); border-radius: 4px; overflow: hidden; }
.sm-bar-fill { height: 100%; background: #2563EB; transition: width .15s ease; border-radius: 4px; }
.sm-bar-fill.is-warn { background: #F59E0B; }
.sm-bar-fill.is-over { background: #DC2626; }

.sm-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sm-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 20px; padding: 4px 10px; font-size: .75rem; color: var(--color-text-muted); }
.sm-badge strong { color: var(--color-text); }
.sm-badge-hash { background: #FEF3C7; border-color: #FDE68A; color: #B45309; }
.sm-badge-mention { background: #DBEAFE; border-color: #BFDBFE; color: #1D4ED8; }
.sm-badge-url { background: #DCFCE7; border-color: #BBF7D0; color: #15803D; }

/* All-platforms grid for the universal counter */
.sm-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.sm-grid-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sm-grid-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9375rem;
    font-weight: 700;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--color-border);
}
.sm-grid-head .bi { font-size: 1.125rem; }

.sm-grid-row { display: flex; flex-direction: column; gap: 4px; }
.sm-grid-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sm-grid-row-label { font-size: .75rem; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.sm-grid-row-vals { font-size: .8125rem; font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sm-grid-row-vals.is-warn { color: #B45309; }
.sm-grid-row-vals.is-over { color: #DC2626; }
.sm-grid-row-meta { font-size: .6875rem; color: var(--color-text-muted); text-align: right; }

/* Hashtag chips */
.sm-tag-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.sm-tag { display: inline-block; background: #EFF6FF; border: 1px solid #BFDBFE; color: #1D4ED8; border-radius: 20px; padding: 3px 10px; font-size: .8125rem; font-family: ui-monospace, monospace; }
.sm-tag-clickable { cursor: pointer; transition: background .15s, transform .15s; }
.sm-tag-clickable:hover { background: #DBEAFE; }
.sm-tag-clickable.is-copied { background: #DCFCE7; border-color: #86EFAC; color: #15803D; transform: scale(1.05); }

/* Embed preview */
.sm-embed-preview { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 8px; padding: 14px; }

/* Thread builder */
.sm-thread-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.sm-thread-card.is-over { border-color: #FCA5A5; background: #FEF2F2; }
.sm-thread-num { font-size: .75rem; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.sm-thread-text { font-size: .9375rem; line-height: 1.5; color: var(--color-text); white-space: pre-wrap; word-break: break-word; }
.sm-thread-foot { font-size: .75rem; color: var(--color-text-muted); text-align: right; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* Image resizer cards */
.sm-resize-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; }
.sm-resize-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.sm-resize-meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.sm-resize-meta strong { font-size: .8125rem; color: var(--color-text); }
.sm-resize-meta small { font-size: .75rem; color: var(--color-text-muted); }
.sm-resize-meta .btn { margin-top: 4px; align-self: flex-start; }

/* ─── Mockup styles ─── */

/* YouTube comment */
.sm-yt-comment { display: flex; gap: 12px; max-width: 700px; padding: 16px; background: #fff; border: 1px solid #E5E5E5; border-radius: 8px; font-family: 'Roboto', system-ui, sans-serif; }
.sm-yt-avatar { width: 40px; height: 40px; border-radius: 50%; background: #FF6B6B; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.sm-yt-body { flex: 1; min-width: 0; }
.sm-yt-head { font-size: .8125rem; margin-bottom: 4px; }
.sm-yt-name { font-weight: 700; color: #0F0F0F; }
.sm-yt-time { color: #606060; margin-left: 6px; }
.sm-yt-text { font-size: .9375rem; line-height: 1.4; color: #0F0F0F; margin-bottom: 8px; white-space: pre-wrap; }
.sm-yt-actions { display: flex; gap: 16px; align-items: center; font-size: .8125rem; color: #606060; }
.sm-yt-reply { font-weight: 600; cursor: default; }
.sm-yt-replies { color: #065FD4; font-weight: 600; cursor: default; }

/* TikTok comment */
.sm-tt-comment { display: flex; gap: 12px; max-width: 480px; padding: 12px 14px; background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.sm-tt-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #25F4EE, #FE2C55); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.sm-tt-body { flex: 1; min-width: 0; }
.sm-tt-name { font-weight: 600; font-size: .8125rem; color: #161823; margin-bottom: 4px; }
.sm-tt-text { font-size: .9375rem; color: #161823; margin-bottom: 6px; white-space: pre-wrap; }
.sm-tt-meta { display: flex; gap: 16px; font-size: .75rem; color: #8a8b8f; }
.sm-tt-reply { font-weight: 600; cursor: default; }
.sm-tt-likes { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #8a8b8f; font-size: .75rem; }
.sm-tt-likes .bi-heart { font-size: 1.125rem; }

/* Reddit post */
.sm-rd-post { display: flex; max-width: 760px; background: #fff; border: 1px solid #ccc; border-radius: 4px; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; overflow: hidden; }
.sm-rd-votes { background: #F6F7F8; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 40px; color: #878a8c; font-size: .8125rem; font-weight: 700; }
.sm-rd-votes .bi { font-size: 1.25rem; cursor: default; }
.sm-rd-body { flex: 1; padding: 10px 14px; min-width: 0; }
.sm-rd-meta { font-size: .75rem; color: #787c7e; margin-bottom: 8px; }
.sm-rd-meta strong { color: #1c1c1c; }
.sm-rd-title { font-size: 1.125rem; font-weight: 600; color: #1c1c1c; margin: 0 0 8px; line-height: 1.3; }
.sm-rd-text { font-size: .875rem; color: #1c1c1c; margin: 0 0 12px; white-space: pre-wrap; }
.sm-rd-actions { display: flex; gap: 16px; font-size: .75rem; color: #878a8c; font-weight: 700; }

/* LinkedIn post */
.sm-li-post { max-width: 560px; background: #fff; border: 1px solid #E5E5E5; border-radius: 8px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.sm-li-head { display: flex; gap: 10px; padding: 14px 14px 0; }
.sm-li-avatar { width: 48px; height: 48px; border-radius: 50%; background: #0A66C2; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.sm-li-name { font-size: .9375rem; font-weight: 700; color: #000; line-height: 1.2; }
.sm-li-role { font-size: .75rem; color: rgba(0,0,0,.6); }
.sm-li-time { font-size: .75rem; color: rgba(0,0,0,.6); }
.sm-li-text { font-size: .9375rem; color: rgba(0,0,0,.9); line-height: 1.45; padding: 12px 14px; white-space: pre-wrap; }
.sm-li-stats { display: flex; justify-content: space-between; padding: 0 14px 8px; font-size: .75rem; color: rgba(0,0,0,.6); }
.sm-li-actions { display: flex; justify-content: space-around; padding: 6px 0; border-top: 1px solid #E5E5E5; font-size: .8125rem; color: rgba(0,0,0,.6); font-weight: 600; }
.sm-li-actions span { padding: 8px 12px; cursor: default; display: flex; align-items: center; gap: 4px; }
