﻿/* =========================================================
   Glossário Authority 2 — Public CSS
   Prefixo: aglx-
   NUNCA estilizar tags globais fora do .aglx-shell
   ========================================================= */

/* ── Containers principais ── */
.aglx-shell {
	max-width: 100%;
	font-family: inherit;
	color: inherit;
	line-height: 1.6;
}

/* =========================================================
   ÍNDICE (shortcode [glossary2_index])
   ========================================================= */

/* ── Cabeçalho da página ── */
.aglx-index-header {
	margin-bottom: 24px;
}

.aglx-shell .aglx-index-title {
	font-size: 2em;
	margin: 0 0 8px;
	line-height: 1.2;
}

.aglx-shell .aglx-index-subtitle {
	color: #646970;
	margin: 0;
	font-size: 1em;
}

/* ── Stats box ── */
.aglx-stats-box {
	background: #f0f6fc;
	border: 1px solid #c7d9f0;
	border-radius: 6px;
	padding: 10px 18px;
	margin-bottom: 20px;
	font-size: 0.92em;
	display: inline-block;
}

/* ── Barra A-Z ── */
.aglx-alpha-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 20px;
	padding: 10px 14px;
	background: #f8f8f8;
	border-radius: 6px;
	border: 1px solid #e5e5e5;
}

.aglx-alpha-link {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 4px;
	font-weight: 600;
	font-size: 0.85em;
	text-decoration: none;
	transition: background .15s, color .15s;
}

a.aglx-alpha-link.has-terms {
	background: #1d2327;
	color: #fff;
}

a.aglx-alpha-link.has-terms:hover {
	background: #2271b1;
	color: #fff;
}

.aglx-alpha-link.empty {
	color: #c3c4c7;
	cursor: default;
}

/* ── Grid de 26 letras ── */
.aglx-letters-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
	gap: 10px;
}

/* ── Card de letra ── */
.aglx-letter-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 10px 12px 8px;
	display: flex;
	flex-direction: column;
	transition: box-shadow .15s;
}

.aglx-letter-card:not(.aglx-letter-empty):hover {
	box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
}

/* Letras sem termos: visual apagado */
.aglx-letter-card.aglx-letter-empty {
	background: #fafafa;
	border-color: #ececec;
	opacity: .6;
}

/* ── Topo do card: glifo + link "todos" ── */
.aglx-letter-card-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 6px;
}

.aglx-letter-glyph {
	font-size: 1.6em;
	font-weight: 800;
	line-height: 1;
	color: #1d2327;
}

.aglx-letter-card.aglx-letter-empty .aglx-letter-glyph {
	color: #c3c4c7;
}

.aglx-shell .aglx-ver-todos {
	font-size: 0.72em;
	font-weight: 600;
	text-decoration: none;
	color: #2271b1;
	white-space: nowrap;
}

.aglx-shell .aglx-ver-todos:hover {
	text-decoration: underline;
}

/* ── Slots dos termos ── */
.aglx-term-slots {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1;
}

.aglx-term-slot {
	display: block;
	font-size: 0.78em;
	line-height: 1.3;
	padding: 4px 6px;
	border-radius: 4px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	min-height: 26px;
	box-sizing: border-box;
}

/* Slot preenchido: link real */
a.aglx-slot-filled {
	text-decoration: none;
	color: #1d2327;
	background: #f0f0f1;
	transition: background .12s, color .12s;
}

a.aglx-slot-filled:hover {
	background: #2271b1;
	color: #fff;
}

/* Slot vazio: placeholder */
.aglx-slot-empty {
	color: #c3c4c7;
	background: transparent;
	font-style: italic;
	cursor: default;
}

/* =========================================================
   PÁGINA DE TERMO INDIVIDUAL
   ========================================================= */

.aglx-single-shell {
	max-width: 100%;
}

/* ── Breadcrumb / Voltar ── */
.aglx-shell .aglx-breadcrumb {
	margin: 0 0 20px;
	font-size: 0.88em;
}

.aglx-shell .aglx-breadcrumb a {
	text-decoration: none;
	color: #646970;
}

.aglx-shell .aglx-breadcrumb a:hover {
	color: #1d2327;
}

/* ── Layout 2 colunas (artigo + sidebar) ── */
.aglx-single-layout {
	display: flex;
	gap: 36px;
	align-items: flex-start;
}

.aglx-single-main {
	flex: 1 1 0;
	min-width: 0;
}

