/* Glossary 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-glossary so the other Beaver Builder pages are untouched. */

.ij-glossary { font-family: var(--font-sans); font-weight: 500; color: var(--color-text); -webkit-font-smoothing: antialiased; }
.ij-glossary a { color: var(--color-link); text-decoration: underline; text-underline-offset: 2px; }

/* ---- Search box -------------------------------------------------------
   Not in the design file, which nonetheless draws an empty state reading
   "No terms match that search". Styled to match the letter row it sits above:
   same white card, same radius, same shadow. */
.ij-glossary .ij-gl-search {
	position: relative;
	margin: 40px auto 0;
	width: 520px;
	max-width: 100%;
}
.ij-glossary .ij-gl-search-icon {
	position: absolute;
	top: 50%;
	left: 18px;
	display: flex;
	transform: translateY(-50%);
	color: var(--color-text-tertiary);
	pointer-events: none;
}
.ij-glossary .ij-gl-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-glossary .ij-gl-input::placeholder { color: var(--color-text-tertiary); }
.ij-glossary .ij-gl-input:focus { outline: none; border-color: var(--brand-green); }
.ij-glossary .ij-gl-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-glossary .ij-gl-input::-webkit-search-decoration,
.ij-glossary .ij-gl-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---- A-Z row ---------------------------------------------------------- */
.ij-glossary .ij-gl-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-glossary .ij-gl-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 160ms cubic-bezier(0.4, 0, 0.2, 1), color 160ms cubic-bezier(0.4, 0, 0.2, 1);
}
.ij-glossary .ij-gl-letter[data-letter="all"] { padding: 6px 12px; }
.ij-glossary .ij-gl-letter:hover:not(:disabled):not(.is-active) { background: var(--color-success-soft); color: var(--brand-green-dark); }
.ij-glossary .ij-gl-letter.is-active { background: var(--brand-green); color: #fff; }
/* A letter with no terms behind it. The design stood this in with a
   pointer-events placeholder; a real disabled button also keeps it out of
   the tab order and tells a screen reader why it cannot be pressed. */
.ij-glossary .ij-gl-letter:disabled { color: var(--color-text-tertiary); opacity: 0.45; cursor: default; }
.ij-glossary .ij-gl-letter:focus-visible { outline: 2px solid var(--brand-green-dark); outline-offset: 2px; }

/* ---- Cards ------------------------------------------------------------ */
/* The definition may be a <div> when it holds more than one paragraph, so the
   paragraph spacing is set here rather than relying on the inline <p>. */
.ij-glossary .ij-gl-def > p { margin: 0 0 10px; }
.ij-glossary .ij-gl-def > p:last-child { margin-bottom: 0; }

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

@media (prefers-reduced-motion: reduce) {
	.ij-glossary .ij-gl-letter { transition: none; }
}

@media (max-width: 860px) {
	.ij-glossary .glgrid { grid-template-columns: minmax(0, 1fr) !important; }
}

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