/*
 * HC Carlix - elements.css
 * Elementos HTML comuns: tabelas, listas, alertas, badges e paginação.
 */

::selection {
	color: #fff;
	background: var(--carlix-primary);
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid color-mix(in srgb, var(--carlix-primary) 72%, #fff);
	outline-offset: 0.18rem;
}

:where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
	margin-block: 0 var(--carlix-space-4);
	color: var(--carlix-heading);
	font-family: var(--carlix-font-heading);
	font-weight: 900;
	line-height: 1.18;
	letter-spacing: 0;
	text-wrap: balance;
}

:where(h1, .h1) {
	font-size: 2.35rem;
}

:where(h2, .h2) {
	font-size: 1.95rem;
}

:where(h3, .h3) {
	font-size: 1.55rem;
}

:where(h4, .h4) {
	font-size: 1.28rem;
}

:where(h5, .h5) {
	font-size: 1.1rem;
}

:where(h6, .h6) {
	font-size: 1rem;
	text-transform: uppercase;
}

:where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) a {
	color: inherit;
	text-decoration: none;
}

:where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) a:hover,
:where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) a:focus-visible {
	color: var(--carlix-primary);
}

.carlix-content,
.item-page,
.com-content-article,
.com-content-category-blog,
.blog,
.mod-custom {
	overflow-wrap: break-word;
}

