/* Academic Research Publication Manager - frontend styles */

.arpm-form-wrap,
.arpm-tracker-wrap,
.arpm-archive-wrap {
	--arpm-accent: #1d4ed8;
	--arpm-accent-dark: #1e3a8a;
	--arpm-ink: #1f2430;
	--arpm-muted: #6b7280;
	--arpm-border: #e2e5ea;
	--arpm-bg-soft: #f7f8fa;
	--arpm-success: #1a7f37;
	--arpm-error: #b32d2e;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--arpm-ink);
	max-width: 920px;
	margin: 0 auto;
	line-height: 1.5;
}

.arpm-notice { border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; border: 1px solid var(--arpm-border); }
.arpm-notice p { margin: 4px 0; }
.arpm-notice-success { background: #ecfdf3; border-color: #a7e3bd; color: #14532d; }
.arpm-notice-error { background: #fef2f2; border-color: #f2b8b5; color: #7f1d1d; }
.arpm-notice-info { background: var(--arpm-bg-soft); }
.arpm-notice ul { margin: 6px 0 0 18px; }
.arpm-empty { color: var(--arpm-muted); padding: 30px 0; text-align: center; }

.arpm-form .arpm-field { margin-bottom: 16px; }
.arpm-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.arpm-form .req { color: var(--arpm-error); }
.arpm-form input[type="text"],
.arpm-form input[type="email"],
.arpm-form input[type="number"],
.arpm-form input[type="file"],
.arpm-form textarea,
.arpm-form select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--arpm-border);
	border-radius: 6px;
	font-size: 15px;
	box-sizing: border-box;
	font-family: inherit;
}
.arpm-form textarea { resize: vertical; }
.arpm-honeypot { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.arpm-actions { margin-top: 20px; }

.arpm-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	border: 1px solid transparent;
	line-height: 1.2;
}
.arpm-btn-primary { background: var(--arpm-accent); color: #fff; }
.arpm-btn-primary:hover { background: var(--arpm-accent-dark); color: #fff; }
.arpm-btn-secondary { background: #fff; color: var(--arpm-accent); border-color: var(--arpm-accent); }
.arpm-btn-ghost { background: transparent; color: var(--arpm-muted); border-color: var(--arpm-border); }
.arpm-btn-sm { padding: 6px 12px; font-size: 13px; }

.arpm-status-badge { display: inline-block; padding: 4px 10px; border-radius: 100px; font-size: 13px; font-weight: 600; }
.arpm-status-pending { background: #fef3c7; color: #92400e; }
.arpm-status-arpm_review { background: #dbeafe; color: #1e40af; }
.arpm-status-publish { background: #dcfce7; color: #166534; }
.arpm-status-arpm_rejected { background: #fee2e2; color: #991b1b; }
.arpm-status-draft { background: #e5e7eb; color: #374151; }

.arpm-filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: end;
	background: var(--arpm-bg-soft);
	padding: 16px;
	border-radius: 8px;
	margin-bottom: 24px;
}
.arpm-filter-row label { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; gap: 4px; margin: 0; }
.arpm-filter-row select { padding: 8px 10px; border-radius: 6px; border: 1px solid var(--arpm-border); }

.arpm-article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.arpm-article-card { border: 1px solid var(--arpm-border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.arpm-card-thumb { display: block; }
.arpm-card-thumb img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.arpm-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.arpm-card-title { margin: 0; }
.arpm-card-title a { color: var(--arpm-ink); text-decoration: none; font-size: 17px; font-family: Georgia, "Times New Roman", serif; }
.arpm-card-authors { color: var(--arpm-muted); font-size: 13px; margin: 0; }
.arpm-card-badges { margin: 0; }
.arpm-badge { display: inline-block; background: var(--arpm-bg-soft); border: 1px solid var(--arpm-border); border-radius: 100px; padding: 2px 10px; font-size: 12px; margin-right: 6px; color: var(--arpm-muted); }
.arpm-card-excerpt { font-size: 13.5px; color: #444; flex: 1; margin: 0; }
.arpm-card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }

.arpm-cite-wrap { display: inline-block; position: relative; }
.arpm-cite-panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 6px);
	left: 0;
	width: 340px;
	max-width: 90vw;
	background: #fff;
	border: 1px solid var(--arpm-border);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 14px;
	text-align: left;
}
.arpm-cite-row { display: block; margin-bottom: 12px; }
.arpm-cite-row:last-child { margin-bottom: 0; }
.arpm-cite-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--arpm-muted); margin-bottom: 4px; }
.arpm-cite-text { display: block; font-size: 13px; line-height: 1.5; margin: 0 0 6px; }

.arpm-toc-heading { font-family: Georgia, serif; }
.arpm-toc-list,
.arpm-toc-list-full { list-style: none; margin: 0; padding: 0; }
.arpm-toc-list li { margin-bottom: 6px; }
.arpm-toc-pages { color: var(--arpm-muted); font-size: 12px; }
.arpm-toc-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--arpm-border); }
.arpm-toc-thumb img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; display: block; }
.arpm-toc-title { font-weight: 700; text-decoration: none; color: var(--arpm-ink); font-family: Georgia, serif; display: inline-block; }
.arpm-toc-authors { color: var(--arpm-muted); font-size: 13px; margin: 2px 0 8px; }
.arpm-toc-actions { display: flex; gap: 8px; }

.arpm-single-details { border-top: 1px solid var(--arpm-border); margin-top: 24px; padding-top: 20px; }
.arpm-cover-image { margin: 0 0 16px; }
.arpm-cover-image img { max-width: 320px; border-radius: 8px; display: block; }
.arpm-meta-list { list-style: none; padding: 0; margin: 0 0 16px; }
.arpm-meta-list li { padding: 4px 0; font-size: 14.5px; }
.arpm-single-actions { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; }
.arpm-toc-box { background: var(--arpm-bg-soft); border-radius: 8px; padding: 16px 18px; }

.arpm-pagination { margin-top: 24px; display: flex; gap: 6px; flex-wrap: wrap; }
.arpm-pagination a,
.arpm-pagination span { padding: 6px 12px; border: 1px solid var(--arpm-border); border-radius: 6px; text-decoration: none; color: var(--arpm-ink); }
.arpm-pagination span.current { background: var(--arpm-accent); color: #fff; border-color: var(--arpm-accent); }

@media (max-width: 600px) {
	.arpm-cite-panel { left: auto; right: 0; }
}
