/*
 * Página do curso — [thelma_player], [thelma_acoes], [thelma_descricao],
 * [thelma_conteudo] e [thelma_breadcrumb].
 *
 * Toda a personalização visual passa por estas variáveis. Redefina-as no CSS
 * do tema/Bricks (em :root ou num container) para mudar cor, cantos e fonte
 * sem tocar neste arquivo. O player (Plyr) lê as --plyr-*.
 */

:root {
	--thelma-cor: #5b3df5;
	--thelma-cor-texto-sobre: #fff;
	--thelma-texto: #1d2327;
	--thelma-texto-suave: #646970;
	--thelma-borda: #e3e5e8;
	--thelma-fundo: #fff;
	--thelma-fundo-suave: #f6f7f9;
	--thelma-sucesso: #1a9d55;
	--thelma-raio: 12px;
	--thelma-raio-pequeno: 8px;
	--thelma-fonte: inherit;
	--thelma-base: 1em;
	/* 1em = herda de quem envolve o shortcode (o elemento do Bricks manda);
	   troque por um valor fixo (18px) para ignorar o que vem de fora */
	--thelma-altura-linha: inherit;
	--thelma-escala: 1;
	/* 1.1 = tudo 10% maior */
	--thelma-sombra: 0 1px 2px rgba(0, 0, 0, 0.06);

	--plyr-color-main: var(--thelma-cor);
	--plyr-video-control-color: #fff;
	--plyr-control-radius: 6px;
	--plyr-font-family: var(--thelma-fonte);
}

.thelma-player,
.thelma-acoes,
.thelma-descricao,
.thelma-conteudo,
.thelma-autor,
.thelma-breadcrumb {
	box-sizing: border-box;
	color: var(--thelma-texto);
	font-family: var(--thelma-fonte);
	font-size: calc(var(--thelma-base) * var(--thelma-escala));
	line-height: var(--thelma-altura-linha);
	/* Ocupa a largura inteira do elemento onde o shortcode foi colocado: é o
	   elemento do Bricks que decide a largura, nunca o shortcode. Sem isto,
	   dentro de um elemento em flex o bloco encolhe até o tamanho do conteúdo. */
	width: 100%;
	max-width: 100%;
	min-width: 0;
	/* Uma "palavra" maior que a coluna (um endereço longo, um nome sem espaço)
	   quebra, em vez de segurar a largura: sem isto, ela fazia a coluna da
	   grade não encolher e empurrava a coluna vizinha para fora da tela. */
	overflow-wrap: anywhere;
}

/* solto="1": o nosso elemento sai do caminho e os blocos internos viram
   filhos diretos do elemento que envolve o shortcode (o do Bricks), que passa
   a mandar no layout deles (flex, grid, gap). */
.thelma-solto {
	display: contents;
}

.thelma-player *,
.thelma-acoes *,
.thelma-descricao *,
.thelma-conteudo *,
.thelma-autor *,
.thelma-breadcrumb * {
	box-sizing: border-box;
}

.thelma-icone {
	flex: none;
	width: 1.25em;
	height: 1.25em;
}

/* Botões ----------------------------------------------------------------- */