/* ── Cabeçalho do termo ── */
.aglx-term-header {
	position: relative;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid #f0f0f1;
	overflow: hidden;
}

/* Glifo decorativo da letra (marca d'água) */
.aglx-letter-watermark {
	position: absolute;
	right: -8px;
	top: -12px;
	font-size: 7em;
	font-weight: 900;
	color: #f0f0f1;
	line-height: 1;
	pointer-events: none;
	user-select: none;
	z-index: 0;
}

.aglx-shell .aglx-term-title {
	position: relative;
	z-index: 1;
	font-size: 2em;
	margin: 0;
	line-height: 1.2;
}

/* ── Conteúdo do termo ── */
.aglx-term-content {
	max-width: 720px;
}

.aglx-shell .aglx-term-content p {
	margin-bottom: 1.2em;
}

.aglx-shell .aglx-term-content h2 {
	font-size: 1.25em;
	margin: 1.8em 0 .5em;
}

.aglx-shell .aglx-term-content ul,
.aglx-shell .aglx-term-content ol {
	margin: 0 0 1em 1.5em;
	padding: 0;
}

.aglx-shell .aglx-term-content li {
	margin-bottom: .4em;
}

/* ── Navegação anterior / próximo ── */
.aglx-term-nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 32px;
	padding-top: 16px;
	border-top: 1px solid #e5e5e5;
}

.aglx-nav-prev-wrap,
.aglx-nav-next-wrap {
	flex: 0 1 48%;
	min-width: 0;
}

.aglx-nav-next-wrap {
	text-align: right;
}

.aglx-shell .aglx-nav-prev,
.aglx-shell .aglx-nav-next {
	display: inline-block;
	font-size: 0.88em;
	font-weight: 600;
	text-decoration: none;
	color: #2271b1;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	max-width: 100%;
}

.aglx-shell .aglx-nav-prev:hover,
.aglx-shell .aglx-nav-next:hover {
	text-decoration: underline;
}

/* ── Sidebar: Outros Termos ── */
.aglx-outros-termos {
	flex: 0 0 200px;
	position: sticky;
	top: 24px;
	background: #f8f9fa;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 16px 18px;
}

.aglx-shell .aglx-outros-titulo {
	font-size: 0.88em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #646970;
	margin: 0 0 12px;
}

.aglx-outros-lista {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
}

.aglx-outros-lista li {
	margin-bottom: 2px;
}

.aglx-shell .aglx-outro-link {
	display: block;
	font-size: 0.88em;
	text-decoration: none;
	color: #1d2327;
	padding: 5px 8px;
	border-radius: 4px;
	transition: background .12s, color .12s;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.aglx-shell .aglx-outro-link:hover {
	background: #1d2327;
	color: #fff;
}

.aglx-shell .aglx-outros-ver-todos {
	display: block;
	font-size: 0.82em;
	font-weight: 600;
	text-decoration: none;
	color: #2271b1;
	padding-top: 10px;
	border-top: 1px solid #e5e5e5;
}

.aglx-shell .aglx-outros-ver-todos:hover {
	text-decoration: underline;
}

/* =========================================================
   ARQUIVO DE LETRA (archive-letter2.php)
   ========================================================= */

.aglx-archive-header {
	margin-bottom: 24px;
}

.aglx-shell .aglx-archive-header h1 {
	font-size: 2em;
	margin-bottom: 4px;
}

.aglx-shell .aglx-archive-header p {
	color: #646970;
	margin: 0;
}

/* Grid de cards no arquivo */
.aglx-terms-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
	margin-top: 16px;
}

.aglx-card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 16px 18px;
	transition: box-shadow .2s;
}

.aglx-card:hover {
	box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
}

.aglx-shell .aglx-card-title {
	font-size: 1em;
	margin: 0 0 8px;
}

.aglx-shell .aglx-card-title a {
	text-decoration: none;
	color: #1d2327;
}

.aglx-shell .aglx-card-title a:hover {
	color: #2271b1;
}

.aglx-card-excerpt {
	font-size: 0.87em;
	color: #555;
	margin: 0 0 12px;
	line-height: 1.5;
}

.aglx-shell .aglx-card-link {
	font-size: 0.87em;
	font-weight: 600;
	text-decoration: none;
	color: #2271b1;
}

.aglx-shell .aglx-card-link:hover {
	text-decoration: underline;
}

