/* ═══════════════════════════════════════════════════════════
   NJT Journals Pro — frontend
   Palette follows the Studera light theme used by NJT Journals:
   black text, grey rules, #F2F2F2 bands, pink accent.
   ═══════════════════════════════════════════════════════════ */

.njtp-dash,
.njtp-subs,
.njtp-paywall,
.njtp-banner,
.njtp-box {
	--njtp-ink: #1a1a1a;
	--njtp-body: #333;
	--njtp-muted: #777;
	--njtp-line: #e6e6e6;
	--njtp-band: #f2f2f2;
	--njtp-accent: #c5247a;
	--njtp-ok: #1f7a4d;
	--njtp-warn: #a8410a;
	--njtp-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
    --njtp-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ─────────── Shared bits ─────────── */

.njtp-muted { color: var(--njtp-muted); }

.njtp-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border: 1px solid var(--njtp-ink);
	border-radius: 2px;
	background: transparent;
	color: var(--njtp-ink);
	font-family: var(--njtp-sans);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.njtp-btn:hover,
.njtp-btn:focus {
	background: var(--njtp-ink);
	color: #fff;
	text-decoration: none;
}

.njtp-btn-primary {
	background: var(--njtp-ink);
	color: #fff;
}
.njtp-btn-primary:hover,
.njtp-btn-primary:focus {
	background: var(--njtp-accent);
	border-color: var(--njtp-accent);
	color: #fff;
}

.njtp-btn-ghost {
	background: transparent;
	border-color: var(--njtp-line);
	color: var(--njtp-body);
}
.njtp-btn-ghost:hover,
.njtp-btn-ghost:focus {
	border-color: var(--njtp-ink);
	background: var(--njtp-ink);
	color: #fff;
}

.njtp-btn-small {
	padding: 7px 14px;
	font-size: 13px;
}

.njtp-price {
	font-weight: 400;
	opacity: .85;
}
.njtp-price del { display: none; }

.njtp-link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--njtp-accent);
	font-family: var(--njtp-sans);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}
.njtp-link:hover { text-decoration: underline; }
.njtp-link-danger { color: #a11; }

.njtp-pill {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-family: var(--njtp-sans);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}
.njtp-pill-ok   { background: #e8f4ee; color: var(--njtp-ok); }
.njtp-pill-warn { background: #fdeeee; color: #a11; }
.njtp-pill-soon { background: #fdf1e3; color: var(--njtp-warn); }

.njtp-box {
	padding: 16px 18px;
	border: 1px solid var(--njtp-line);
	border-left: 3px solid var(--njtp-muted);
	background: var(--njtp-band);
	font-family: var(--njtp-sans);
	font-size: 14px;
	color: var(--njtp-body);
	margin: 0 0 24px;
}
.njtp-box p { margin: 0 0 8px; }
.njtp-box p:last-child { margin-bottom: 0; }
.njtp-box-ok   { border-left-color: var(--njtp-ok); }
.njtp-box-warn { border-left-color: var(--njtp-warn); }
.njtp-box-info { border-left-color: var(--njtp-accent); }

/* ─────────── Access banner on the issue page ─────────── */

.njtp-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	margin: 0 0 28px;
	border: 1px solid var(--njtp-line);
	background: var(--njtp-band);
	font-family: var(--njtp-sans);
	font-size: 14px;
	color: var(--njtp-body);
}
.njtp-banner svg { flex: 0 0 auto; }
.njtp-banner-ok {
	border-left: 3px solid var(--njtp-ok);
	color: var(--njtp-ok);
}

/* ─────────── Paywall box ─────────── */

.njtp-paywall {
	padding: 22px 20px;
	border: 1px solid var(--njtp-line);
	background: var(--njtp-band);
	font-family: var(--njtp-sans);
	text-align: left;
}
.njtp-paywall-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--njtp-line);
	color: var(--njtp-accent);
}
.njtp-paywall-title {
	margin: 0 0 8px;
	font-family: var(--njtp-serif);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--njtp-ink);
}
.njtp-paywall-text {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--njtp-body);
}
.njtp-paywall .njtp-btn { margin: 10px 6px 8px 0; }
.njtp-paywall-alt {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--njtp-muted);
}
.njtp-paywall-alt a { color: var(--njtp-accent); }

.njtp-side-buy { padding: 0; border: 0; }

/* ─────────── Locked rows in the table of contents ─────────── */

.njtp-lock {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--njtp-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--njtp-muted);
	text-transform: uppercase;
}
.njtp-soon {
	font-family: var(--njtp-sans);
	font-size: 12px;
	color: var(--njtp-muted);
	font-style: italic;
}
.njtj-toc-row.njtp-locked .njtj-toc-title { color: var(--njtp-body); }

/* ─────────── Cards used by both dashboards ─────────── */

.njtp-card {
	padding: 24px;
	margin: 0 0 26px;
	border: 1px solid var(--njtp-line);
	background: #fff;
	font-family: var(--njtp-sans);
}
.njtp-card-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--njtp-line);
	font-family: var(--njtp-serif);
	font-size: 18px;
	font-weight: 600;
	color: var(--njtp-ink);
}
.njtp-count {
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--njtp-band);
	font-family: var(--njtp-sans);
	font-size: 12px;
	font-weight: 600;
	color: var(--njtp-muted);
}

/* ─────────── Institution dashboard header ─────────── */

