/* Requires base.css */

.issue-container {
	margin-top: 1rem;
}

/* Hide email header card in web view */
.issue-container .inner-table > tbody > tr:nth-child(-n+3) {
	display: none;
}

.dateline {
	margin-bottom: 1rem;
	text-align: right;
	max-width: 640px;
}

.header-date {
	color: var(--color-gray-400);
}

/* Embed mode styles */
html.issue-embed,
body.issue-embed {
	margin: 0;
	background: transparent;
	overflow: scroll;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

html.issue-embed::-webkit-scrollbar,
body.issue-embed::-webkit-scrollbar {
	display: none;
}

body.issue-embed .issue-container {
	margin: 0;
	padding: 14px;
}

body.issue-embed [data-article-engagement],
body.issue-embed [data-intro-card] {
	display: none;
}

/* Article container */
.article-container {
	max-width: 640px;
	/*margin: 0 auto;*/
	padding: 1rem var(--padding-horizontal);
}

.breadcrumb {
	margin-bottom: 1rem;
}

.issue-link {
	font-size: 14px;
	font-weight: 500;
	color: var(--color-text-muted);
	text-decoration: none;
}

.issue-link:hover {
	color: var(--color-text);
	text-decoration: underline;
}

.article-card {
	padding: var(--card-padding);
	border-radius: var(--card-border-radius);
	background-color: var(--light-bg);
}

/* Card border radius utilities - must come after .article-card to override */
.card-rounded { border-radius: 22px !important; }
.card-rounded-top { border-radius: 22px 22px 0 0 !important; }
.card-rounded-bottom { border-radius: 0 0 22px 22px !important; }
.card-flat { border-radius: 0 !important; }

.article-rubric {
	padding: 0 0 12px 0;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	line-height: 1.2;
	color: var(--color-text);
}

.article-summary {
	padding: 0 0 16px 0;
	font-size: 20px;
	font-weight: normal;
	line-height: 1.4;
	color: var(--color-text-secondary);
}

.article-footer {
	/*margin-bottom: 16px;*/
}

.article-engagement {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 0;
	/*padding-top: 12px;*/
}

.source-link {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
}

.source-link a {
	color: var(--color-text);
	text-decoration: none;
	border-bottom: 2px solid var(--color-text);
	letter-spacing: 0.2px;
}

.source-link-text {
	/*margin-bottom: 1rem;*/
}

.source-lock-icon {
	height: 16px;
	width: 12.5px;
	vertical-align: middle;
	display: inline-block;
	position: relative;
	top: -2px;
	filter: invert(0.15);
}

/* Comments Section */
.comments-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.comments-loading {
	text-align: center;
	padding: 32px;
	font-size: 14px;
	color: var(--color-text-muted);
}

.comment {
	padding: 12px 0;
}

.comment-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.comment-author {
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text-muted);
}

.comment-time {
	font-size: 12px;
	color: var(--color-gray-400);
}

.comment-text {
	font-size: 15px;
	line-height: 1.6;
	color: var(--color-text-secondary);
	margin-bottom: 12px;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.comment-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
}

.comment-action-btn {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	font-size: 11px;
	font-weight: 500;
	color: var(--color-text-muted);
	background-color: transparent;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	cursor: pointer;
}

.comment-action-btn:hover {
	background-color: var(--color-gray-100);
}

.comment-action-btn.active {
	color: var(--color-primary);
	border-color: var(--color-primary);
	background-color: var(--color-primary-bg);
}

.comment-action-btn.reported {
	color: var(--color-error);
	border-color: var(--color-error-light);
	background-color: var(--color-error-bg);
}

.comment-replies {
	margin-top: 12px;
	margin-left: 16px;
	padding-left: 16px;
	border-left: 2px solid var(--color-border);
	display: flex;
	flex-direction: column;
	gap: 0;
}

.reply {
	padding: 12px 0 12px 16px;
}