/* ── Vazio / empty state ── */
.aglx-empty {
	color: #646970;
	font-style: italic;
	padding: 20px 0;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

/* Tablet */
@media (max-width: 900px) {
	.aglx-single-layout {
		flex-direction: column;
		gap: 24px;
	}

	.aglx-outros-termos {
		flex: none;
		position: static;
		width: 100%;
		box-sizing: border-box;
	}

	.aglx-outros-lista {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 4px;
	}
}

/* Mobile */
@media (max-width: 640px) {
	.aglx-letters-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 6px;
	}

	.aglx-shell .aglx-index-title {
		font-size: 1.5em;
	}

	.aglx-shell .aglx-term-title {
		font-size: 1.5em;
	}

	.aglx-letter-watermark {
		font-size: 5em;
	}

	.aglx-term-nav {
		flex-direction: column;
		gap: 8px;
	}

	.aglx-nav-prev-wrap,
	.aglx-nav-next-wrap {
		flex: none;
		width: 100%;
	}

	.aglx-nav-next-wrap {
		text-align: left;
	}

	.aglx-alpha-bar {
		gap: 2px;
		padding: 8px;
	}

	.aglx-alpha-link {
		padding: 3px 6px;
		font-size: 0.78em;
	}

	.aglx-terms-grid {
		grid-template-columns: 1fr;
	}

	.aglx-outros-lista {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   v1.0.6 — Single layout (sidebar + breadcrumb + TOC)
   ========================================================= */

/* ── Breadcrumb ── */
.aglx-shell .aglx-breadcrumb {
	font-size: 0.9em;
	color: #50575e;
	margin: 0 0 18px;
}
.aglx-shell .aglx-breadcrumb a {
	color: #2271b1;
	text-decoration: none;
}
.aglx-shell .aglx-breadcrumb a:hover {
	text-decoration: underline;
}
.aglx-shell .aglx-bc-sep {
	margin: 0 6px;
	color: #a7aaad;
}
.aglx-shell .aglx-bc-current {
	color: #1d2327;
	font-weight: 600;
}

/* ── Layout single (com / sem sidebar) ── */
.aglx-single-layout {
	display: grid;
	gap: 32px;
	align-items: start;
}
.aglx-single-layout.has-sidebar {
	grid-template-columns: minmax(0, 1fr) 300px;
}
.aglx-single-layout.no-sidebar {
	grid-template-columns: minmax(0, 1fr);
}
.aglx-single-layout .aglx-sidebar {
	min-width: 0;
}

/* ── TOC ── */
.aglx-toc {
	background: #f6f7f7;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
	padding: 12px 16px;
	margin: 0 0 24px;
}
.aglx-toc-title {
	font-weight: 600;
	cursor: pointer;
	font-size: 0.95em;
}
.aglx-toc-list {
	margin: 10px 0 0;
	padding-left: 22px;
	font-size: 0.95em;
}
.aglx-toc-list li {
	margin: 4px 0;
}
.aglx-toc-list a {
	color: #2271b1;
	text-decoration: none;
}
.aglx-toc-list a:hover {
	text-decoration: underline;
}

/* ── Sidebar widgets ── */
.aglx-sidebar .aglx-widget {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 14px 16px;
	margin-bottom: 20px;
}
.aglx-sidebar .aglx-widget-title {
	margin: 0 0 10px;
	font-size: 1em;
	font-weight: 600;
}
.aglx-sidebar .aglx-widget img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* No layout single, a lista de "Outros Termos" deve ser empilhada (1 coluna) */
.aglx-sidebar .aglx-outros-termos {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 14px 16px;
}
.aglx-sidebar .aglx-outros-lista {
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
}
.aglx-sidebar .aglx-outros-lista li {
	margin: 0;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f1;
}
.aglx-sidebar .aglx-outros-lista li:last-child {
	border-bottom: none;
}
.aglx-sidebar .aglx-outro-link {
	text-decoration: none;
	color: #1d2327;
}
.aglx-sidebar .aglx-outro-link:hover {
	color: #2271b1;
}
.aglx-sidebar .aglx-outros-ver-todos {
	display: inline-block;
	margin-top: 10px;
	font-size: 0.9em;
	color: #2271b1;
	text-decoration: none;
}

/* Responsivo: sidebar vai pro fim no mobile */
@media (max-width: 900px) {
	.aglx-single-layout.has-sidebar {
		grid-template-columns: 1fr;
	}
}
