/* ============================================================
   OZOT POSTS — feed + manager styles
   Loaded by posts.php and posts-manager.php on top of the
   main stylesheet.css design system.
   ============================================================ */

.feed {
	max-width: 660px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.feed-post {
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	padding: 20px 22px;
}

/* Byline (avatar + name + time) */
.feed-byline {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.feed-avatar {
	width: 44px;
	height: 44px;
	flex: 0 0 auto;
	border-radius: 50%;
	border: 1px solid var(--line-strong);
	background: var(--bg-inset);
	padding: 6px;
	object-fit: contain;
}

.feed-avatar-sm { width: 32px; height: 32px; padding: 4px; }

.feed-who { display: flex; flex-direction: column; line-height: 1.3; }

.feed-name {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.06em;
}

.feed-time { color: var(--text-muted); font-size: 0.78rem; }

/* Post body */
.feed-text {
	color: var(--text-soft);
	overflow-wrap: break-word;
	word-break: break-word;
}

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

.feed-media img,
.feed-media video {
	display: block;
	width: 100%;
	max-height: 540px;
	object-fit: contain;
	background: var(--bg-inset);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
}

.feed-audio {
	background: var(--bg-inset);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 10px 12px;
}

.feed-audio-name {
	display: block;
	color: var(--text-muted);
	font-size: 0.8rem;
	margin-bottom: 6px;
	overflow-wrap: break-word;
}

.feed-audio audio { width: 100%; }

/* Replies */
.feed-replies {
	margin-top: 16px;
	padding-left: 16px;
	border-left: 2px solid var(--line-strong);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.feed-reply {
	background: var(--bg-inset);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 12px 14px;
}

.feed-reply .feed-byline { margin-bottom: 8px; }

/* Empty feed */
.feed-empty {
	text-align: center;
	color: var(--text-muted);
	padding: 40px 20px;
}

/* ---------- Manager ---------- */

.compose {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.compose textarea { width: 100%; resize: vertical; }

.compose input[type="file"] {
	color: var(--text-muted);
	font-size: 0.85rem;
	max-width: 100%;
}

.compose button { align-self: flex-start; }

.compose-hint { color: var(--text-muted); font-size: 0.78rem; margin: 0; }

.compose-reply { margin-top: 10px; }

.feed-reply-toggle summary {
	cursor: pointer;
	color: var(--cyan);
	font-size: 0.85rem;
	user-select: none;
}

.feed-reply-toggle summary:hover { color: var(--cyan-soft); }

.feed-delete { margin-top: 12px; }

.feed-reply .feed-delete { margin-top: 8px; }

/* Manager top bar (logged in as / logout) */
.manager-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	max-width: 660px;
	margin: 0 auto 20px;
	color: var(--text-muted);
	font-size: 0.88rem;
}

.manager-bar form { margin: 0; }

/* Login card */
.login-card {
	max-width: 420px;
	margin: 0 auto;
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	padding: 26px 24px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.login-card input { width: 100%; }

/* Alerts */
.posts-alert {
	max-width: 660px;
	margin: 0 auto 20px;
	border-radius: var(--radius-sm);
	padding: 12px 16px;
	font-size: 0.9rem;
	border: 1px solid rgba(248, 113, 113, 0.4);
	background: rgba(248, 113, 113, 0.1);
	color: var(--bad);
}

.posts-alert ul { margin: 0; padding-left: 18px; }

@media (max-width: 600px) {
	.feed-post { padding: 16px; }
}
