/**
 * Visual presentation for the plugin's ijms/* Gutenberg blocks.
 *
 * The plugin (assets/blocks/frontend.css) supplies only structural,
 * unbranded CSS. This file supplies the theme's typography, color, and
 * spacing on top of that same set of class names — the theme never
 * duplicates the plugin's render logic, only its presentation.
 *
 * @package IJMS_Professional
 */

.ijms-block__heading {
	color: var( --ijms-heading );
	font-weight: 700;
}

.ijms-block__empty {
	border-color: var( --ijms-secondary );
	color: var( --ijms-text );
	border-radius: 8px;
	background: color-mix( in srgb, var( --ijms-bg ) 60%, transparent );
}

.ijms-block__cta {
	background: var( --ijms-primary );
	color: #fff;
	border-radius: 6px;
	font-weight: 600;
	transition: background-color 0.15s ease-in-out;
}

.ijms-block__cta:hover,
.ijms-block__cta:focus {
	background: var( --ijms-secondary );
}

.ijms-block__grid > li {
	background: #fff;
	border: 1px solid color-mix( in srgb, var( --ijms-secondary ) 25%, transparent );
	border-radius: 8px;
	padding: 1.25em;
}

/* Client feedback, 2026-08-07: as more articles publish, "Latest Articles"
   just kept adding rows and growing the homepage's overall length
   indefinitely. First capped with a scroll box, then replaced (client
   follow-up feedback, same day) with a proper horizontal slideshow so all
   the latest articles are reachable without the page (or an inner scroll
   area) growing -- scoped to this one block since .ijms-block__grid is
   shared by other, differently-sized blocks (journal-statistics,
   editorial-board) that shouldn't be affected. */
.ijms-block-latest-articles {
	position: relative;
}

.ijms-block__heading-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.ijms-carousel__controls {
	display: flex;
	flex: none;
	gap: 8px;
}

.ijms-carousel__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var( --line );
	border-radius: 50%;
	background: var( --white );
	color: var( --ijms-primary );
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.ijms-carousel__btn:hover:not(:disabled) {
	background: var( --ijms-primary );
	border-color: var( --ijms-primary );
	color: var( --white );
}

.ijms-carousel__btn:disabled {
	opacity: .35;
	cursor: default;
}

.ijms-carousel__counter {
	min-width: 40px;
	color: var( --muted );
	font-size: .8rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.ijms-block-latest-articles .ijms-block__grid {
	display: flex;
	flex-wrap: nowrap;
	gap: 20px;
	margin: 18px 0 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.ijms-block-latest-articles .ijms-block__grid::-webkit-scrollbar {
	display: none;
}

@media ( prefers-reduced-motion: no-preference ) {
	.ijms-block-latest-articles .ijms-block__grid {
		scroll-behavior: smooth;
	}
}

.ijms-block-latest-articles .ijms-block__grid > li {
	flex: 0 0 calc( ( 100% - 40px ) / 3 );
	padding-block: 1.375em;
	scroll-snap-align: start;
}

@media ( max-width: 700px ) {
	.ijms-block-latest-articles .ijms-block__grid > li {
		flex-basis: 100%;
	}
}

/* Client feedback, 2026-08-07: drop the slide dots and the author byline
   in this carousel specifically -- article_card()'s author line stays for
   every other context (Table of Contents, search, Featured) since this
   only targets the Latest Articles block's own cards. */
.ijms-block-latest-articles .iisjm-public-article-card p {
	display: none;
}

.ijms-block-latest-articles .iisjm-public-article-card__meta span {
	font-size: .72rem;
}

.ijms-block-latest-articles .iisjm-public-article-card h3 {
	font-size: 1rem;
}

.ijms-block-editorial-board__member img {
	border-radius: 50%;
	width: 96px;
	height: 96px;
	object-fit: cover;
	margin-bottom: 0.5em;
}

.ijms-block-editorial-board__role {
	color: var( --ijms-accent );
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.8em;
	letter-spacing: 0.04em;
}

.ijms-block-journal-statistics .ijms-block__grid > li {
	text-align: center;
}

.ijms-block-journal-statistics .ijms-block__grid strong {
	display: block;
	font-size: 2em;
	color: var( --ijms-primary );
}

.ijms-block-journal-search input[type='search'] {
	border: 1px solid var( --ijms-secondary );
	border-radius: 6px;
	padding: 0.6em;
}
