/* Campus Press Social Interactions: Feed Previews, Single-Layer Replies, Mentions & Comments Modal */
.cp-icon-action {
	width: auto;
	min-width: 34px;
	padding: 0 6px;
	gap: 5px;
}

.cp-action-num {
	font-size: 13px;
	font-weight: 700;
	color: var(--cp-text, #0f1419);
	line-height: 1;
}

.cp-icon-action.is-liked .cp-action-num {
	color: var(--cp-red, #ff3040);
}

/* Feed Card Recent Comment Preview */
.cp-ig-post-recent-wrap {
	margin-top: 6px;
	display: grid;
	gap: 4px;
}

.cp-ig-view-comments-btn {
	border: 0;
	background: transparent;
	padding: 0;
	text-align: left;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--cp-muted, #737373);
	cursor: pointer;
}

.cp-ig-view-comments-btn:hover {
	color: var(--cp-text, #0f1419);
}

.cp-ig-recent-comment {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px;
	font-size: 13.5px;
	line-height: 1.4;
}

.cp-ig-recent-author {
	font-weight: 700;
	color: var(--cp-text, #0f1419);
	text-decoration: none;
}

.cp-ig-recent-author:hover {
	text-decoration: underline;
}

.cp-ig-recent-text {
	color: #1f2937;
	cursor: pointer;
}

/* @username Mention Hyperlinks & Autocomplete */
.cp-mention-link {
	color: #00376b;
	font-weight: 700;
	text-decoration: none;
}

.cp-mention-link:hover {
	text-decoration: underline;
}

.cp-mention-suggest {
	background: #ffffff;
	border: 1px solid var(--cp-border, #dbdbdb);
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
	overflow: hidden;
	margin-bottom: 6px;
}

.cp-mention-option {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 9px 12px;
	border: 0;
	border-bottom: 1px solid #f1f5f9;
	background: #ffffff;
	text-align: left;
	font-family: inherit;
	cursor: pointer;
}

.cp-mention-option:last-child {
	border-bottom: 0;
}

.cp-mention-option:hover {
	background: #f8fafc;
}

.cp-mention-opt-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #09102b;
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cp-mention-opt-meta {
	display: flex;
	flex-direction: column;
}

.cp-mention-opt-meta strong {
	font-size: 13px;
	color: var(--cp-text, #0f1419);
}

.cp-mention-opt-meta small {
	font-size: 11.5px;
	color: var(--cp-muted, #737373);
}

/* Inline & Shared Thread Styles */
.cp-comments-shell {
	max-width: 780px;
	margin: 24px auto 34px;
	background: #ffffff;
	border: 1px solid var(--cp-border, #dbdbdb);
	border-radius: 14px;
	padding: 22px 24px;
}

.cp-comments-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.cp-comments-head h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
}

.cp-comments-count-pill {
	font-size: 12.5px;
	font-weight: 700;
	background: var(--cp-pill-bg, #efefef);
	color: var(--cp-text, #0f1419);
	padding: 4px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

.cp-comment-composer {
	display: grid;
	gap: 10px;
	padding-bottom: 18px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--cp-border-soft, #efefef);
}

.cp-comment-composer textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--cp-border, #dbdbdb);
	border-radius: 12px;
	font-family: inherit;
	font-size: 14px;
	resize: vertical;
	min-height: 76px;
}

.cp-comment-composer textarea:focus {
	outline: 2px solid rgba(0, 149, 246, 0.22);
	border-color: var(--cp-ig-blue, #0095f6);
}

.cp-comment-composer-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.cp-comment-hint {
	font-size: 12px;
	color: var(--cp-muted, #737373);
}

.cp-reply-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #f0f9ff;
	border: 1px solid #bae6fd;
	border-radius: 8px;
	padding: 7px 12px;
	font-size: 12.5px;
}

.cp-reply-cancel {
	border: 0;
	background: transparent;
	color: var(--cp-ig-blue, #0095f6);
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
}

.cp-comment-login-prompt {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: #fafafa;
	border: 1px solid var(--cp-border-soft, #efefef);
	border-radius: 12px;
	margin-bottom: 18px;
}

.cp-comment-login-prompt strong {
	display: block;
	font-size: 14.5px;
}

.cp-comment-login-prompt p {
	margin: 3px 0 0;
	font-size: 13px;
	color: var(--cp-muted, #737373);
}

.cp-comment-list {
	display: grid;
	gap: 14px;
}

.cp-comment-thread {
	display: grid;
	gap: 8px;
}

.cp-comment-empty {
	margin: 0;
	font-size: 13.5px;
	color: var(--cp-muted, #737373);
	text-align: center;
	padding: 18px 8px;
}

.cp-comment-item {
	display: flex;
	align-items: flex-start;
	gap: 11px;
}

.cp-comment-item.is-reply {
	margin-top: 2px;
}

.cp-comment-replies {
	margin-left: 44px;
	padding-left: 12px;
	border-left: 2px solid var(--cp-border-soft, #efefef);
	display: grid;
	gap: 10px;
}

.cp-view-replies-btn {
	margin-left: 44px;
	justify-self: start;
	border: 0;
	background: transparent;
	padding: 2px 0;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	color: var(--cp-muted, #737373);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cp-view-replies-btn::before {
	content: "";
	display: inline-block;
	width: 20px;
	height: 1px;
	background: #d1d5db;
}

.cp-comment-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #09102b;
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	text-decoration: none;
}

.cp-comment-avatar:hover {
	text-decoration: none;
	opacity: 0.9;
}

.cp-comment-item.is-reply .cp-comment-avatar {
	width: 28px;
	height: 28px;
	font-size: 10.5px;
}

.cp-comment-body {
	flex: 1;
	min-width: 0;
}

.cp-comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 13px;
}

.cp-comment-author-link {
	color: var(--cp-text, #0f1419);
	text-decoration: none;
}

.cp-comment-author-link:hover {
	text-decoration: underline;
}

.cp-comment-meta time {
	font-size: 12px;
	color: var(--cp-muted, #737373);
}

.cp-comment-text {
	margin-top: 3px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--cp-text, #0f1419);
	word-break: break-word;
}

.cp-comment-actions {
	display: flex;
	gap: 14px;
	margin-top: 4px;
}

.cp-comment-action-btn {
	border: 0;
	background: transparent;
	padding: 0;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	color: var(--cp-muted, #737373);
	cursor: pointer;
}

.cp-comment-action-btn:hover {
	color: var(--cp-text, #0f1419);
}

.cp-comment-action-btn.is-danger:hover {
	color: #b91c1c;
}

.cp-cmt-like-btn {
	border: 0;
	background: transparent;
	padding: 4px;
	color: var(--cp-muted, #737373);
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	flex-shrink: 0;
}

.cp-cmt-like-btn.is-liked {
	color: var(--cp-red, #ff3040);
}

.cp-cmt-like-btn.is-liked svg path {
	fill: var(--cp-red, #ff3040);
	stroke: var(--cp-red, #ff3040);
}

/* Instagram Comments Modal (Bottom-Sheet on Mobile, Centered Card on Desktop) */
body.cp-modal-open {
	overflow: hidden;
}

.cp-cmt-modal[hidden] {
	display: none !important;
}

.cp-cmt-modal {
	position: fixed;
	inset: 0;
	z-index: 120;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.cp-cmt-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 20, 25, 0.56);
	backdrop-filter: blur(2px);
}

.cp-cmt-modal-sheet {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 520px;
	max-height: min(82vh, 720px);
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.cp-cmt-modal-handle {
	display: flex;
	justify-content: center;
	padding: 10px 0 4px;
}

.cp-cmt-modal-handle span {
	width: 38px;
	height: 4px;
	border-radius: 999px;
	background: #d1d5db;
}

.cp-cmt-modal-header {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 4px 10px;
	padding: 6px 16px 12px;
	border-bottom: 1px solid #f1f5f9;
	text-align: center;
	position: relative;
}

.cp-cmt-modal-header h3 {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 16px;
	font-weight: 800;
}

.cp-cmt-modal-post-title {
	grid-column: 1 / -1;
	font-size: 12px;
	color: var(--cp-muted, #737373);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cp-cmt-modal-close {
	position: absolute;
	right: 12px;
	top: 2px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: #f3f4f6;
	color: var(--cp-text, #0f1419);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.cp-cmt-modal-body {
	flex: 1;
	overflow-y: auto;
	padding: 14px 16px;
	display: grid;
	gap: 14px;
	align-content: start;
}

.cp-cmt-modal-footer {
	border-top: 1px solid #f1f5f9;
	padding: 8px 14px 12px;
	background: #ffffff;
}

.cp-emoji-strip {
	display: flex;
	justify-content: space-between;
	gap: 4px;
	padding: 2px 2px 8px;
}

.cp-emoji-btn {
	border: 0;
	background: transparent;
	font-size: 20px;
	padding: 2px 6px;
	border-radius: 8px;
	cursor: pointer;
}

.cp-emoji-btn:hover {
	background: #f3f4f6;
}

.cp-cmt-modal-form {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
}

.cp-cmt-modal-self-avatar {
	width: 34px;
	height: 34px;
}

.cp-cmt-modal-form input[type="text"] {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--cp-border, #dbdbdb);
	border-radius: 999px;
	padding: 9px 14px;
	font-family: inherit;
	font-size: 13.5px;
	outline: none;
}

.cp-cmt-modal-form input[type="text"]:focus {
	border-color: var(--cp-ig-blue, #0095f6);
}

.cp-cmt-modal-send {
	border: 0;
	background: transparent;
	color: var(--cp-ig-blue, #0095f6);
	font-family: inherit;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
	padding: 6px 6px;
	flex-shrink: 0;
}

.cp-cmt-modal-send:disabled {
	opacity: 0.45;
}

.cp-cmt-modal-guest {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	color: var(--cp-muted, #737373);
	padding: 4px 2px;
}

@media (max-width: 720px) {
	.cp-comments-shell {
		padding: 18px 14px;
	}
	.cp-cmt-modal {
		align-items: flex-end;
		padding: 0;
	}
	.cp-cmt-modal-sheet {
		max-width: 100%;
		max-height: 84vh;
		border-radius: 20px 20px 0 0;
	}
	.cp-comment-replies,
	.cp-view-replies-btn {
		margin-left: 32px;
	}
}

/* Instagram-Style Share Sheet Bottom Modal */
.cp-share-sheet {
	max-width: 500px;
}

.cp-share-top-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 16px 10px;
}

.cp-share-search-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	background: #efefef;
	border-radius: 12px;
	padding: 8px 12px;
	color: var(--cp-muted, #737373);
}

.cp-share-search-wrap input[type="search"] {
	border: 0;
	background: transparent;
	width: 100%;
	font-family: inherit;
	font-size: 14px;
	color: var(--cp-text, #0f1419);
	outline: none;
}

.cp-share-close-circle {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 0;
	background: #efefef;
	color: var(--cp-text, #0f1419);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
}

.cp-share-preview-bar {
	padding: 0 18px 10px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--cp-muted, #737373);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cp-share-users-body {
	flex: 1;
	overflow-y: auto;
	padding: 6px 14px 14px;
	min-height: 150px;
}

.cp-share-users-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px 8px;
}

.cp-share-users-loading {
	grid-column: 1 / -1;
	text-align: center;
	font-size: 13px;
	color: var(--cp-muted, #737373);
	padding: 20px 8px;
}

.cp-share-user-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	border: 0;
	background: transparent;
	padding: 4px;
	cursor: pointer;
	font-family: inherit;
	text-align: center;
}

.cp-share-avatar-wrap {
	position: relative;
	width: 64px;
	height: 64px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.cp-share-avatar-circle {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: linear-gradient(145deg, #09102b, #1733e6);
	color: #ffffff;
	font-size: 19px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cp-share-user-tile.is-selected .cp-share-avatar-circle {
	outline: 2.5px solid #0095f6;
}

.cp-share-check-badge {
	display: none;
	position: absolute;
	right: 0;
	bottom: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #0095f6;
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
	border: 2px solid #ffffff;
	align-items: center;
	justify-content: center;
}

.cp-share-user-tile.is-selected .cp-share-check-badge {
	display: inline-flex;
}

.cp-share-user-name {
	font-size: 12px;
	font-weight: 600;
	color: var(--cp-text, #0f1419);
	line-height: 1.25;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cp-share-user-handle {
	font-size: 11px;
	color: var(--cp-muted, #737373);
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cp-share-guest-card {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px;
	text-align: center;
}

.cp-share-guest-card p {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--cp-muted, #737373);
}

.cp-share-send-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-top: 1px solid #f1f5f9;
	background: #ffffff;
}

.cp-share-send-bar input[type="text"] {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--cp-border, #dbdbdb);
	border-radius: 999px;
	padding: 9px 14px;
	font-family: inherit;
	font-size: 13.5px;
}

.cp-share-apps-strip {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	overflow-x: auto;
	padding: 12px 16px 16px;
	border-top: 1px solid #f1f5f9;
	background: #ffffff;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.cp-share-apps-strip::-webkit-scrollbar {
	display: none;
}

.cp-share-app-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 66px;
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	padding: 0;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 500;
	color: var(--cp-text, #0f1419);
	text-align: center;
	line-height: 1.25;
	cursor: pointer;
}

.cp-share-app-circle {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.14s ease;
}

.cp-share-app-item:hover .cp-share-app-circle {
	transform: scale(1.05);
}

.cp-share-app-circle.is-whatsapp {
	background: #25d366;
	color: #ffffff;
}

.cp-share-app-circle.is-neutral {
	background: #efefef;
	color: #0f1419;
}

.cp-share-app-circle.is-story {
	background: linear-gradient(135deg, #09102b, #2447ff);
	color: #ffffff;
}

.cp-share-app-circle.is-sms {
	background: #2563eb;
	color: #ffffff;
}

.cp-share-app-circle.is-dark {
	background: #111827;
	color: #ffffff;
}

.cp-share-app-circle.is-telegram {
	background: #229ed9;
	color: #ffffff;
}

.cp-share-app-circle.is-linkedin {
	background: #0a66c2;
	color: #ffffff;
}

/* Dark Mode Overrides for Comments, Mentions & Share Sheet */
body.cp-dark .cp-ig-recent-text,
body.cp-dark .cp-comment-text,
body.cp-dark .cp-comment-author,
body.cp-dark .cp-share-user-name,
body.cp-dark .cp-cmt-modal-title,
body.cp-dark .cp-share-post-preview strong {
	color: #f5f5f5;
}
body.cp-dark .cp-ig-view-comments-btn,
body.cp-dark .cp-cmt-modal-post-title,
body.cp-dark .cp-comment-date,
body.cp-dark .cp-comment-empty,
body.cp-dark .cp-share-user-handle,
body.cp-dark .cp-share-app-item small {
	color: #a1a1aa;
}
body.cp-dark .cp-comments-shell,
body.cp-dark .cp-cmt-modal-sheet,
body.cp-dark .cp-cmt-modal-footer,
body.cp-dark .cp-share-sheet,
body.cp-dark .cp-share-send-bar,
body.cp-dark .cp-share-apps-strip,
body.cp-dark .cp-mention-suggest,
body.cp-dark .cp-mention-option {
	background: #121212;
	border-color: #262626;
	color: #f5f5f5;
}
body.cp-dark .cp-cmt-modal-header,
body.cp-dark .cp-share-modal-header,
body.cp-dark .cp-share-post-preview,
body.cp-dark .cp-comment-item,
body.cp-dark .cp-mention-option {
	border-color: #262626;
}
body.cp-dark .cp-comment-login-prompt,
body.cp-dark .cp-share-guest-card {
	background: #1a1a1a;
	border-color: #262626;
	color: #e4e4e7;
}
body.cp-dark .cp-cmt-modal-close,
body.cp-dark .cp-share-search-wrap,
body.cp-dark .cp-share-close-circle,
body.cp-dark .cp-share-app-circle.is-neutral,
body.cp-dark .cp-emoji-btn:hover,
body.cp-dark .cp-mention-option:hover {
	background: #262626;
	color: #f5f5f5;
}
body.cp-dark .cp-share-search-wrap input,
body.cp-dark .cp-modal-input-row input,
body.cp-dark .cp-share-send-bar input {
	color: #f5f5f5;
	background: transparent;
}
body.cp-dark .cp-modal-input-row,
body.cp-dark .cp-share-note-input {
	background: #1a1a1a;
	border-color: #333333;
}
body.cp-dark .cp-reply-banner {
	background: #0f2136;
	border-color: #1e3a5f;
	color: #bae6fd;
}
body.cp-dark .cp-share-avatar-circle {
	border-color: #121212;
}
.cp-cmt-locked-wrap {
	position: relative;
	margin-top: 8px;
}
.cp-cmt-blurred-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 6px;
	filter: blur(4px);
	opacity: 0.55;
	user-select: none;
	-webkit-user-select: none;
	pointer-events: none;
}
.cp-cmt-blur-line {
	height: 11px;
	border-radius: 999px;
	background: #d4d4d8;
	margin-bottom: 7px;
}
.cp-cmt-blur-line.is-short {
	width: 110px;
}
.cp-cmt-blur-line.is-long {
	width: 86%;
	height: 12px;
}
.cp-cmt-gate-card {
	margin-top: 6px;
	padding: 18px 16px;
	border: 1px solid var(--cp-border, #dbdbdb);
	border-radius: 14px;
	background: var(--cp-surface, #ffffff);
	text-align: center;
}
.cp-cmt-gate-card strong {
	display: block;
	font-size: 14.5px;
	margin-bottom: 4px;
}
.cp-cmt-gate-card p {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--cp-muted, #737373);
}
body.cp-dark .cp-cmt-blur-line {
	background: #333333;
}
body.cp-dark .cp-cmt-gate-card {
	background: #161616;
	border-color: #262626;
}
.cp-cmt-anon-toggle {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 4px 0 6px;
	padding: 5px 10px;
	border-radius: 999px;
	background: #eff6ff;
	border: 1px dashed #93c5fd;
	font-size: 12px;
	font-weight: 600;
	color: #1e3a8a;
	cursor: pointer;
}
.cp-cmt-anon-toggle.is-inline {
	margin: 0;
}
.cp-comment-avatar.is-anon {
	background: #0f172a;
	color: #ffffff;
	font-size: 14px;
}
.cp-comment-author-link.is-anon,
.cp-ig-recent-author.is-anon {
	color: var(--cp-text, #0f1419);
	font-weight: 700;
	cursor: default;
	text-decoration: none;
}
body.cp-dark .cp-cmt-anon-toggle {
	background: #0f2136;
	border-color: #1e3a5f;
	color: #bae6fd;
}
body.cp-dark .cp-comment-author-link.is-anon,
body.cp-dark .cp-ig-recent-author.is-anon {
	color: #f8fafc;
}
