/* Fury Social.
 *
 * A feed at a readable measure, loaded after /styles.css which supplies the
 * palette and the top bar. */

.social-main {
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(12px, 3vw, 28px) 24px 80px;
}

.social-head { margin-bottom: 20px; }
.social-head h1 { margin: 0 0 4px; font-size: clamp(1.8rem, 5vw, 2.4rem); }
.social-head p { margin: 0; }

/* ----- Writing one --------------------------------------------------------- */

.composer { padding: 16px 18px; margin-bottom: 22px; }
.composer textarea { width: 100%; resize: vertical; }

.composer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.composer-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.composer-image { position: relative; }
.composer-image img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.composer-image button {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

/* ----- A post -------------------------------------------------------------- */

.social-feed { display: flex; flex-direction: column; gap: 16px; }

.post-card {
    padding: 16px 18px;
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    background: rgba(34, 39, 50, 0.92);
}

.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-face { border-radius: 50%; flex-shrink: 0; }

.post-who {
    display: block;
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}
.post-who:hover { color: var(--accent); }
.post-when { color: var(--muted); font-size: 0.76rem; }

.post-remove {
    margin-left: auto;
    padding: 3px 10px;
    font-size: 0.76rem;
}

/* pre-wrap: the line breaks somebody typed are part of what they wrote. */
.post-text {
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* One picture fills the width; several share it as a grid. */
.post-images { display: grid; gap: 6px; margin-top: 12px; }
.post-images.is-2, .post-images.is-4 { grid-template-columns: 1fr 1fr; }
.post-images.is-3 { grid-template-columns: repeat(3, 1fr); }
.post-images img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.post-images.is-1 img { object-fit: contain; background: var(--panel-2); }

.post-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--panel-border);
}

.like {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}
.like:hover { border-color: var(--accent); color: var(--text); }
.like.is-on { border-color: var(--accent); color: var(--accent); }

/* ----- Comments ------------------------------------------------------------ */

.comments { margin-top: 12px; display: grid; gap: 10px; }

.comment { display: flex; align-items: flex-start; gap: 8px; }
.comment-face { border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.comment-body { flex: 1; min-width: 0; }

.comment-who { font-size: 0.84rem; font-weight: 600; }
.comment-when { color: var(--muted); font-size: 0.72rem; margin-left: 6px; }
.comment-text { white-space: pre-wrap; font-size: 0.88rem; line-height: 1.5; }

.comment-remove {
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.comment-remove:hover { color: var(--danger); }

.comment-add { display: flex; gap: 8px; margin-top: 2px; }
.comment-add input { flex: 1; font-size: 0.88rem; }

/* Emoji and mentions, the same as everywhere else on the site. */
.post-text .emoji, .comment-text .emoji {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.2em;
}
.post-text .mention, .comment-text .mention {
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(217, 164, 65, 0.16);
    color: var(--accent-bright);
}
.post-text .mention-unknown, .comment-text .mention-unknown {
    background: none;
    color: var(--muted);
}
.post-text .md-link, .comment-text .md-link { color: var(--accent); }
