/* ------------------------------------------------------------------
   Article sections (publications, Stud Book Times, announcements, events)

   Loaded after css/style.css from scripts/top.php. Everything here is scoped
   to the .art-* classes used by the inc/article-*.php partials, so it cannot
   affect the rest of the site.
   ------------------------------------------------------------------ */

/* Keyboard skip link - visible only while focused (Bootstrap's
   .sr-only-focusable handles the reveal; this positions it). */
.skip-link:focus {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2000;
	padding: .75rem 1rem;
	background: #fff;
	color: #212529;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

/* Bootstrap 4 suppresses the outline in places; make focus unmistakable. */
.art-card a:focus,
.art-chip:focus,
.art-share .btn:focus,
.pagination .page-link:focus {
	outline: 2px solid #0056b3;
	outline-offset: 2px;
}

/* ---------------- Toolbar ---------------- */

.art-toolbar .form-control,
.art-toolbar .custom-select {
	height: calc(1.5em + 1rem + 2px);
}

.art-toolbar .input-group-text {
	border-right: 0;
}

/* ---------------- Cards ---------------- */

.art-card {
	border: 0;
	border-radius: .35rem;
	overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}

.art-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
}

/* Fixed 3:2 box so rows of cards line up even when the source images are
   wildly different shapes. */
.art-card__media {
	display: block;
	position: relative;
	padding-top: 66.66%;
	overflow: hidden;
	background: #eef0f2;
}

.art-card__img,
.art-card__placeholder {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.art-card__img {
	object-fit: cover;
}

/* Shown when COVER_IMAGE_URL is empty or the file is missing. A tinted block
   with initials reads as designed; a row of identical grey boxes does not. */
.art-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e9edf0;
	color: #6c757d;
}

.art-card__initial {
	font-size: 2.25rem;
	font-weight: 700;
	letter-spacing: .05em;
	opacity: .85;
}

.art-card__placeholder .fas {
	position: absolute;
	right: .75rem;
	bottom: .6rem;
	font-size: 1.1rem;
	opacity: .5;
}

.art-card__placeholder--publication  { background: #e6eef7; color: #33608f; }
.art-card__placeholder--sasb-times   { background: #e9f2ea; color: #3c7048; }
.art-card__placeholder--announcement { background: #fbf0e4; color: #93601f; }
.art-card__placeholder--event        { background: #f2e9f3; color: #6f3f77; }

.art-card .card-title a {
	color: #212529;
}

.art-card .card-title a:hover {
	color: #007bff;
}

.art-card__foot .far,
.art-card__foot .fas {
	opacity: .7;
}

/* ---------------- Tag chips ---------------- */

/* Bootstrap badges are ~18px tall, well under a usable tap target. */
.art-chip {
	display: inline-block;
	padding: .4rem .7rem;
	margin: 0 .25rem .35rem 0;
	font-size: .75rem;
	font-weight: 500;
	line-height: 1.2;
	border-radius: 2rem;
	color: #495057;
	background-color: #fff;
}

a.art-chip:hover {
	background-color: #f1f3f5;
	color: #212529;
	text-decoration: none;
}

.art-chip--active {
	color: #fff;
}

.art-chip__x {
	color: inherit;
	margin-left: .35rem;
	font-weight: 700;
	text-decoration: none;
}

/* ---------------- Sidebar widgets ---------------- */

.sidebar-wrap .sidebar-widget h2 {
	margin-bottom: 1rem;
}

@media (min-width: 992px) {
	.sidebar-wrap {
		position: sticky;
		top: 1.5rem;
	}
}

/* ---------------- Article body ---------------- */

.art-meta {
	font-size: .9rem;
}

.art-body {
	font-size: 1.0625rem;
	line-height: 1.75;
	max-width: 68ch;
}

.art-body p {
	margin-bottom: 1.25rem;
}

.art-body h2 {
	margin-top: 2rem;
	font-size: 1.5rem;
}

.art-body h3 {
	margin-top: 1.5rem;
	font-size: 1.25rem;
}

.art-body img {
	max-width: 100%;
	height: auto;
}

.art-body table {
	display: block;
	width: 100%;
	overflow-x: auto;
}

/* ---------------- Download call to action ---------------- */

.art-download {
	border: 1px solid #d6e0ea;
	border-left: 4px solid #007bff;
	background: #f8fafc;
}

.art-download__icon {
	color: #c0392b;
}

.art-download .text-break {
	word-break: break-all;
}

/* ---------------- Share row ---------------- */

.art-share .btn {
	min-width: 2.4rem;
	margin-right: .25rem;
	margin-bottom: .25rem;
}

/* ---------------- Prev / next ---------------- */

.art-pager a {
	color: #212529;
	text-decoration: none;
	border: 1px solid #e9ecef;
}

.art-pager a:hover {
	border-color: #007bff;
	color: #007bff;
}

/* ---------------- Breadcrumb ---------------- */

.breadcrumb .breadcrumb-item.active {
	max-width: 45vw;
}

@media (max-width: 575.98px) {
	.breadcrumb .breadcrumb-item.active {
		max-width: 60vw;
	}
}
