/* =====================================================================
   ani+ — comments / communities additions
   Title comment boxes (hidden-behind-button), timestamp jump chips,
   chat media attach previews, create-community modal touch-ups.
===================================================================== */

/* ---------- 💬 Comments toggle (collapsed state = neat page) ---------- */
.comments-toggle {
	width: 100%;
	justify-content: flex-start;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 18px 0 0;
}

.comments-toggle svg {
	flex: 0 0 auto;
}

.comments-toggle .chev {
	margin-left: auto;
	font-size: 20px;
	line-height: 1;
	transition: transform 0.18s ease;
	color: var(--text-secondary);
}

.comments-toggle .chev.is-open {
	transform: rotate(90deg);
}

.detail-comments + .comments-panel,
.detail-comments .comments-panel {
	margin-top: -6px;
}

.comment-count {
	background: var(--accent-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-weight: 700;
	font-size: 13px;
}

.comment-count-zero {
	background: none;
	color: var(--text-tertiary);
	font-weight: 400;
}

/* ---------- Comments panel ---------- */
.comments-panel {
	margin-top: 14px;
	background: var(--glass-strong);
	border: 1px solid var(--hairline);
	border-radius: var(--radius-card);
	padding: 16px;
	-webkit-backdrop-filter: blur(24px) saturate(1.4);
	backdrop-filter: blur(24px) saturate(1.4);
}

.comment-filters {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.comment-filters .cat-pill {
	font-size: 13px;
	padding: 6px 14px;
}

/* ---------- compose bar ---------- */
.comment-compose {
	display: flex;
	gap: 10px;
	margin-bottom: 4px;
}

.comment-compose-main {
	flex: 1;
	min-width: 0;
}

.comment-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	flex: 0 0 auto;
	object-fit: cover;
}

.comment-avatar-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 15px;
}

.comment-input {
	width: 100%;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid var(--hairline);
	border-radius: 14px;
	color: var(--text);
	font: inherit;
	font-size: 14px;
	padding: 10px 12px;
	resize: vertical;
}

.comment-input:focus {
	outline: none;
	border-color: rgba(255, 255, 255, 0.34);
}

.comment-compose-tools {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.comment-tool {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--hairline);
	color: var(--text-secondary);
	font: inherit;
	font-size: 13px;
	border-radius: 999px;
	padding: 5px 12px;
	transition: background 0.15s ease, color 0.15s ease;
}

.comment-tool:hover {
	background: rgba(255, 255, 255, 0.14);
	color: var(--text);
}

.comment-tool.is-on {
	background: var(--accent-gradient);
	border-color: transparent;
	color: #17171a;
	font-weight: 600;
}

.comment-hint {
	font-size: 12px;
	color: var(--text-tertiary);
	margin-left: auto;
}

.comment-send {
	font-size: 13px;
	padding: 7px 16px;
	border-radius: 999px;
}

.comment-attach-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}

.comment-attach-preview[hidden] {
	display: none;
}

.comment-attach-preview img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid var(--hairline);
}

.comment-attach-remove {
	background: rgba(0, 0, 0, 0.55);
	border: 1px solid var(--hairline);
	border-radius: 50%;
	width: 24px;
	height: 24px;
	color: #fff;
	font-size: 12px;
}