/* Voting Section */
.vote-count.loading {
	opacity: 0.3;
}

.vote-button {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 32px;
	background-color: var(--color-bg);
	border: 2px solid var(--color-border);
	border-radius: 12px;
	cursor: pointer;
	/*transition: border-color var(--transition-base-duration);*/
}

.vote-button:hover {
	border-color: var(--color-gray-500);
}

.vote-button.active {
	border-color: var(--color-primary);
	background-color: var(--color-primary-bg);
}

.vote-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.vote-icon {
	font-size: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
}

.vote-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.vote-count {
	font-size: 16px;
	font-weight: 600;
	color: var(--color-text-muted);
}

/* Small voting buttons for article cards */
.vote-button-small {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 8px;
	background-color: transparent;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all var(--transition-base-duration);
}

.vote-button-small:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

.vote-button-small.active {
	background-color: var(--color-primary-bg);
}

.vote-button-small:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.vote-icon-small {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
}

.vote-icon-small img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.vote-button-small .vote-count {
	font-size: 13px;
	font-weight: 600;
	color: var(--color-gray-400);
	min-width: 16px;
	text-align: center;
}

.vote-button-small .vote-count.has-votes {
	color: var(--color-gray-600);
}

.vote-button-small .vote-count.user-voted {
	color: var(--color-primary);
}

/* Share button */
.share-button {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px 8px;
	background-color: transparent;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all var(--transition-base-duration);
	color: var(--color-text-muted);
	margin-right: 10px;
	min-height: 32px;
}

.share-button:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

.share-button.copied {
	background-color: var(--color-success-bg, #d1fae5);
	/*border-color: var(--color-success, #10b981);*/
	color: var(--color-gray-600);
}

/* Page Footer */
.page-footer {
	margin-top: 32px;
	text-align: center;
	padding: 16px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.publication-header {
		background-color: var(--color-primary-dark);
	}

	.publication-header h1 {
		color: var(--color-bg);
	}

	.article-card {
		background-color: var(--color-gray-800) !important;
	}

	.article-rubric {
		color: var(--color-gray-300) !important;
	}

	.article-summary {
		color: var(--color-bg-tertiary) !important;
	}

	.source-link a {
		color: var(--color-primary-light);
		border-bottom-color: var(--color-primary-light);
	}

	.vote-button-small {
		background-color: var(--color-gray-900);
		border-color: var(--color-gray-600);
	}

	.vote-button-small:hover {
		border-color: var(--color-gray-500);
	}

	.vote-button-small.active {
		border-color: var(--color-primary-light);
		background-color: var(--color-primary-dark);
	}

	.vote-button-small .vote-count {
		color: var(--color-gray-300);
	}

	.comment-action-btn.active {
		border-color: var(--color-primary-light);
		background-color: var(--color-primary-dark);
	}

	.source-lock-icon {
		filter: invert(100%);
	}
}

/* Mobile responsive styles */
@media only screen and (max-width: 640px) {
	.article-container {
		padding: 0;
	}

	.article-card {
		padding: 28px;
	}

	.article-rubric {
		font-size: 13px;
	}

	.article-summary {
		font-size: 18px;
	}

	.article-footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.vote-button-small {
		padding: 5px 8px;
	}

	.share-button {
		padding: 6px 10px;
	}

	.vote-icon-small {
		width: 18px;
		height: 18px;
	}

	.vote-button-small .vote-count {
		font-size: 12px;
	}

	.comment-replies {
		padding-left: 16px;
	}
}

/* Card anchor highlight animation */
@keyframes card-highlight-pulse {
	0%, 100% {
		outline: 10px solid rgba(255, 213, 3, 0.8);
	}
	50% {
		outline: 10px solid rgba(255, 213, 3, 0);
	}
}

.card-highlight {
	animation: card-highlight-pulse 0.5s ease-in-out 3;
	outline: 10px solid rgba(255, 213, 3, 0.8);
	outline-offset: 0px;
}