.thelma-botao {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	min-height: 2.75em;
	/* 44px */
	padding: 0.5em 1.125em;
	border: 1px solid var(--thelma-borda);
	border-radius: 999px;
	background: var(--thelma-fundo);
	color: var(--thelma-texto);
	font: inherit;
	font-size: 0.875em;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.thelma-botao:hover {
	border-color: var(--thelma-cor);
	color: var(--thelma-cor);
	text-decoration: none;
}

.thelma-botao:focus-visible {
	outline: 2px solid var(--thelma-cor);
	outline-offset: 2px;
}

.thelma-botao:disabled {
	opacity: 0.6;
	cursor: wait;
}

.thelma-botao--primario,
.thelma-botao--concluir.thelma-botao--ligado {
	border-color: var(--thelma-cor);
	background: var(--thelma-cor);
	color: var(--thelma-cor-texto-sobre);
}

.thelma-botao--concluir.thelma-botao--ligado {
	border-color: var(--thelma-sucesso);
	background: var(--thelma-sucesso);
}

.thelma-botao--concluir.thelma-botao--ligado:hover {
	color: var(--thelma-cor-texto-sobre);
	opacity: 0.9;
}

.thelma-botao--icone {
	min-width: 3em;
	padding: 0.6em 1em;
	justify-content: center;
}

.thelma-botao--icone .thelma-icone {
	width: 1.375em;
	height: 1.375em;
}

.thelma-botao--icone.thelma-botao--ligado {
	border-color: var(--thelma-cor);
	background: color-mix(in srgb, var(--thelma-cor) 10%, var(--thelma-fundo));
	color: var(--thelma-cor);
}

.thelma-botao--leve {
	border-color: transparent;
	background: transparent;
	color: var(--thelma-texto-suave);
}

.thelma-botao__contagem {
	font-variant-numeric: tabular-nums;
}

/* Player ----------------------------------------------------------------- */

.thelma-player__cabeca {
	margin-bottom: 1rem;
}

.thelma-player__titulo {
	margin: 0 0 20px;
	font-size: 1.375em;
	/* 22px quando a base é 16px; em, para o Bricks poder mandar */
	font-weight: 600;
	line-height: 1.2;
}

.thelma-player__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 2.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.thelma-player__dado {
	display: grid;
	grid-template-columns: auto auto;
	grid-template-rows: auto auto;
	column-gap: 0.4em;
	align-items: center;
	margin: 0;
	color: var(--thelma-texto-suave);
	font-size: 0.875em;
	/* 14px: é o rótulo */
}

.thelma-player__dado .thelma-icone {
	grid-row: 1 / 3;
	width: 1.375em;
	height: 1.375em;
	color: var(--thelma-cor);
}

.thelma-player__valor {
	color: var(--thelma-texto);
	font-size: 1.143em;
	/* 16px */
	font-weight: 600;
}

.thelma-player__video {
	position: relative;
	overflow: hidden;
	border-radius: var(--thelma-raio);
	background: #000;
	box-shadow: var(--thelma-sombra);
}

.thelma-player__video--vazio,
.thelma-player__video--link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	padding: 2rem 1rem;
	background: var(--thelma-fundo-suave);
}

.thelma-player__aviso {
	margin: 0;
	color: var(--thelma-texto-suave);
	text-align: center;
}

.thelma-player .plyr {
	border-radius: var(--thelma-raio);
}

/* Barra de controles: faixa inteira, fundo escuro quase opaco (tampa a marca
   do YouTube no canto), e some quando o mouse para, como no YouTube. */
.thelma-player .plyr--video .plyr__controls {
	padding: 14px 16px;
	background: var(--thelma-player-barra, rgba(0, 0, 0, 0.82));
}

/* O tema não manda nos controles do player: sem isto, o estilo que o tema dá a
   input[type=range] e <progress> quebra a barra de progresso (bolinha fora do
   lugar, cor que não começa no zero).
   O !important é necessário: tema e construtor costumam estilizar `input` com
   !important, e aí sobrava um padding à esquerda que empurrava o trilho e
   deixava um pedaço morto no começo da barra. */
.thelma-player .plyr input[type="range"] {
	-webkit-appearance: none !important;
	appearance: none !important;
	box-sizing: border-box !important;
	width: 100%;
	min-width: 0 !important;
	max-width: none !important;
	height: 19px !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none;
	line-height: normal !important;
	font-size: 1em;
}

.thelma-player .plyr input[type="range"]::-webkit-slider-runnable-track {
	height: 5px;
	border: 0;
	border-radius: 3px;
	background: var(--plyr-range-track-background, rgba(255, 255, 255, 0.25));
	background-image: linear-gradient(to right, currentColor var(--value, 0%), transparent var(--value, 0%));
}

.thelma-player .plyr input[type="range"]::-moz-range-track {
	height: 5px;
	border: 0;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.25);
}