/* ---------- comment list ---------- */
.comments-list {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.comment-card {
	display: flex;
	gap: 10px;
	animation: comment-in 0.25s ease both;
}

@keyframes comment-in {
	from { opacity: 0; transform: translateY(5px); }
	to { opacity: 1; transform: none; }
}

.comment-card-main {
	flex: 1;
	min-width: 0;
}

.comment-head {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 13px;
}

.comment-head strong {
	font-size: 13.5px;
}

.comment-ep {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid var(--hairline);
	color: var(--text-secondary);
	font-size: 11px;
	border-radius: 999px;
	padding: 1px 8px;
}

.comment-when {
	color: var(--text-tertiary);
	font-size: 12px;
}

.comment-bubble {
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid var(--hairline);
	border-radius: 4px 16px 16px 16px;
	padding: 10px 14px;
	margin-top: 5px;
	font-size: 14.5px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.comment-card.is-mine .comment-bubble {
	background: rgba(125, 122, 255, 0.14);
	border-color: rgba(125, 122, 255, 0.3);
}

/* shared image inside a comment */
.comment-attach-img {
	margin-top: 6px;
	max-width: min(320px, 100%);
	max-height: 240px;
	width: auto;
	border-radius: 12px;
	border: 1px solid var(--hairline);
	cursor: zoom-in;
}

.comment-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 6px;
	padding-left: 2px;
}

.comment-react {
	background: none;
	border: 0;
	color: var(--text-secondary);
	font: inherit;
	font-size: 12.5px;
	padding: 2px 4px;
}

.comment-react.is-mine {
	color: #ff6482;
}

.comment-del {
	background: none;
	border: 0;
	color: var(--text-tertiary);
	font: inherit;
	font-size: 12px;
	padding: 2px 4px;
}

.comment-del:hover {
	color: #ff6482;
}

.comment-empty {
	color: var(--text-tertiary);
	font-size: 14px;
	padding: 10px 2px;
}

/* ---------- ▶ timestamp jump chips ---------- */
.ts-chip {
	display: inline-block;
	background: linear-gradient(92deg, rgba(90, 200, 250, 0.18), rgba(191, 90, 242, 0.2));
	border: 1px solid rgba(125, 122, 255, 0.45);
	color: #b7b3ff;
	font-weight: 600;
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
	border-radius: 999px;
	padding: 1px 9px;
	margin: 0 2px;
	vertical-align: baseline;
	transform: translateY(-1px);
	transition: background 0.15s ease, color 0.15s ease;
}

.ts-chip:hover {
	background: var(--accent-gradient);
	color: #17171a;
}

.spoiler .ts-chip {
	/* chips inside unrevealed spoilers stay inert until reveal */
	pointer-events: none;
	opacity: 0.55;
}

/* ---------- lightbox ---------- */
.comment-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.86);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	animation: comment-in 0.15s ease both;
}

.comment-lightbox-inner {
	position: relative;
	max-width: min(920px, 92vw);
	max-height: 88vh;
}

.comment-lightbox-inner img {
	max-width: 100%;
	max-height: 88vh;
	border-radius: 14px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.comment-lightbox-close {
	position: absolute;
	top: -18px;
	right: -18px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--hairline);
	background: var(--glass-strong);
	color: #fff;
	font-size: 15px;
}

/* ---------- chat media additions ---------- */
.chat-attach-img {
	display: block;
	margin-top: 6px;
	max-width: min(260px, 100%);
	max-height: 200px;
	width: auto;
	border-radius: 12px;
	border: 1px solid var(--hairline);
	cursor: zoom-in;
}

.chat-attach-note-live {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	color: var(--text-secondary);
	padding: 6px 10px;
}

.chat-attach-note-live img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--hairline);
}

.chat-attach-remove {
	background: none;
	border: 0;
	color: var(--text-tertiary);
	font-size: 13px;
	margin-left: auto;
}

.chat-attach-remove:hover {
	color: #ff6482;
}

/* ---------- create-community modal + member tags ---------- */
.community-create-modal .cc-rooms {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 14px 0 4px;
	font-size: 13.5px;
	color: var(--text-secondary);
}

.community-create-modal .cc-rooms label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.community-create-modal .cc-rooms input {
	accent-color: #7d7aff;
	width: 15px;
	height: 15px;
}

.cc-hint {
	font-size: 12.5px;
	color: var(--text-tertiary);
	margin-top: 10px;
	line-height: 1.5;
}

.member-owner {
	border-color: rgba(125, 122, 255, 0.55);
	color: #b7b3ff;
}

/* ---------- watch-party invite button ---------- */
.party-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.party-invite {
	margin-left: auto;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--hairline);
	color: var(--text-secondary);
	font: inherit;
	font-size: 12.5px;
	border-radius: 999px;
	padding: 5px 14px;
	transition: background 0.15s ease, color 0.15s ease;
}

.party-invite:hover {
	background: var(--accent-gradient);
	border-color: transparent;
	color: #17171a;
	font-weight: 600;
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
	.comment-hint {
		margin-left: 0;
		flex-basis: 100%;
		order: 3;
	}

	.comment-attach-img,
	.chat-attach-img {
		max-width: 100%;
	}
}
