/*
 * Gating Pro — paywall da previsão. Replica o Waves Pro
 * (_forecastRestrictionOverlay.php + overrides.css): card VERMELHO, texto branco,
 * botão branco com texto vermelho, sobre os dias bloqueados borrados (blur+grayscale).
 * Usa as variáveis --wf-* do common.css. Não sobrescreve nada do Elementor.
 */

:root { --wf-waves-red: #FF0000; }

/* Região do gate: centraliza o card. */
.wf-gate {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-sizing: border-box;
	margin-top: 14px;
	border-radius: var(--wf-glass-radius, 16px);
	background: var(--wf-bg, #e8ecf4);
}
.wf-gate--more { min-height: 160px; }
.wf-gate--compact { min-height: 120px; }

/* Faixa de dias borrada atrás do card (skeleton sintético) — só na variante 'more'. */
.wf-gate__teaser {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	gap: 18px;
	padding: 18px 24px;
	filter: blur(5px);
	opacity: 0.5;
	pointer-events: none;
}
.wf-gate__teaser-day {
	flex: 1 1 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 6px;
	height: 100%;
}
.wf-gate__bar {
	width: 14px;
	border-radius: 6px 6px 0 0;
	background: linear-gradient(180deg, var(--wf-text-secondary, #444c5c), var(--wf-accent, #1C1EF8));
	display: block;
}

/* Caixa VERMELHA central com o CTA (igual ao Pro). */
.wf-gate__card {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-align: center;
	box-sizing: border-box;
	max-width: 420px;
	width: auto;
	padding: 1.3rem 1.6rem;
	background: var(--wf-waves-red, #FF0000);
	color: #ffffff;
	border-radius: 16px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* Wordmark "waves PRO" (texto, sempre renderiza — sem depender de imagem). */
.wf-gate__brand {
	font-family: var(--wf-sans, 'Helvetica Neue', Helvetica, Arial, sans-serif);
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #ffffff;
	margin-bottom: 2px;
	text-transform: lowercase;
}
.wf-gate__brand strong {
	font-weight: 800;
	margin-left: 4px;
	padding: 1px 6px;
	border-radius: 5px;
	background: #ffffff;
	color: var(--wf-waves-red, #FF0000);
	text-transform: uppercase;
	font-size: 0.72em;
	letter-spacing: 0.04em;
	vertical-align: middle;
}

.wf-gate__headline {
	font-family: var(--wf-sans, 'Helvetica Neue', Helvetica, Arial, sans-serif);
	font-size: 1.2rem;
	font-weight: 700;
	color: #ffffff;
	max-width: 26ch;
	line-height: 1.25;
}
.wf-gate__sub {
	font-family: var(--wf-sans, 'Helvetica Neue', Helvetica, Arial, sans-serif);
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.92);
	max-width: 40ch;
	line-height: 1.4;
}

.wf-gate__btn {
	display: inline-block;
	margin-top: 10px;
	padding: 11px 28px;
	border-radius: 999px;
	background: #ffffff;
	color: var(--wf-waves-red, #FF0000);
	font-family: var(--wf-sans, 'Helvetica Neue', Helvetica, Arial, sans-serif);
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-decoration: none;
	text-transform: uppercase;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wf-gate__btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	color: var(--wf-waves-red, #FF0000);
}

@media (max-width: 600px) {
	.wf-gate__headline { font-size: 1.05rem; }
	.wf-gate__sub { font-size: 0.85rem; }
}

/* ===== Desktop: overlay sobre os dias bloqueados, DENTRO da área rolável =====
 * O JS (chart.js) posiciona left/width/height inline conforme a geometria do canvas,
 * cobrindo do dia (limite+1) até o fim — acompanha o scroll horizontal. Os dias
 * bloqueados são redigidos (zerados) no PHP; o blur+grayscale esconde o esqueleto. */
.wf-chart .chart-wrap { position: relative; }

.wf-chart__desktop-preview-overlay {
	position: absolute;
	z-index: 6;
	border-radius: var(--wf-glass-radius, 16px);
	overflow: hidden;
}
.wf-chart__desktop-preview-overlay[hidden] { display: none; }

.wf-chart__desktop-preview-overlay .wf-gate {
	width: 100%;
	height: 100%;
	margin: 0;
	border-radius: inherit;
	background: rgba(255, 255, 255, 0.1);
	-webkit-backdrop-filter: blur(10px) grayscale(100%);
	backdrop-filter: blur(10px) grayscale(100%);
}
@media (max-width: 768px) {
	.wf-chart__desktop-preview-overlay { display: none !important; }
}

/* ===== Mobile: blur do conteúdo + card centralizado (estado is-preview) ===== */
.wf-chart__preview-stage { position: relative; }

.wf-chart .mobile-view.is-preview .mob-content {
	filter: blur(10px) grayscale(100%);
	-webkit-filter: blur(10px) grayscale(100%);
	pointer-events: none;
	user-select: none;
}

.wf-chart__preview-overlay {
	position: absolute;
	inset: 0;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
}
.wf-chart__preview-overlay[hidden] { display: none; }
.wf-chart__preview-overlay .wf-gate {
	width: 100%;
	height: 100%;
	margin: 0;
	background: transparent;
}

/* ===== Tabela (clássica e moderna): dias bloqueados borrados + card centralizado =====
 * Dias bloqueados renderizam só o cabeçalho (como no Pro). A região recebe uma
 * min-height para o card caber sem ser cortado, e o overlay centraliza o card. */
.wf-table__restricted,
.wf-table-modern__restricted {
	position: relative;
	min-height: 210px;
}

.wf-table__restricted .wf-table__day,
.wf-table-modern__restricted .mtb-day,
.wf-table-modern__restricted .mtb-rows {
	filter: blur(6px) grayscale(100%);
	-webkit-filter: blur(6px) grayscale(100%);
	pointer-events: none;
	user-select: none;
}

.wf-table__restricted-overlay,
.wf-table-modern__restricted-overlay {
	position: absolute;
	inset: 0;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
}
/* O card não pode ser cortado: a região é baixa, então o .wf-gate não recorta. */
.wf-table__restricted-overlay .wf-gate,
.wf-table-modern__restricted-overlay .wf-gate {
	width: 100%;
	height: 100%;
	margin: 0;
	background: transparent;
	overflow: visible;
}

/* ===== Spectrum: polar borrado + card centralizado (hora bloqueada) ===== */
.wf-spectrum__preview-stage { position: relative; }
.wf-spectrum.is-preview .wf-spectrum__polar {
	filter: blur(10px) grayscale(100%);
	-webkit-filter: blur(10px) grayscale(100%);
	pointer-events: none;
	user-select: none;
}
.wf-spectrum__preview-overlay {
	position: absolute;
	inset: 0;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
}
.wf-spectrum__preview-overlay[hidden] { display: none; }
.wf-spectrum__preview-overlay .wf-gate {
	width: 100%;
	height: 100%;
	margin: 0;
	background: transparent;
}
