/**
 * ABE Student Dashboard – public resource grid styles
 */

.abe-sd-section-heading {
	margin: 0 0 16px;
	padding: 0;
	text-align: left;
	font-weight: 700;
	font-size: 1.25em;
	line-height: 1.3;
	color: inherit;
}

.abe-sd-resources-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
	align-items: stretch;
	margin: 0 0 1em;
	box-sizing: border-box;
}

.abe-sd-resources-grid *,
.abe-sd-resources-grid *::before,
.abe-sd-resources-grid *::after {
	box-sizing: border-box;
}

.abe-sd-resource-box {
	background: #fff;
	border-style: solid;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.abe-sd-box-title-wrap {
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.abe-sd-box-title {
	margin: 0;
	font-weight: 600;
	line-height: 1.3;
}

.abe-sd-box-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.abe-sd-box-links li {
	margin: 0 0 6px;
	padding: 0;
}

.abe-sd-box-links li:last-child {
	margin-bottom: 0;
}

.abe-sd-box-links a {
	text-decoration: none;
	display: block;
	padding: 3px 0;
	line-height: 1.4;
	word-break: break-word;
}

.abe-sd-box-links a:hover,
.abe-sd-box-links a:focus {
	text-decoration: underline;
}

.abe-sd-notice {
	padding: 14px 18px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	margin: 1em 0;
}

.abe-sd-notice p {
	margin: 0;
}

.abe-sd-notice-info {
	background: #f0f9ff;
	border-color: #bae6fd;
	color: #0c4a6e;
}

@media (max-width: 600px) {
	.abe-sd-resources-grid {
		grid-template-columns: 1fr;
	}
}

/* Title row + bookmark control */
.abe-sd-box-title-wrap {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}
.abe-sd-box-title-wrap .abe-sd-box-title {
	flex: 1;
	min-width: 0;
}
.abe-sd-bm-btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 4px 8px;
	border: 1px solid rgba(37, 99, 235, 0.45);
	border-radius: 6px;
	background: #eff6ff;
	color: #2563eb;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.abe-sd-bm-btn:hover,
.abe-sd-bm-btn:focus {
	background: #dbeafe;
	border-color: #2563eb;
	color: #1d4ed8;
	box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
	outline: none;
}
.abe-sd-bm-btn.is-bookmarked {
	background: #2563eb;
	border-color: #1d4ed8;
	color: #fff;
}
.abe-sd-bm-btn.is-bookmarked:hover,
.abe-sd-bm-btn.is-bookmarked:focus {
	background: #1d4ed8;
	border-color: #1e40af;
	color: #fff;
	box-shadow: 0 1px 3px rgba(29, 78, 216, 0.35);
}
.abe-sd-bm-btn.is-loading {
	opacity: 0.6;
	cursor: wait;
}
.abe-sd-bm-icon {
	font-size: 14px;
	line-height: 1;
}

/* Bookmarks page */
.abe-sd-bm-title {
	margin-left: 0;
	margin-right: 0;
	padding: 0;
	text-align: left;
	font-size: 1.25em;
	line-height: 1.3;
	color: inherit;
}
.abe-sd-bm-add-wrap {
	margin: 0 0 16px;
}
.abe-sd-bm-add-btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 6px;
	background: #2563eb;
	color: #fff !important;
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	border: none;
	cursor: pointer;
}
.abe-sd-bm-add-btn:hover,
.abe-sd-bm-add-btn:focus {
	background: #1d4ed8;
	color: #fff !important;
}
.abe-sd-bm-empty {
	margin: 0 0 1em;
	color: #64748b;
	font-size: 14px;
}

/* Books grid */
.abe-sd-books-page-title {
	margin-left: 0;
	margin-right: 0;
	padding: 0;
	text-align: left;
	font-size: 1.25em;
	line-height: 1.3;
}
.abe-sd-books-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
}
.abe-sd-books-filter label {
	font-weight: 600;
	font-size: 14px;
}
.abe-sd-book-cat-select {
	min-width: 200px;
	max-width: 100%;
	padding: 6px 10px;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	background: #fff;
}
.abe-sd-books-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 20px;
	align-items: stretch;
	margin: 0 0 1em;
}
.abe-sd-book-card {
	border-style: solid;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-sizing: border-box;
}
.abe-sd-book-cover {
	width: 100%;
	aspect-ratio: 2 / 3;
	background: #f1f5f9;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 10px;
}
.abe-sd-book-cover-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.abe-sd-book-cover-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(145deg, #e2e8f0, #f8fafc);
}
.abe-sd-book-title {
	margin: 0 0 6px;
	font-weight: 600;
	line-height: 1.3;
}
.abe-sd-book-cost {
	margin: 0 0 6px;
	font-weight: 500;
}
.abe-sd-book-stars {
	margin: 0 0 10px;
	letter-spacing: 2px;
	font-size: 18px;
	line-height: 1;
	display: flex;
	align-items: center;
	gap: 2px;
}
.abe-sd-star {
	display: inline-block;
	position: relative;
	width: 1em;
	height: 1em;
	line-height: 1;
	vertical-align: middle;
	text-align: center;
}
.abe-sd-star-full {
	/* color from dynamic .abe-sd-book-stars */
}
.abe-sd-star-empty {
	opacity: 0.35;
}
/* True half-star: empty glyph underneath, full glyph clipped to 50% */
.abe-sd-star-half {
	position: relative;
	display: inline-block;
	width: 1em;
	height: 1em;
}
.abe-sd-star-half-empty {
	display: block;
	opacity: 0.35;
	line-height: 1;
}
.abe-sd-star-half-fill {
	position: absolute;
	left: 0;
	top: 0;
	width: 50%;
	height: 100%;
	overflow: hidden;
	line-height: 1;
	pointer-events: none;
}
.abe-sd-star-half-fill {
	/* inherits star color from parent .abe-sd-book-stars */
}
.abe-sd-book-buy {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: auto;
}
.abe-sd-book-buy a {
	display: block;
	text-align: center;
	text-decoration: none;
	padding: 8px 10px;
	border-radius: 6px;
	font-weight: 600;
	line-height: 1.2;
}
.abe-sd-book-buy a:hover,
.abe-sd-book-buy a:focus {
	filter: brightness(0.92);
	text-decoration: none;
}
@media (max-width: 600px) {
	.abe-sd-books-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}
}

/* Support / Custom Text */
.abe-sd-support-page {
	margin: 0 0 1em;
}
.abe-sd-support-block {
	margin: 0;
}
.abe-sd-support-title {
	padding: 0;
	line-height: 1.3;
	text-align: left;
}
.abe-sd-support-body {
	margin: 0 0 8px;
	line-height: 1.6;
	color: inherit;
}
.abe-sd-support-body p {
	margin: 0 0 0.75em;
}
.abe-sd-support-body p:last-child {
	margin-bottom: 0;
}
