/**
 * SmartBook List — frontend card styles.
 * Colors are driven by --sbl-accent and --sbl-title (set in Settings).
 */

.sbl-list {
	display: flex;
	flex-direction: column;
	gap: 32px;
	margin: 0 auto;
}

.sbl-list__title {
	margin: 0 0 8px;
}

/* Cards wrapper */
.sbl-list__items {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

/* Search */
.sbl-list__search {
	margin: 0;
}

.sbl-list__search-input {
	width: 100%;
	max-width: 480px;
	padding: 13px 18px;
	font-size: 15px;
	line-height: 1.4;
	color: #334155;
	background: #fff;
	border: 1px solid #dbe3ec;
	border-radius: 10px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sbl-list__search-input:focus {
	outline: none;
	border-color: var(--sbl-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sbl-accent) 25%, transparent);
}

.sbl-list__empty {
	margin: 0;
	font-size: 15px;
	color: #64748b;
}

/* Pagination */
.sbl-list__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.sbl-list__page {
	min-width: 42px;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sbl-title);
	background: #fff;
	border: 1px solid #dbe3ec;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.sbl-list__page:hover:not(:disabled):not([aria-current="page"]) {
	border-color: var(--sbl-accent);
	transform: translateY(-1px);
}

.sbl-list__page[aria-current="page"] {
	background: var(--sbl-accent);
	border-color: var(--sbl-accent);
	color: #0e2a47;
	cursor: default;
}

.sbl-list__page:disabled {
	opacity: 0.45;
	cursor: default;
}

.sbl-list__count {
	margin-left: auto;
	font-size: 13.5px;
	color: #64748b;
}

@media (max-width: 600px) {
	.sbl-list__count {
		flex-basis: 100%;
		margin-left: 0;
	}
}

/* Card shell */
/* Fallback colors — the values chosen in Settings are printed after this
   stylesheet as an inline :root rule, which overrides these defaults. */
:root {
	--sbl-accent: #d9a419;
	--sbl-title: #0e2a47;
}

.sbl-card {
	display: flex;
	align-items: flex-start;
	gap: 56px;
	background: #fff;
	border: 1px solid #e6ebf2;
	border-radius: 18px;
	padding: 48px 56px;
	box-shadow: 0 2px 6px rgba(14, 42, 71, 0.04);
	box-sizing: border-box;
	margin: 0 auto;
	max-width: 1460px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.sbl-card--cover-right {
	flex-direction: row-reverse;
}

/* Cover */
.sbl-card__cover {
	flex: 0 0 290px;
	max-width: 290px;
}

.sbl-card__img,
.sbl-card__placeholder {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 2px;
	box-shadow: 22px 24px 42px rgba(14, 42, 71, 0.28);
}

.sbl-card__placeholder {
	aspect-ratio: 2 / 3;
	background: linear-gradient(160deg, #31587e 0%, #0e2a47 70%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.sbl-card__placeholder span {
	color: #fff;
	font-size: 26px;
	font-weight: 800;
	text-transform: uppercase;
	text-align: center;
	line-height: 1.25;
	letter-spacing: 0.04em;
}

/* Body */
.sbl-card__body {
	flex: 1;
	min-width: 0;
}

.sbl-card__eyebrow {
	display: block;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--sbl-accent);
	margin-bottom: 6px;
}

.sbl-card__title {
	font-size: clamp(28px, 4vw, 46px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: 0.02em;
	color: var(--sbl-title);
	margin: 0 0 14px;
}

.sbl-card__subtitle {
	font-size: clamp(16px, 2vw, 21px);
	font-weight: 700;
	line-height: 1.4;
	color: var(--sbl-accent);
	margin: 0 0 18px;
}

.sbl-card__meta {
	font-size: 15px;
	color: #64748b;
	margin: 0 0 20px;
}

.sbl-card__meta strong {
	color: #0f172a;
	font-weight: 700;
}

.sbl-card__dot {
	margin: 0 8px;
	color: #94a3b8;
}

.sbl-card__desc {
	font-size: 16.5px;
	line-height: 1.75;
	color: #5b6b7f;
	margin: 0 0 24px;
}

.sbl-card__desc p {
	margin: 0 0 16px;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

.sbl-card__desc p:last-child {
	margin-bottom: 0;
}

/* Badges */
.sbl-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
}

.sbl-card__badges li {
	background: #eef2f7;
	color: var(--sbl-title);
	font-size: 13.5px;
	font-weight: 600;
	padding: 8px 18px;
	border-radius: 999px;
	margin: 0;
	line-height: 1.3;
}

/* Button */
.sbl-card__btn {
	display: inline-block;
	background: var(--sbl-accent);
	color: #0e2a47;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 15px 30px;
	border-radius: 8px;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.sbl-card__btn:hover,
.sbl-card__btn:focus {
	filter: brightness(0.94);
	transform: translateY(-1px);
	color: #0e2a47;
	text-decoration: none;
}

.sbl-card__btn--secondary {
	background: transparent;
	color: var(--sbl-title);
	box-shadow: inset 0 0 0 2px var(--sbl-accent);
}

.sbl-card__btn--secondary:hover,
.sbl-card__btn--secondary:focus {
	background: var(--sbl-accent);
	color: #0e2a47;
}

/* Responsive */
@media (max-width: 860px) {
	.sbl-card {
		flex-direction: column;
		gap: 32px;
		padding: 32px 28px;
	}

	.sbl-card--cover-right {
		flex-direction: column;
	}

	.sbl-card__cover {
		flex: none;
		max-width: 240px;
		margin: 0 auto;
	}

	.sbl-card__img,
	.sbl-card__placeholder {
		box-shadow: 12px 14px 28px rgba(14, 42, 71, 0.25);
	}
}
