/**
 * Community Library archive (/library/) — VISUAL / BRAND layer (theme-owned).
 *
 * Design tokens + all brand styling for the community library archive. Edit this
 * file to reskin /library/ without touching the plugin. The structural skeleton
 * (grid/flex, gutters, filter-bar layout, JS hide utility) lives in the plugin:
 *   web/app/plugins/vmt-resource-library/assets/css/library.css
 * This file is enqueued AFTER that one (dependency + priority 20 in functions.php)
 * so these declarations win. Selector names match the plugin's exactly.
 *
 * Palette values are copied from the warm VMT look so the community library reads
 * as part of the same family as the Reading Guide, WITHOUT sharing CSS with the
 * Reading Guide module (.vmt-rl-lib-* is independent of .vmt-rg-*).
 */

.vmt-rl-lib {
	--lib-teal: #0d6976;
	--lib-teal-dark: #0a525c;
	--lib-gold-deep: #a86d10;
	--lib-gold-tint: rgba(204, 134, 20, 0.12);
	--lib-cream: #f6f1e8;
	--lib-card: #fffdf8;
	--lib-ink: #2c2824;
	--lib-muted: #7a7266;
	--lib-line: #e6ddcc;
	--lib-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
	--lib-radius: 10px;
	--lib-shadow-sm: 0 2px 8px rgba(120, 92, 45, 0.09);
	--lib-shadow: 0 8px 26px rgba(120, 92, 45, 0.16);
	color: #45403a;
	font-size: 16px;
}

body.vmt-rl-lib-body { background-color: #f6f1e8; }

/* Green top bar */
.vmt-rl-lib__topbar { background-color: #0d6976; }
.vmt-rl-lib__topbar-inner { padding: 34px 24px 26px; }
.vmt-rl-lib__title { color: #fff; font-weight: 700; font-size: 40px; line-height: 1.1; margin: 0; }
.vmt-rl-lib__crumb { color: rgba(255,255,255,0.82); font-size: 14px; text-decoration: none; }
.vmt-rl-lib__crumb:hover { color: #fff; }

.vmt-rl-lib__wrap { padding: 40px 24px 72px; }

/* Filter bar */
.vmt-rl-lib__filters { margin-bottom: 24px; }
.vmt-rl-lib__search,
.vmt-rl-lib__filter {
	font-size: 15px; padding: 9px 12px; border: 1px solid var(--lib-line);
	border-radius: 8px; background: #fff; color: var(--lib-ink);
}
.vmt-rl-lib__search:focus,
.vmt-rl-lib__filter:focus { outline: 2px solid var(--lib-teal); outline-offset: 1px; border-color: var(--lib-teal); }

/* Cards */
.vmt-rl-lib__card-link {
	background: var(--lib-card); border: 1px solid var(--lib-line);
	border-radius: var(--lib-radius); box-shadow: var(--lib-shadow-sm);
	color: inherit; padding: 18px 18px 16px; gap: 8px;
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.vmt-rl-lib__card-link:hover { box-shadow: var(--lib-shadow); transform: translateY(-4px); border-color: #ddd2bd; }
.vmt-rl-lib__badge {
	font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	color: var(--lib-teal-dark); background: rgba(13,105,118,.09);
	padding: 2px 9px; border-radius: 999px; margin-bottom: 2px;
}
.vmt-rl-lib__card-title { font-family: var(--lib-serif); font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--lib-ink); }
.vmt-rl-lib__card-desc { font-size: 14px; line-height: 1.55; color: #55504a; }
.vmt-rl-lib__card-foot { padding-top: 6px; font-size: 13px; }
.vmt-rl-lib__topic { color: var(--lib-gold-deep); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 12px; }
.vmt-rl-lib__rating { color: var(--lib-gold-deep); font-weight: 600; white-space: nowrap; }
.vmt-rl-lib__rating-count { color: var(--lib-muted); font-weight: 400; }
.vmt-rl-lib__tags { margin-top: 4px; }
.vmt-rl-lib__tag {
	font-size: 11.5px; color: var(--lib-muted); background: var(--lib-gold-tint);
	padding: 2px 8px; border-radius: 999px;
}

/* Empty / no-results states */
.vmt-rl-lib__empty,
.vmt-rl-lib__noresults { font-size: 17px; color: var(--lib-muted); padding: 24px 0; }
.vmt-rl-lib__empty a { color: var(--lib-teal); font-weight: 600; }

/* ---- Single resource page (visual) ---- */
.vmt-rl-lib__single { color: var(--lib-ink); }
.vmt-rl-lib .vmt-rl-topics { color: var(--lib-muted); font-size: 14px; margin-bottom: 18px; }
.vmt-rl-lib .vmt-rl-topics a { color: var(--lib-gold-deep); text-decoration: none; border-bottom: 1px solid transparent; }
.vmt-rl-lib .vmt-rl-topics a:hover { border-bottom-color: var(--lib-gold-deep); }
.vmt-rl-lib .vmt-rl-content { font-size: 17px; line-height: 1.7; color: #453f38; }
.vmt-rl-lib .vmt-rl-content p { margin: 0 0 16px; }

/* File / link action — teal token button (href/target/rel/nonce owned by template) */
.vmt-rl-lib .vmt-rl-action { margin: 26px 0; }
.vmt-rl-lib .vmt-rl-action a { background: var(--lib-teal); color: #fff; font-weight: 600; padding: 11px 20px; border-radius: 6px; text-decoration: none; }
.vmt-rl-lib .vmt-rl-action a:hover { background: var(--lib-teal-dark); color: #fff; }

/* Logged-out gate box */
.vmt-rl-lib .vmt-rl-gate { padding: 18px 20px; background: #fff; border: 1px solid var(--lib-line); border-radius: var(--lib-radius); box-shadow: var(--lib-shadow-sm); }
.vmt-rl-lib .vmt-rl-gate a { color: var(--lib-teal); font-weight: 600; }

/* Rating widget — .is-filled = filled star, driven by the template's inline JS. */
.vmt-rl-lib .vmt-rl-rating-block { margin: 4px 0 22px; }
.vmt-rl-lib .vmt-rl-star { font-size: 24px; color: #d8cdb8; transition: color 80ms ease; }
.vmt-rl-lib .vmt-rl-star.is-filled { color: var(--lib-gold); }
.vmt-rl-lib .vmt-rl-star:focus { outline: 2px solid var(--lib-teal); outline-offset: 2px; }
.vmt-rl-lib .vmt-rl-rating-summary { color: var(--lib-ink); font-size: 14px; }
.vmt-rl-lib .vmt-rl-rating-summary .vmt-rl-rating-avg { font-weight: 700; }
.vmt-rl-lib .vmt-rl-rating-summary .vmt-rl-rating-count { color: var(--lib-muted); }
.vmt-rl-lib .vmt-rl-rating-summary.is-empty { color: var(--lib-muted); font-style: italic; }
.vmt-rl-lib .vmt-rl-rating-prompt { font-size: 12px; color: var(--lib-muted); font-style: italic; }
.vmt-rl-lib .vmt-rl-rating-status { font-size: 13px; color: var(--lib-muted); }
.vmt-rl-lib .vmt-rl-rating-status.is-error { color: #b32d2e; }

/* Comments wrapper (comments_template() internals are theme/core-owned) */
.vmt-rl-lib__comments { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--lib-line); }