.carlix-content a:not(.btn):not(.hc-button):not(.page-link):not(.carlix-nav__link),
.item-page a:not(.btn):not(.hc-button):not(.page-link):not(.carlix-nav__link),
.com-content-article a:not(.btn):not(.hc-button):not(.page-link):not(.carlix-nav__link),
.com-content-category-blog a:not(.btn):not(.hc-button):not(.page-link):not(.carlix-nav__link),
.blog a:not(.btn):not(.hc-button):not(.page-link):not(.carlix-nav__link),
.mod-custom a:not(.btn):not(.hc-button):not(.page-link):not(.carlix-nav__link) {
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

.carlix-content :where(h1, h2, h3, h4, h5, h6) a,
.item-page :where(h1, h2, h3, h4, h5, h6) a,
.com-content-article :where(h1, h2, h3, h4, h5, h6) a,
.com-content-category-blog :where(h1, h2, h3, h4, h5, h6) a,
.blog :where(h1, h2, h3, h4, h5, h6) a,
.mod-custom :where(h1, h2, h3, h4, h5, h6) a {
	text-decoration: none;
}

.carlix-main :target {
	scroll-margin-top: calc(var(--carlix-header-h, 0px) + var(--carlix-space-6));
}

.carlix-content p,
.item-page p,
.com-content-article p,
.mod-custom p {
	margin-block: 0 1rem;
}

:where(strong, b) {
	color: var(--carlix-heading);
	font-weight: 800;
}

:where(em, i) {
	font-style: italic;
}

mark {
	padding: 0.08em 0.25em;
	color: #1f1f1f;
	background: #fff1a8;
	border-radius: 0.18rem;
}

abbr[title] {
	cursor: help;
	text-decoration: underline dotted;
	text-underline-offset: 0.15em;
}

sub,
sup {
	position: relative;
	font-size: 0.75em;
	line-height: 0;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

address {
	margin-block: 0 var(--carlix-space-4);
	font-style: normal;
	line-height: var(--carlix-line-height);
}

.lead {
	color: var(--carlix-muted);
	font-size: 1.18rem;
	line-height: 1.55;
}

.small,
small {
	font-size: 0.875em;
}

.text-muted {
	color: var(--carlix-muted) !important;
}

hr {
	margin-block: var(--carlix-space-6);
	border: 0;
	border-top: 1px solid var(--carlix-border);
}

blockquote {
	margin: 0 0 var(--carlix-space-4);
	padding: var(--carlix-space-4);
	color: var(--carlix-muted);
	background: #f7f8fa;
	border-left: 4px solid var(--carlix-primary);
	border-radius: var(--carlix-radius);
}

blockquote > :last-child {
	margin-bottom: 0;
}

code,
kbd,
samp {
	padding: 0.1rem 0.3rem;
	color: #8d1f1f;
	background: #fff1f1;
	border-radius: 0.25rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 0.9em;
}

pre {
	overflow: auto;
	margin: 0 0 var(--carlix-space-4);
	padding: var(--carlix-space-4);
	color: #f8f9fa;
	background: #202427;
	border-radius: var(--carlix-radius);
}

pre code {
	padding: 0;
	color: inherit;
	background: transparent;
}

figure {
	margin: 0 0 var(--carlix-space-6);
}

figure > :last-child {
	margin-bottom: 0;
}

figcaption {
	margin-block-start: var(--carlix-space-2);
	color: var(--carlix-muted);
	font-size: 0.9rem;
	line-height: 1.45;
}

audio,
canvas,
iframe,
video,
embed,
object {
	max-width: 100%;
}

iframe,
embed,
object {
	border: 0;
}

details {
	margin-block: 0 var(--carlix-space-4);
	padding: var(--carlix-space-4);
	background: #fff;
	border: 1px solid var(--carlix-border);
	border-radius: var(--carlix-radius);
	box-shadow: var(--carlix-shadow-sm);
}

summary {
	color: var(--carlix-heading);
	cursor: pointer;
	font-weight: 800;
}

details > :last-child {
	margin-bottom: 0;
}

.carlix-content ul:not(.carlix-nav):not(.mod-list):not(.pagination),
.carlix-content ol,
.item-page ul:not(.carlix-nav):not(.mod-list):not(.pagination),
.item-page ol,
.com-content-article ul:not(.carlix-nav):not(.mod-list):not(.pagination),
.com-content-article ol,
.mod-custom ul:not(.carlix-nav):not(.mod-list):not(.pagination),
.mod-custom ol {
	margin-block: 0 var(--carlix-space-4);
	padding-left: 1.35rem;
}

.carlix-content li,
.item-page li,
.com-content-article li,
.mod-custom li {
	margin-block: 0.3rem;
}

.list-unstyled {
	padding-left: 0 !important;
	list-style: none !important;
}

.list-inline {
	display: flex;
	flex-wrap: wrap;
	gap: var(--carlix-space-2);
	padding-left: 0 !important;
	list-style: none !important;
}

dl {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: var(--carlix-space-2) var(--carlix-space-4);
	margin-block: 0 var(--carlix-space-4);
}

dt {
	color: var(--carlix-heading);
	font-weight: 800;
}

dd {
	margin: 0;
	color: var(--carlix-muted);
}

.table-responsive {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

table,
.table {
	width: 100%;
	margin-block: 0 var(--carlix-space-4);
	color: var(--carlix-text);
	background: #fff;
	border-collapse: collapse;
	border: 1px solid var(--carlix-border);
	border-radius: var(--carlix-radius);
	box-shadow: var(--carlix-shadow-sm);
	overflow: hidden;
}

caption {
	padding: var(--carlix-space-2) var(--carlix-space-3);
	color: var(--carlix-muted);
	text-align: left;
	caption-side: bottom;
}

th,
td,
.table th,
.table td {
	padding: 0.8rem 0.95rem;
	border-bottom: 1px solid var(--carlix-border);
	text-align: left;
	vertical-align: top;
}

thead th,
.table thead th {
	color: var(--carlix-heading);
	background: #f7f8fa;
	font-weight: 800;
}

tbody tr:last-child > th,
tbody tr:last-child > td {
	border-bottom: 0;
}

.table-striped tbody tr:nth-child(odd) {
	background: #fafafa;
}

.table-hover tbody tr:hover {
	background: color-mix(in srgb, var(--carlix-primary) 6%, #fff);
}

.table-bordered th,
.table-bordered td {
	border: 1px solid var(--carlix-border);
}

.alert {
	position: relative;
	margin-block: 0 var(--carlix-space-4);
	padding: var(--carlix-space-4);
	color: #5f3f00;
	background: #fff8e6;
	border: 1px solid #f7d889;
	border-radius: var(--carlix-radius);
}

.alert > :last-child {
	margin-bottom: 0;
}

.alert-heading {
	margin-block: 0 var(--carlix-space-2);
	color: inherit;
}

.alert-success {
	color: #0f5132;
	background: #dff3e8;
	border-color: #badbcc;
}

.alert-info {
	color: #055160;
	background: #dff6fb;
	border-color: #b6effb;
}

.alert-warning {
	color: #664d03;
	background: #fff3cd;
	border-color: #ffecb5;
}

.alert-danger,
.alert-error {
	color: #842029;
	background: #f8d7da;
	border-color: #f5c2c7;
}

.badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 0.25rem 0.5rem;
	color: #fff;
	background: var(--carlix-primary);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1;
	vertical-align: baseline;
}

.badge.bg-secondary,
.badge-secondary {
	color: var(--carlix-heading);
	background: #e8edf1;
}

.badge.bg-success,
.badge-success {
	background: #198754;
}

.badge.bg-danger,
.badge-danger {
	background: #dc3545;
}

.badge.bg-warning,
.badge-warning {
	color: #1f1f1f;
	background: #ffc107;
}

.badge.bg-info,
.badge-info {
	color: #10242a;
	background: #0dcaf0;
}

.pagination,
.pager,
.pagenavigation {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--carlix-space-2);
	margin: var(--carlix-space-6) 0 0;
	padding: 0;
	list-style: none;
}

.hc-pagination {
	display: grid;
	justify-items: center;
	gap: var(--carlix-space-3);
	margin-block: var(--carlix-space-8) 0;
}

.hc-pagination__counter {
	margin: 0;
	color: var(--carlix-muted);
	font-size: 0.95rem;
	text-align: center;
}

.hc-pagination__links,
.pagination__wrapper {
	display: flex;
	justify-content: center;
	width: 100%;
}

.hc-pagination .pagination {
	margin: 0;
}

.page-item,
.pagination li,
.pager li,
.pagenavigation li {
	margin: 0;
}

.page-link,
.pagination > li > a,
.pagination > li > span,
.pager a,
.pagenavigation a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	min-height: 2.5rem;
	padding: 0.45rem 0.8rem;
	color: var(--carlix-primary);
	background: #fff;
	border: 1px solid var(--carlix-border);
	border-radius: var(--carlix-radius);
	font-weight: 800;
	text-decoration: none;
	line-height: 1;
	transition:
		color var(--carlix-transition),
		background-color var(--carlix-transition),
		border-color var(--carlix-transition),
		box-shadow var(--carlix-transition);
}

.page-link:hover,
.page-link:focus-visible,
.pagination > li > a:hover,
.pagination > li > a:focus-visible,
.pager a:hover,
.pager a:focus-visible,
.pagenavigation a:hover,
.pagenavigation a:focus-visible {
	color: #fff;
	background: var(--carlix-primary);
	border-color: var(--carlix-primary);
	outline: 0;
	box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--carlix-primary) 16%, transparent);
}

.page-item.active .page-link,
.pagination > .active > a,
.pagination > .active > span {
	color: #fff;
	background: var(--carlix-primary);
	border-color: var(--carlix-primary);
}

.page-item.disabled .page-link,
.pagination > .disabled > a,
.pagination > .disabled > span {
	color: color-mix(in srgb, var(--carlix-muted) 58%, #fff);
	background: #f7f8fa;
	border-color: color-mix(in srgb, var(--carlix-border) 70%, #fff);
	pointer-events: none;
}

.page-link > :where([class^="icon-"], [class*=" icon-"]),
.pagination > li > a > :where([class^="icon-"], [class*=" icon-"]),
.pagination > li > span > :where([class^="icon-"], [class*=" icon-"]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1em;
	min-width: 0;
	min-height: 0;
	padding: 0;
	color: currentColor;
	background: transparent;
	border: 0;
	box-shadow: none;
}

@media (max-width: 640px) {
	dl {
		grid-template-columns: 1fr;
		gap: var(--carlix-space-1);
	}

	th,
	td,
	.table th,
	.table td {
		padding: 0.65rem 0.75rem;
	}
}
