/**
 * Chrome partilhado (header + footer grid): mesmo comportamento em todos os temas.
 * Depende de theme-core.css (--theme-*).
 */

.theme-chrome-header-inner {
	max-width: min(var(--theme-container-width, 72rem), 100%);
	margin: 0 auto;
	padding: 0.65rem 1rem;
	overflow: visible;
}

.theme-chrome-header-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	overflow: visible;
}

.theme-chrome-brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

.theme-chrome-brand img {
	max-height: 2.5rem;
	width: auto;
	max-width: 260px;
	object-fit: contain;
}

.theme-chrome-brand-text {
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.theme-chrome-nav-desktop {
	display: none;
	flex: 1;
	overflow: visible;
}

@media (min-width: 1024px) {
	.theme-chrome-nav-desktop {
		display: block;
	}
}

.theme-chrome-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

.theme-chrome-burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--theme-header-border-color);
	border-radius: 8px;
	background: var(--theme-input-background);
	color: var(--theme-header-text-color);
	cursor: pointer;
}

@media (min-width: 1024px) {
	.theme-chrome-burger {
		display: none;
	}
}

.theme-chrome-mobile {
	display: none;
	border-top: 1px solid var(--theme-header-border-color);
	padding: 0.75rem 0 0.5rem;
}

.theme-chrome-mobile.is-open {
	display: block;
}

@media (min-width: 1024px) {
	.theme-chrome-mobile {
		display: none !important;
	}
}

.theme-chrome-mobile nav {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.9rem;
	font-weight: 500;
}

.theme-chrome-mobile .theme-nav-link {
	display: block;
	padding: 0.5rem 0.25rem;
	border-bottom: 1px solid var(--theme-border-color);
}

.theme-chrome-mobile details {
	border-bottom: 1px solid var(--theme-border-color);
	padding-bottom: 0.35rem;
}

.theme-chrome-mobile summary {
	cursor: pointer;
	padding: 0.5rem 0.25rem;
	list-style: none;
}

.theme-chrome-mobile summary::-webkit-details-marker {
	display: none;
}

.theme-chrome-mobile .theme-mobile-account-details__panel {
	padding: 0.25rem 0 0.25rem 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.theme-hide-lg {
	display: none;
}

@media (min-width: 640px) {
	.theme-hide-lg {
		display: inline-flex;
		align-items: center;
		gap: 0.35rem;
	}
}

.theme-chrome-user-tray {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	min-width: 0;
	max-width: 14rem;
	line-height: 1.25;
}

.theme-chrome-user-chip {
	display: none;
	font-size: 0.75rem;
	max-width: 10rem;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--theme-primary-color);
}

@media (min-width: 768px) {
	.theme-chrome-user-chip {
		display: inline;
	}
}

/* Admin: botão compacto (sem sublinhado / sem “cara” de hiperligação) */
.theme-chrome-user-chip--admin .theme-chrome-user-chip__mark {
	font-size: 0.95em;
	line-height: 1;
	flex-shrink: 0;
}

a.theme-chrome-user-chip--admin {
	text-decoration: none !important;
	-webkit-text-decoration: none !important;
	text-underline-offset: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	font-size: 0.75rem;
	color: var(--theme-primary-color);
	border-style: solid;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

a.theme-chrome-user-chip--admin:visited {
	color: var(--theme-primary-color);
	text-decoration: none !important;
}

@media (min-width: 768px) {
	a.theme-chrome-user-chip--admin {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		gap: 0.28rem;
		padding: 0.35rem 0.6rem;
		max-width: 12rem;
		min-width: 0;
		border-width: 1px;
		border-radius: 8px;
		border-color: var(--theme-border-color, rgba(255, 255, 255, 0.14));
		background: var(--theme-surface-color, rgba(255, 255, 255, 0.06));
		box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
		line-height: 1.2;
	}
}

a.theme-chrome-user-chip--admin:hover,
a.theme-chrome-user-chip--admin:focus {
	text-decoration: none !important;
	color: var(--theme-primary-color);
	border-color: var(--theme-primary-color);
	filter: brightness(1.08);
}

a.theme-chrome-user-chip--admin:focus-visible {
	outline: 2px solid var(--theme-primary-color);
	outline-offset: 2px;
}

a.theme-chrome-user-chip--admin.is-active {
	font-weight: 700;
	border-color: var(--theme-primary-color);
	background: rgba(255, 255, 255, 0.08);
}

/* Footer grid (substitui utilitários Tailwind) */
.theme-chrome-footer-inner {
	max-width: min(var(--theme-container-width, 72rem), 100%);
	margin: 0 auto;
	padding: 2.5rem 1rem;
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
	font-size: 0.9rem;
}

@media (min-width: 640px) {
	.theme-chrome-footer-inner {
		grid-template-columns: 1fr 1fr;
	}
}

.theme-chrome-footer-brand {
	font-weight: 700;
	color: var(--theme-footer-heading-color);
	margin-bottom: 0.35rem;
}

.theme-chrome-footer-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1rem;
	font-size: 1.25rem;
}

.theme-chrome-footer-socials a {
	color: inherit;
	opacity: 0.85;
	text-decoration: none;
	transition: opacity 0.2s ease, color 0.2s ease;
}

.theme-chrome-footer-socials a:hover {
	opacity: 1;
	color: var(--theme-link-hover-color);
}

/* Variação minimal: menos sombra no conteúdo (tokens já claros) */
.theme-chrome-minimal .theme-content-shell {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.theme-chrome-minimal .theme-header-bar {
	box-shadow: none;
}

/* Painel admin na barra principal (🛡️) */
.theme-nav-link.theme-nav-link--admin {
	font-weight: 700;
	border: 1px solid #c9a227;
	border-radius: 8px;
	padding: 0.35rem 0.65rem !important;
	background: rgba(201, 162, 39, 0.12);
}
.theme-nav-link.theme-nav-link--admin:hover {
	background: rgba(201, 162, 39, 0.22);
}
.theme-nav-link.theme-nav-link--admin.is-active {
	background: rgba(201, 162, 39, 0.35);
	border-color: #e8c547;
}