.thelma-player .plyr input[type="range"]::-moz-range-progress {
	height: 5px;
	border-radius: 3px;
	background: currentColor;
}

.thelma-player .plyr input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 13px;
	height: 13px;
	margin-top: -4px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.thelma-player .plyr input[type="range"]::-moz-range-thumb {
	width: 13px;
	height: 13px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.thelma-player .plyr .plyr__progress {
	margin-right: 0;
}

.thelma-player .plyr .plyr__progress input[type="range"],
.thelma-player .plyr .plyr__progress progress {
	left: 0;
	width: 100%;
	margin: 0;
	padding: 0 !important;
}

.thelma-player .plyr progress {
	-webkit-appearance: none !important;
	appearance: none !important;
	box-sizing: border-box !important;
	height: 5px;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 3px;
	background: transparent !important;
	box-shadow: none !important;
}

/* Faixa escura que tampa o título/logo que o YouTube mostra em cima na
   pausa (a barra de controles, sempre visível, já cobre o logo de baixo).
   Não pega clique: o vídeo continua clicável. */
.thelma-player .plyr--youtube .plyr__video-wrapper::before {
	content: "";
	position: absolute;
	right: 0;
	left: 0;
	z-index: 1;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.thelma-player .plyr--youtube .plyr__video-wrapper::before {
	top: 0;
	height: 64px;
	background: linear-gradient(#000 40%, rgba(0, 0, 0, 0));
	opacity: 0;
}

.thelma-player .plyr--youtube.plyr--paused .plyr__video-wrapper::before,
.thelma-player .plyr--youtube.plyr--stopped .plyr__video-wrapper::before {
	opacity: 1;
}

.thelma-player .plyr__control--overlaid {
	background: var(--thelma-cor);
}

/* Ações ------------------------------------------------------------------ */

.thelma-acoes {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	margin-top: 1.25rem;
}

.thelma-acoes__grupo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.thelma-acoes__navegacao {
	margin-left: auto;
}

.thelma-acoes__erro {
	flex: 1 1 100%;
	margin: 0;
	color: #b32d2e;
	font-size: 0.9375em;
}

/* Autor do curso ---------------------------------------------------------- */

.thelma-autor {
	display: flex;
	align-items: center;
	gap: 0.75em;
}

.thelma-autor__foto {
	flex: none;
	width: var(--thelma-autor-foto, 44px);
	height: var(--thelma-autor-foto, 44px);
	border-radius: 50%;
	object-fit: cover;
	background: var(--thelma-fundo-suave);
}

.thelma-autor__info {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	min-width: 0;
}

.thelma-autor__nome {
	display: flex;
	align-items: center;
	gap: 0.3em;
	font-size: 1em;
	/* 600 é o mais grosso que este plugin usa: acima disso o peso desequilibra */
	font-weight: 600;
	line-height: 1.25;
	color: var(--thelma-texto);
}

.thelma-autor__selo {
	display: inline-flex;
	flex: none;
	color: var(--thelma-autor-selo, #1d9bf0);
}

.thelma-autor__selo .thelma-icone {
	width: 1.05em;
	height: 1.05em;
}

.thelma-autor__especialidade {
	font-size: 0.875em;
	font-weight: 400;
	line-height: 1.3;
	color: var(--thelma-texto-suave);
}

/* Descrição -------------------------------------------------------------- */

.thelma-descricao__texto {
	font-size: 1.125em;
	/* 18px */
	line-height: 1.7;
}

.thelma-descricao__texto> :first-child {
	margin-top: 0;
}

/* Os links do texto da aula: na cor da marca, sublinhados (dá para ver que
   são links). */
.thelma-descricao__texto a {
	color: var(--thelma-cor, #f9227b);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	overflow-wrap: anywhere;
}

.thelma-descricao__texto a:hover,
.thelma-descricao__texto a:focus-visible {
	text-decoration-thickness: 2px;
}

/* O link que mostra o próprio endereço: uma linha só, cortado com reticências
   (o endereço inteiro no clique e ao passar o mouse). É "quebra em qualquer
   ponto + mostra só a 1ª linha", e não white-space: nowrap: com nowrap, o
   endereço inteiro vira a largura mínima da coluna e a grade não encolhe. */
.thelma-descricao__texto a.thelma-link-endereco {
	display: -webkit-inline-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	max-width: 100%;
	overflow: hidden;
	overflow-wrap: anywhere;
	word-break: break-all;
	vertical-align: bottom;
}

.thelma-anexos-lista {
	margin-bottom: 1.5rem;
}

.thelma-anexos-lista:last-child {
	margin-bottom: 0;
}

.thelma-anexos-lista__titulo {
	margin: 0 0 0.75rem;
	font-size: 1em;
	font-weight: 600;
}

.thelma-anexos-lista__itens {
	display: grid;
	/* No máximo 260px de mínimo, mas nunca mais que a coluna: uma coluna
	   estreita não pode ser forçada a ter 260px. */
	grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.thelma-anexo-item {
	margin: 0;
}

.thelma-anexo-item__link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--thelma-borda);
	border-radius: var(--thelma-raio-pequeno);
	background: var(--thelma-fundo);
	color: var(--thelma-texto);
	text-decoration: none;
	transition: border-color 0.15s ease;
}

.thelma-anexo-item__link:hover {
	border-color: var(--thelma-cor);
	text-decoration: none;
}

.thelma-anexo-item__icone {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	overflow: hidden;
	border-radius: var(--thelma-raio-pequeno);
	background: var(--thelma-fundo-suave);
	color: var(--thelma-cor);
}

.thelma-anexo-item__icone img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.thelma-anexo-item__info {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.thelma-anexo-item__nome {
	overflow: hidden;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.thelma-anexo-item__detalhe {
	color: var(--thelma-texto-suave);
	font-size: 0.875em;
}

.thelma-anexo-item__baixar {
	flex: none;
	color: var(--thelma-texto-suave);
}

/* Conteúdo do curso ------------------------------------------------------- */

.thelma-conteudo {
	overflow: hidden;
	border: 1px solid var(--thelma-borda);
	border-radius: var(--thelma-raio);
	background: var(--thelma-fundo);
}

.thelma-conteudo__cabeca {
	padding: 1rem 1.1rem;
	border-bottom: 1px solid var(--thelma-borda);
}

.thelma-conteudo__titulo {
	margin: 0;
	font-size: 1em;
	font-weight: 600;
}

.thelma-progresso {
	margin-top: 0.6rem;
}

.thelma-progresso__texto {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	margin: 0 0 0.35rem;
	color: var(--thelma-texto-suave);
	font-size: 0.875em;
}

.thelma-progresso__texto strong {
	color: var(--thelma-texto);
}

.thelma-progresso__barra {
	height: 8px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--thelma-fundo-suave);
}

.thelma-progresso__feito {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--thelma-cor);
	transition: width 0.3s ease;
}

.thelma-modulos-lista,
.thelma-aulas-lista {
	margin: 0;
	padding: 0;
	list-style: none;
}

.thelma-modulo-item {
	margin: 0;
	border-bottom: 1px solid var(--thelma-borda);
}

.thelma-modulo-item:last-child {
	border-bottom: 0;
}

/* A faixa do módulo tem fundo próprio: é o que separa, de relance, as aulas do
   módulo 1 das do módulo 2 numa lista longa. O módulo aberto puxa a cor da
   marca; os fechados ficam num cinza claro. */
.thelma-modulo-item__cabeca {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	width: 100%;
	padding: 0.9rem 1.1rem;
	border: 0;
	border-left: 3px solid transparent;
	background: var(--thelma-modulo-fundo, var(--thelma-fundo-suave));
	color: var(--thelma-texto);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background 0.15s ease;
}

.thelma-modulo-item__cabeca:hover {
	background: var(--thelma-modulo-fundo-hover, color-mix(in srgb, var(--thelma-cor) 10%, var(--thelma-fundo-suave)));
}

.thelma-modulo-item--aberto .thelma-modulo-item__cabeca {
	border-left-color: var(--thelma-cor);
	background: var(--thelma-modulo-fundo-aberto, color-mix(in srgb, var(--thelma-cor) 20%, var(--thelma-fundo)));
}

.thelma-modulo-item--aberto .thelma-modulo-item__nome {
	color: var(--thelma-cor);
}

.thelma-modulo-item__cabeca:focus-visible {
	outline: 2px solid var(--thelma-cor);
	outline-offset: -2px;
}

.thelma-modulo-item__nome {
	flex: 1 1 auto;
	font-size: 0.875em;
	font-weight: 600;
}

.thelma-modulo-item__meta {
	flex: none;
	color: var(--thelma-texto-suave);
	font-size: 0.875em;
	white-space: nowrap;
}

.thelma-modulo-item__cabeca .thelma-icone--chevron {
	color: var(--thelma-texto-suave);
	transition: transform 0.2s ease;
}

.thelma-modulo-item--aberto .thelma-modulo-item__cabeca .thelma-icone--chevron {
	transform: rotate(180deg);
}

.thelma-aulas-lista {
	background: var(--thelma-fundo);
}

.thelma-aula-item {
	margin: 0;
}

.thelma-aula-item__link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.7rem 1.1rem 0.7rem 1.4rem;
	border-left: 3px solid transparent;
	color: var(--thelma-texto);
	text-decoration: none;
}

.thelma-aula-item__link:hover {
	background: var(--thelma-fundo-suave);
	text-decoration: none;
}

.thelma-aula-item--atual .thelma-aula-item__link {
	border-left-color: var(--thelma-cor);
	background: color-mix(in srgb, var(--thelma-cor) 6%, var(--thelma-fundo));
}

.thelma-aula-item__texto {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.thelma-aula-item__nome {
	font-weight: 600;
	font-size: 0.875em;
	/* 16px */
}

.thelma-aula-item--atual .thelma-aula-item__nome {
	color: var(--thelma-cor);
}

.thelma-aula-item__detalhe {
	color: var(--thelma-texto-suave);
	font-size: 0.75em;
}

.thelma-aula-item__icone {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 2em;
	height: 2em;
	border: 1.5px solid var(--thelma-borda);
	border-radius: 50%;
	color: var(--thelma-texto-suave);
}

.thelma-aula-item__icone .thelma-icone {
	width: 1rem;
	height: 1rem;
}

.thelma-aula-item__icone .thelma-icone--check {
	width: 1.15rem;
	height: 1.15rem;
}

.thelma-aula-item--concluida .thelma-aula-item__icone {
	border-color: var(--thelma-sucesso);
	background: var(--thelma-sucesso);
	color: #fff;
}

/* Breadcrumb ------------------------------------------------------------- */

.thelma-breadcrumb__lista {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125em;
}

.thelma-breadcrumb__item {
	display: inline-flex;
	align-items: center;
	margin: 0;
}

.thelma-breadcrumb__link {
	display: inline-flex;
	align-items: center;
	color: var(--thelma-texto-suave);
	text-decoration: none;
}

.thelma-breadcrumb__link:hover {
	color: var(--thelma-cor);
}

.thelma-breadcrumb__atual {
	color: var(--thelma-cor);
	font-weight: 600;
}

.thelma-breadcrumb__separador {
	display: inline-flex;
	margin: 0 0.15rem;
	color: var(--thelma-borda);
}

.thelma-breadcrumb__separador .thelma-icone {
	width: 1rem;
	height: 1rem;
}

/* Telas pequenas --------------------------------------------------------- */

@media (max-width: 600px) {
	.thelma-player__meta {
		gap: 0.5rem 1.1rem;
	}

	.thelma-acoes__navegacao {
		flex: 1 1 100%;
		justify-content: space-between;
		margin-left: 0;
	}

	.thelma-modulo-item__cabeca,
	.thelma-conteudo__cabeca {
		padding-inline: 0.9rem;
	}

	.thelma-aula-item__link {
		padding-inline: 0.9rem 1.1rem;
	}
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}