/* Useful Links page.
   The design's own rules plus the controls it implied but did not draw (the
   search box). Everything else is inline, as in the design. Scoped under
   .ij-useful-links so the other Beaver Builder pages are untouched.

   The card is an <a> here where the design had a <div>, so several rules
   below exist only to stop bb-theme's Bootstrap base from styling it as body
   copy — the parent theme's link colour and underline would otherwise win on
   every card. See the note in docs/ about the parent theme's cascade. */

.ij-useful-links { font-family: var(--font-sans); font-weight: 500; color: var(--color-text); -webkit-font-smoothing: antialiased; }

/* ---- Search box -------------------------------------------------------
   Not in the design file, which nonetheless draws an empty state reading
   "No links match that search". Styled to match the letter row it sits above:
   same white card, same radius, same shadow. */
.ij-useful-links .ij-ul-search {
	position: relative;
	margin: 40px auto 0;
	width: 520px;
	max-width: 100%;
}
.ij-useful-links .ij-ul-search-icon {
	position: absolute;
	top: 50%;
	left: 18px;
	display: flex;
	transform: translateY(-50%);
	color: var(--color-text-tertiary);
	pointer-events: none;
}
.ij-useful-links .ij-ul-input {
	box-sizing: border-box;
	width: 100%;
	padding: 14px 18px 14px 48px;
	border: 1px solid transparent;
	border-radius: 16px;
	background: #fff;
	box-shadow: var(--shadow-card);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	color: var(--color-text);
}
.ij-useful-links .ij-ul-input::placeholder { color: var(--color-text-tertiary); }
.ij-useful-links .ij-ul-input:focus { outline: none; border-color: var(--brand-green); }
.ij-useful-links .ij-ul-input:focus-visible { outline: 2px solid var(--brand-green-dark); outline-offset: 2px; }
/* Safari draws its own clear affordance; the page has its own reset button. */
.ij-useful-links .ij-ul-input::-webkit-search-decoration,
.ij-useful-links .ij-ul-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---- A-Z row ---------------------------------------------------------- */
.ij-useful-links .ij-ul-letters {
	margin: 40px auto 0;
	padding: 12px clamp(10px, 1.5vw, 18px);
	border-radius: 16px;
	background: #fff;
	box-shadow: var(--shadow-card);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 1150px;
	max-width: 100%;
}
.ij-useful-links .ij-ul-letter {
	min-width: 38px;
	padding: 6px 4px;
	border: none;
	border-radius: 10px;
	background: transparent;
	color: var(--color-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.3px;
	cursor: pointer;
	transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1), color 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.ij-useful-links .ij-ul-letter[data-letter="all"] { padding: 6px 12px; }
/* The design's own states: a soft green wash, not a solid fill. */
.ij-useful-links .ij-ul-letter:hover:not(:disabled) { background: var(--color-success-soft); color: var(--brand-green-dark); }
.ij-useful-links .ij-ul-letter.is-active { background: var(--color-success-soft); color: var(--brand-green-dark); }
/* A letter with no links behind it. The design stood this in with a
   pointer-events placeholder and --slate-300 text; a real disabled button
   also keeps it out of the tab order and tells a screen reader why it
   cannot be pressed. */
.ij-useful-links .ij-ul-letter:disabled { color: var(--slate-300); cursor: default; }
.ij-useful-links .ij-ul-letter:focus-visible { outline: 2px solid var(--brand-green-dark); outline-offset: 2px; }

/* ---- Cards ------------------------------------------------------------
   .ulcard / .ullink / .ularrow are the design's own class names, kept so the
   rules below read against the design file. */
.ij-useful-links .ulcard {
	text-decoration: none;
	transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* bb-theme colours every <a> in content; the card sets its own colours on
   each child, so it must not inherit one here. */
.ij-useful-links a.ulcard,
.ij-useful-links a.ulcard:hover,
.ij-useful-links a.ulcard:focus { color: var(--color-text); text-decoration: none; }
.ij-useful-links .ulcard:hover { box-shadow: var(--shadow-overlay); transform: translateY(-2px); }
.ij-useful-links .ulcard:hover .ullink { text-decoration: underline; }
.ij-useful-links .ulcard:hover .ularrow { transform: translateX(3px); }
.ij-useful-links .ulcard:focus-visible { outline: 2px solid var(--brand-green-dark); outline-offset: 3px; }
.ij-useful-links .ularrow { transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1); }

/* A group hidden by filtering, and the last visible group, which should not
   carry a trailing rule. */
.ij-useful-links .ij-ul-group[hidden] { display: none; }
.ij-useful-links .ij-ul-card[hidden] { display: none; }
.ij-useful-links .ij-ul-group.is-last { padding-bottom: 0; border-bottom: none; margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
	.ij-useful-links .ij-ul-letter,
	.ij-useful-links .ulcard,
	.ij-useful-links .ularrow { transition: none; }
	.ij-useful-links .ulcard:hover { transform: none; }
	.ij-useful-links .ulcard:hover .ularrow { transform: none; }
}

/* The design's own breakpoints for the card grid. */
@media (max-width: 1000px) {
	.ij-useful-links .glgrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px) {
	.ij-useful-links .glgrid { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 720px) {
	.ij-useful-links h1 { font-size: 36px !important; letter-spacing: -1.6px !important; }
	.ij-useful-links .ij-ul-letters { gap: 1px; padding: 10px 8px; }
	.ij-useful-links .ij-ul-letter { min-width: 32px; font-size: 13px; }
}

/* ---- Matched to the live Vercel page (2026-10-07) ----------------------- */
/* The selected letter is green text only: the design's inline
   background:transparent overrides its own .gl.is-on fill. Hover keeps the tint. */
.ij-useful-links .ij-ul-letter.is-active { background: transparent; color: var(--brand-green-dark); }
.ij-useful-links .ij-ul-letter.is-active:hover { background: var(--color-success-soft); }
/* Card arrows are brand green, as in the design. */
.ij-useful-links .ularrow { color: var(--brand-green-dark); }
/* Phones: the design keeps 38px, 14px letter buttons (eight to a row). */
@media (max-width: 720px) {
	.ij-useful-links .ij-ul-letters { gap: 2px; padding: 12px 10px; }
	.ij-useful-links .ij-ul-letter { min-width: 38px; font-size: 14px; line-height: 21.6px; }
}
