/* OPERS Glossary -- Frontend Styles */

/* Highlighted term */
.opers-glossary-term {
	background-color: var(--opers-glossary-highlight-color, rgba(234, 170, 0, 0.15));
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.opers-glossary-term:hover,
.opers-glossary-term:focus {
	opacity: 0.8;
	outline: none;
}

/* Modal backdrop */
.opers-glossary-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.opers-glossary-backdrop.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* Modal dialog */
.opers-glossary-modal {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	max-width: 600px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	transform: translateY(20px);
	transition: transform 0.2s ease;
}

.opers-glossary-backdrop.is-visible .opers-glossary-modal {
	transform: translateY(0);
}

/* Modal header */
.opers-glossary-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 16px;
	border-bottom: 2px solid #006e85;
}

.opers-glossary-modal__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #333;
}

.opers-glossary-modal__close {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: #666;
	padding: 0;
	line-height: 1;
}

.opers-glossary-modal__close:hover {
	color: #333;
}

/* Modal body */
.opers-glossary-modal__body {
	padding: 20px 24px;
}

.opers-glossary-modal__definition {
	line-height: 1.6;
	color: #333;
}

/* Related sections */
.opers-glossary-modal__section {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #c8d4e8;
}

.opers-glossary-modal__section-title {
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #006e85;
	margin: 0 0 8px;
}

.opers-glossary-modal__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.opers-glossary-modal__links li {
	margin-bottom: 4px;
}

.opers-glossary-modal__links a {
	color: #006e85;
	text-decoration: none;
}

.opers-glossary-modal__links a:hover {
	text-decoration: underline;
}

/* Related term buttons (clickable, swap modal content) */
.opers-glossary-modal__term-link {
	background: none;
	border: none;
	color: #006e85;
	cursor: pointer;
	padding: 0;
	font: inherit;
	text-decoration: none;
}

.opers-glossary-modal__term-link:hover {
	text-decoration: underline;
}

/* Loading state */
.opers-glossary-modal__loading {
	text-align: center;
	padding: 40px 20px;
	color: #666;
}