.njtp-dash-head {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-start;
	justify-content: space-between;
	padding: 0 0 22px;
	margin: 0 0 26px;
	border-bottom: 2px solid var(--njtp-ink);
}
.njtp-dash-title {
	margin: 0 0 6px;
	font-family: var(--njtp-serif);
	font-size: 28px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--njtp-ink);
}
.njtp-dash-sub {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-family: var(--njtp-sans);
	font-size: 13px;
	color: var(--njtp-muted);
}

.njtp-seats {
	min-width: 190px;
	font-family: var(--njtp-sans);
}
.njtp-seats-count {
	display: block;
	font-size: 26px;
	font-weight: 700;
	line-height: 1;
	color: var(--njtp-ink);
}
.njtp-seats-label {
	display: block;
	margin: 4px 0 8px;
	font-size: 12px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--njtp-muted);
}
.njtp-seats-bar {
	height: 6px;
	background: var(--njtp-line);
	overflow: hidden;
}
.njtp-seats-bar i {
	display: block;
	height: 100%;
	background: var(--njtp-accent);
	transition: width .3s ease;
}

/* ─────────── Licence list ─────────── */

.njtp-lic-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.njtp-lic-list li {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: baseline;
	justify-content: space-between;
	padding: 11px 0;
	border-bottom: 1px solid var(--njtp-line);
	font-size: 14px;
}
.njtp-lic-list li:last-child { border-bottom: 0; }
.njtp-lic-list a {
	color: var(--njtp-ink);
	font-weight: 600;
	text-decoration: none;
}
.njtp-lic-list a:hover { color: var(--njtp-accent); }
.njtp-lic-meta { font-size: 13px; color: var(--njtp-muted); }
.njtp-lic-meta.is-expired { color: #a11; font-weight: 600; }

/* ─────────── Forms ─────────── */

.njtp-form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: flex-end;
}
.njtp-form-row label {
	flex: 1 1 200px;
	min-width: 0;
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--njtp-body);
}
.njtp-form-row label span {
	display: block;
	margin-bottom: 6px;
}
.njtp-form-row input[type="text"],
.njtp-form-row input[type="email"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--njtp-line);
	border-radius: 2px;
	background: #fff;
	font-family: var(--njtp-sans);
	font-size: 14px;
	font-weight: 400;
	color: var(--njtp-ink);
}
.njtp-form-row input:focus {
	outline: none;
	border-color: var(--njtp-accent);
}
.njtp-help {
	margin: 12px 0 0;
	font-size: 12px;
	color: var(--njtp-muted);
}

/* ─────────── Tables ─────────── */

.njtp-table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--njtp-sans);
	font-size: 14px;
}
.njtp-table th {
	padding: 10px 12px 10px 0;
	border-bottom: 1px solid var(--njtp-ink);
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--njtp-muted);
}
.njtp-table td {
	padding: 14px 12px 14px 0;
	border-bottom: 1px solid var(--njtp-line);
	vertical-align: middle;
	color: var(--njtp-body);
}
.njtp-table tr.is-expired td { opacity: .7; }
.njtp-table .njtp-actions {
	display: flex;
	gap: 14px;
	align-items: center;
	justify-content: flex-end;
	border-bottom: 1px solid var(--njtp-line);
}
.njtp-table .njtp-actions form { margin: 0; }

.njtp-issue-link {
	color: var(--njtp-ink);
	font-weight: 600;
	text-decoration: none;
}
.njtp-issue-link:hover { color: var(--njtp-accent); }
.njtp-sub {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	color: var(--njtp-muted);
}

/* ═══════════════════════════════════════════════════════════
   Responsive — descending order, widest first
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 782px) {
	.njtp-dash-head {
		flex-direction: column;
		gap: 18px;
	}
	.njtp-seats { width: 100%; }
	.njtp-card { padding: 20px 16px; }
	.njtp-dash-title { font-size: 23px; }
}

@media (max-width: 600px) {
	/* Tables become stacked cards so nothing overflows the viewport. */
	.njtp-table,
	.njtp-table tbody,
	.njtp-table tr,
	.njtp-table td { display: block; width: 100%; }

	.njtp-table thead { display: none; }

	.njtp-table tr {
		padding: 14px 0;
		border-bottom: 1px solid var(--njtp-line);
	}
	.njtp-table td {
		padding: 4px 0;
		border: 0;
	}
	.njtp-table td[data-label]:not([data-label=""])::before {
		content: attr(data-label) ": ";
		font-size: 11px;
		font-weight: 700;
		letter-spacing: .05em;
		text-transform: uppercase;
		color: var(--njtp-muted);
	}
	.njtp-table .njtp-actions {
		justify-content: flex-start;
		margin-top: 8px;
		border: 0;
	}

	.njtp-form-row { flex-direction: column; align-items: stretch; }
	.njtp-form-row .njtp-btn { justify-content: center; }

	.njtp-paywall { padding: 18px 16px; }
	.njtp-paywall .njtp-btn {
		width: 100%;
		justify-content: center;
		margin-right: 0;
	}

	.njtp-lic-list li { flex-direction: column; gap: 4px; }
}

/* Access term shown under the buy button */
.njtp-term {
	margin: 4px 0 0;
	font-family: var(--njtp-sans);
	font-size: 12px;
	color: var(--njtp-muted);
}

/* Inline lock used in compact chapter lists */
.njtp-lock-inline {
	gap: 0;
	padding: 2px 4px;
	color: #999;
}
