/* =====================================================================
   CTL NET – Planos Personalizáveis — estilos públicos
   As regras de breakpoint (largura de card, colunas, carrossel mobile)
   são geradas dinamicamente em PHP (CTLPP_Render::inline_style_tag) a
   partir de CTL NET Planos → Aparência, para que os pontos de quebra
   sejam editáveis pelo admin. Este arquivo contém apenas a "anatomia"
   dos componentes, independente de largura de tela.
   ===================================================================== */

/* Fundo em tela cheia (full-bleed) ------------------------------------
   --ctlpp-vw e --ctlpp-offset vêm do JS (public.js): a largura real da
   tela (sem scrollbar) e a margem exata para encostar a seção na borda
   esquerda, medida via getBoundingClientRect(). Usar apenas porcentagem
   (calc(50% - vw/2)) falha quando a seção está aninhada dentro de um
   container do Elementor que já tem sua própria margem de centralização
   (ex: ".elementor" com largura "boxed") — a % passaria a ser relativa a
   esse container, não à tela. Medir e corrigir via JS é robusto para
   qualquer nível de aninhamento. Fallback 100vw/0 para antes do JS rodar. */
.ctlpp-section {
	width: var(--ctlpp-vw, 100vw);
	max-width: var(--ctlpp-vw, 100vw);
	margin-left: var(--ctlpp-offset, 0px);
	background: var(--ctlpp-section-bg, #0C0D15);
}
/* Remove o respiro que o Elementor coloca ao redor do widget quando o
   fundo em tela cheia está ativo, para a cor realmente encostar nas bordas. */
.elementor-section:has(.ctlpp-section),
.e-con:has(.ctlpp-section) {
	padding: 0 !important;
}
.elementor-column:has(.ctlpp-section) {
	padding: 0 !important;
	width: 100% !important;
}
.elementor-widget:has(> .elementor-widget-container .ctlpp-section),
.elementor-widget:has(> .ctlpp-section) {
	margin: 0 !important;
}
.elementor-widget-container:has(> .ctlpp-section) {
	margin: 0 !important;
	padding: 0 !important;
}

.ctlpp-wrapper {
	--ctlpp-orange: #F05A17;
	--ctlpp-blue: #08245F;
	--ctlpp-bg-dark: #0C0D15;
	--ctlpp-card-bg: #FFFFFF;
	--ctlpp-text: #08245F;
	--ctlpp-switch-on: #F05A17;
	--ctlpp-radius: 14px;
	--ctlpp-icon-size: 32px;
	--ctlpp-font: 'Segoe UI', Arial, sans-serif;
	box-sizing: border-box;
	max-width: 1400px;
	margin: 0 auto;
	padding: 24px 12px;
	font-family: var(--ctlpp-font);
	color: var(--ctlpp-text);
}
.ctlpp-wrapper *,
.ctlpp-wrapper *::before,
.ctlpp-wrapper *::after {
	box-sizing: border-box;
}

/* Abas de categoria ---------------------------------------------------- */
.ctlpp-tabs {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-bottom: 24px;
}
.ctlpp-tab {
	appearance: none;
	border: 2px solid var(--ctlpp-tab-inactive, #e9e9ef);
	background: #fff;
	color: var(--ctlpp-blue);
	padding: 10px 20px;
	border-radius: 999px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.ctlpp-tab.is-active {
	background: var(--ctlpp-tab-active, var(--ctlpp-orange));
	border-color: var(--ctlpp-tab-active, var(--ctlpp-orange));
	color: #fff;
}

.ctlpp-plans-panel[hidden] {
	display: none;
}

.ctlpp-empty {
	text-align: center;
	padding: 40px 0;
	opacity: .7;
}

/* Card ------------------------------------------------------------------ */
.ctlpp-card {
	position: relative;
	background: var(--ctlpp-card-bg, #fff);
	color: var(--ctlpp-card-text, var(--ctlpp-text));
	border: 1px solid var(--ctlpp-card-border, #e9e9ef);
	border-radius: var(--ctlpp-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: var(--ctlpp-card-min-height, auto);
	box-shadow: 0 2px 10px rgba(0,0,0,.06);
	transition: transform .25s ease, box-shadow .25s ease;
}
.ctlpp-card:hover,
.ctlpp-card:focus-within {
	transform: translateY(-6px) scale(1.02);
	box-shadow: 0 16px 32px rgba(0,0,0,.16);
	z-index: 3;
}
.ctlpp-card-featured {
	box-shadow: 0 8px 24px rgba(0,0,0,.18);
	transform: translateY(-4px);
	border-color: transparent;
}
.ctlpp-card-featured:hover,
.ctlpp-card-featured:focus-within {
	transform: translateY(-10px) scale(1.02);
}

.ctlpp-badge-featured {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	background: var(--ctlpp-orange);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 6px 16px;
	border-radius: 0 0 10px 10px;
	z-index: 2;
	white-space: nowrap;
}

.ctlpp-card-cover {
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #eee;
}
.ctlpp-card-cover img,
.ctlpp-card-cover picture {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ctlpp-placeholder-img {
	object-fit: contain !important;
	padding: 20%;
	background: #f4f4f6;
}

.ctlpp-card-body {
	padding: 18px 18px 6px;
	flex: 1 0 auto;
}

.ctlpp-card-title {
	margin: 0 0 12px;
	font-size: 28px;
	font-weight: 800;
	text-align: center;
	color: var(--ctlpp-card-primary, var(--ctlpp-blue));
}

.ctlpp-benefits {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}
.ctlpp-benefits li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid rgba(0,0,0,.08);
	text-align: center;
	justify-content: center;
	font-size: 14px;
}
.ctlpp-benefit-icon {
	color: var(--ctlpp-orange);
	display: inline-flex;
}

.ctlpp-text-personalize_seu_plano {
	display: block;
	text-align: center;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	margin: 10px 0;
	color: var(--ctlpp-card-primary, var(--ctlpp-blue));
}

/* Lista de aplicativos --------------------------------------------------- */
.ctlpp-apps-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.ctlpp-app-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border: 1px solid rgba(0,0,0,.08);
	border-radius: 10px;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}
.ctlpp-app-row[hidden] {
	display: none;
}
/* Destaque ao passar o mouse (desktop) ou tocar/clicar (celular) — cor
   configurável em Aparência ("Cor de destaque ao passar o mouse/tocar no
   aplicativo"). :active cobre o toque no celular, já que touchscreens não
   têm um estado de :hover real. */
.ctlpp-app-row:hover,
.ctlpp-app-row:active {
	border-color: var(--ctlpp-app-hover, var(--ctlpp-orange));
	background-color: color-mix(in srgb, var(--ctlpp-app-hover, var(--ctlpp-orange)) 10%, transparent);
}
.ctlpp-app-icon {
	flex: 0 0 auto;
	width: var(--ctlpp-icon-size);
	height: var(--ctlpp-icon-size);
	display: flex;
	align-items: center;
	justify-content: center;
}
.ctlpp-app-icon img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.ctlpp-app-info {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
}
.ctlpp-app-name {
	font-weight: 700;
	font-size: 14px;
}
.ctlpp-app-savings {
	font-size: 12px;
	color: #1a9c5c;
	font-weight: 600;
}

.ctlpp-switch {
	flex: 0 0 auto;
	position: relative;
	width: 42px;
	height: 24px;
	display: inline-block;
}
.ctlpp-switch input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
	z-index: 1;
}
.ctlpp-switch-track {
	position: absolute;
	inset: 0;
	background: #ccced6;
	border-radius: 999px;
	transition: background .2s ease;
}
.ctlpp-switch-track::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.ctlpp-switch input:checked + .ctlpp-switch-track {
	background: var(--ctlpp-switch-on, var(--ctlpp-orange));
}
.ctlpp-switch input:checked + .ctlpp-switch-track::before {
	transform: translateX(18px);
}
.ctlpp-switch input:focus-visible + .ctlpp-switch-track {
	outline: 2px solid var(--ctlpp-blue);
	outline-offset: 2px;
}

.ctlpp-ver-mais {
	display: block;
	margin: 8px auto 0;
	background: none;
	border: none;
	color: var(--ctlpp-card-primary, var(--ctlpp-blue));
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	padding: 6px;
}
.ctlpp-ver-mais[hidden] {
	display: none;
}

.ctlpp-only-fiber {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	margin-top: 16px;
	padding: 10px;
	background: #fff;
	border: 2px solid var(--ctlpp-card-primary, var(--ctlpp-blue));
	color: var(--ctlpp-card-primary, var(--ctlpp-blue));
	border-radius: 10px;
	font-weight: 700;
	cursor: pointer;
}
.ctlpp-only-fiber:hover {
	background: rgba(0,0,0,.03);
}

/* Rodapé / preços --------------------------------------------------------- */
.ctlpp-card-footer {
	padding: 14px 18px 20px;
	text-align: center;
	margin-top: auto;
}
.ctlpp-price-normal-wrap {
	margin-bottom: 6px;
}
.ctlpp-text-valor_sem_desconto {
	display: block;
	color: #c0392b;
	font-size: 12px;
}
.ctlpp-price-normal-value {
	color: #c0392b;
	font-size: 15px;
}
.ctlpp-text-preco_promocional {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--ctlpp-card-primary, var(--ctlpp-blue));
	margin-top: 6px;
}
.ctlpp-price-promo-value {
	font-size: 34px;
	font-weight: 900;
	color: var(--ctlpp-card-primary, var(--ctlpp-blue));
	line-height: 1.1;
}
.ctlpp-price-period-text {
	font-size: 12px;
	opacity: .8;
	margin-top: 6px;
}
.ctlpp-text-por_tempo_limitado {
	display: inline-block;
	margin-top: 10px;
	background: #fdecea;
	color: #c0392b;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
}

.ctlpp-btn-assine {
	display: block;
	margin-top: 14px;
	padding: 14px;
	background: var(--ctlpp-card-button, var(--ctlpp-orange));
	color: #fff;
	text-align: center;
	text-decoration: none;
	font-weight: 800;
	font-size: 16px;
	border-radius: 10px;
	transition: filter .15s ease;
}
.ctlpp-btn-assine:hover,
.ctlpp-btn-assine:focus {
	filter: brightness(.92);
	color: #fff;
}

/* Card destaque: inverte paleta ------------------------------------------- */
.ctlpp-card-featured {
	background: var(--ctlpp-card-bg);
}
.ctlpp-card-featured .ctlpp-card-title,
.ctlpp-card-featured .ctlpp-text-personalize_seu_plano,
.ctlpp-card-featured .ctlpp-text-preco_promocional,
.ctlpp-card-featured .ctlpp-price-promo-value {
	color: var(--ctlpp-card-text, #fff);
}

/* Carrossel: trilha de cards (mecânica agnóstica de largura) ------------- */
.ctlpp-cards-carousel {
	position: relative;
}
.ctlpp-cards-track {
	scrollbar-width: none;
}
.ctlpp-cards-track::-webkit-scrollbar {
	display: none;
}
/* Setas e bolinhas do carrossel mobile — escondidas por padrão; a faixa de
   celular (gerada em PHP a partir dos breakpoints de Aparência) é quem
   decide exibi-las de fato, então aqui elas só existem visualmente dentro
   dessa faixa (ver inline_style_tag() em class-render.php). */
.ctlpp-carousel-arrow {
	display: none;
	position: absolute;
	top: 45%;
	transform: translateY(-50%);
	z-index: 2;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,.9);
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
	color: var(--ctlpp-app-hover, var(--ctlpp-orange));
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	align-items: center;
	justify-content: center;
}
.ctlpp-carousel-prev { left: 4px; }
.ctlpp-carousel-next { right: 4px; }
.ctlpp-carousel-dots {
	display: none;
	justify-content: center;
	gap: 6px;
	margin-top: 10px;
}
.ctlpp-carousel-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ccced6;
	border: none;
	padding: 0;
	cursor: pointer;
}
.ctlpp-carousel-dot.is-active {
	background: var(--ctlpp-app-hover, var(--ctlpp-orange));
}

/* Pré-visualização no admin ------------------------------------------------ */
.ctlpp-preview {
	background: var(--ctlpp-bg-dark);
	padding: 24px;
	border-radius: 8px;
}
