/*
 * GW Login — página de login, shortcodes e perfil.
 *
 * Todas as cores e medidas vêm de variáveis (--gwl-*) geradas a partir das
 * opções do plugin. Os valores abaixo são só o fallback.
 * Tudo fica dentro de .gwl para o tema não vazar para dentro (e vice-versa).
 */

.gwl {
	--gwl-page-bg: #060911;
	--gwl-bg-image: none;
	--gwl-overlay: rgba(6, 9, 17, .6);
	--gwl-card-bg: #1a202c;
	--gwl-card-border: #2d3748;
	--gwl-card-width: 420px;
	--gwl-card-padding: 40px;
	--gwl-card-radius: 16px;
	--gwl-card-shadow: 0 10px 30px rgba(0, 0, 0, .18);
	--gwl-title: #ffffff;
	--gwl-text: #f5f7ff;
	--gwl-link: #00a1d5;
	--gwl-input-bg: #060911;
	--gwl-input-text: #f5f7ff;
	--gwl-placeholder: #5b6478;
	--gwl-input-border: #2d3748;
	--gwl-input-focus: #00a1d5;
	--gwl-input-height: 48px;
	--gwl-input-radius: 10px;
	--gwl-button-bg: #0664b9;
	--gwl-button-text: #ffffff;
	--gwl-button-hover: #00a1d5;
	--gwl-button-radius: 10px;
	--gwl-error: #fb831b;
	--gwl-success: #00d4aa;
	--gwl-font-size: 15px;
	--gwl-logo-width: 160px;
	--gwl-font-title: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--gwl-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

	font-family: var(--gwl-font-body);
	font-size: var(--gwl-font-size);
	line-height: 1.5;
	color: var(--gwl-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.gwl *,
.gwl *::before,
.gwl *::after {
	box-sizing: border-box;
}

.gwl [hidden],
.gwl .gwl-is-hidden {
	display: none !important;
}

/* ── Página própria ─────────────────────────────────────────────────────── */

body.gwl-page {
	margin: 0;
	min-height: 100vh;
	background: var(--gwl-page-bg);
}

.gwl-page .gwl-wrap {
	display: flex;
	min-height: 100vh;
}

.gwl-page .gwl-main {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 48px 16px;
}

.gwl-page .gwl-side {
	display: none;
	position: relative;
	background-color: var(--gwl-page-bg);
	background-image: var(--gwl-bg-image), linear-gradient(135deg, var(--gwl-button-bg), var(--gwl-page-bg));
	background-size: cover;
	background-position: center;
}

.gwl-page .gwl-side::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--gwl-overlay);
}

/* Centralizado: imagem cobre a página inteira */
.gwl-layout-center.gwl-has-bg-image .gwl-wrap {
	position: relative;
	background-image: var(--gwl-bg-image);
	background-size: cover;
	background-position: center;
}

.gwl-layout-center.gwl-has-bg-image .gwl-wrap::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--gwl-overlay);
}

/* Dividido: painel da imagem + formulário */
.gwl-layout-split-left .gwl-side,
.gwl-layout-split-right .gwl-side {
	display: block;
	flex: 1 1 50%;
}

.gwl-layout-split-left .gwl-main,
.gwl-layout-split-right .gwl-main {
	flex: 1 1 50%;
}

.gwl-layout-split-right .gwl-wrap {
	flex-direction: row-reverse;
}

@media (max-width: 900px) {
	.gwl-layout-split-left .gwl-side,
	.gwl-layout-split-right .gwl-side {
		display: none;
	}
}

/* ── Card ───────────────────────────────────────────────────────────────── */

.gwl .gwl-card {
	position: relative;
	width: 100%;
	max-width: var(--gwl-card-width);
	padding: var(--gwl-card-padding);
	background: var(--gwl-card-bg);
	border: 1px solid var(--gwl-card-border);
	border-radius: var(--gwl-card-radius);
	box-shadow: var(--gwl-card-shadow);
	color: var(--gwl-text);
}

.gwl-embed .gwl-card {
	margin: 0 auto;
}

.gwl .gwl-card--wide {
	max-width: var(--gwl-profile-width, 640px);
}

.gwl .gwl-card--compact {
	text-align: center;
	padding: 32px;
}

@media (max-width: 480px) {
	.gwl .gwl-card {
		padding: min(var(--gwl-card-padding), 24px);
	}

	.gwl-page .gwl-main {
		padding: 24px 16px;
	}
}

/* ── Logo e títulos ─────────────────────────────────────────────────────── */

.gwl .gwl-logo {
	margin: 0 0 28px;
	text-align: center;
}

.gwl .gwl-logo a {
	display: inline-block;
	text-decoration: none;
}

.gwl .gwl-logo img {
	display: block;
	width: var(--gwl-logo-width);
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.gwl .gwl-logo-text {
	font-family: var(--gwl-font-title);
	font-size: 1.4em;
	font-weight: 700;
	color: var(--gwl-title);
}

.gwl .gwl-title {
	margin: 0 0 8px;
	padding: 0;
	font-family: var(--gwl-font-title);
	font-size: 1.6em;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -.01em;
	text-align: center;
	text-wrap: balance;
	color: var(--gwl-title);
}

.gwl .gwl-subtitle {
	margin: 0 0 28px;
	text-wrap: pretty;
	text-align: center;
	color: var(--gwl-text);
	opacity: .78;
}

.gwl .gwl-break {
	word-break: break-all;
}

.gwl .gwl-nowrap {
	white-space: nowrap;
}

/* ── Campos ─────────────────────────────────────────────────────────────── */

.gwl .gwl-form {
	margin: 0;
}

.gwl .gwl-field {
	margin: 0 0 18px;
}

.gwl .gwl-field label {
	display: block;
	margin: 0 0 8px;
	font-size: .9em;
	font-weight: 600;
	color: var(--gwl-text);
}

.gwl .gwl-input {
	display: block;
	width: 100%;
	height: var(--gwl-input-height);
	min-height: 0;
	margin: 0;
	padding: 0 14px;
	font: inherit;
	line-height: normal;
	color: var(--gwl-input-text);
	background: var(--gwl-input-bg);
	border: 1px solid var(--gwl-input-border);
	border-radius: var(--gwl-input-radius);
	box-shadow: none;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.gwl .gwl-input::placeholder {
	color: var(--gwl-placeholder);
	opacity: 1;
}

.gwl .gwl-code-input::placeholder {
	letter-spacing: .4em;
}

.gwl .gwl-input:focus {
	border-color: var(--gwl-input-focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gwl-input-focus) 25%, transparent);
}

/* Autocompletar do Chrome pinta o campo de amarelo/azul */
.gwl .gwl-input:-webkit-autofill {
	-webkit-text-fill-color: var(--gwl-input-text);
	-webkit-box-shadow: 0 0 0 1000px var(--gwl-input-bg) inset;
	caret-color: var(--gwl-input-text);
}

.gwl .gwl-password {
	position: relative;
}

.gwl .gwl-password .gwl-input {
	padding-right: 48px;
}

.gwl .gwl-toggle-pass {
	position: absolute;
	top: 50%;
	right: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	color: var(--gwl-input-text);
	background: transparent;
	border: 0;
	border-radius: 8px;
	opacity: .6;
	cursor: pointer;
	transform: translateY(-50%);
}

.gwl .gwl-toggle-pass:hover,
.gwl .gwl-toggle-pass:focus-visible {
	opacity: 1;
	background: transparent;
	color: var(--gwl-input-text);
}

.gwl .gwl-toggle-pass .gwl-eye-off,
.gwl .gwl-toggle-pass.is-visible .gwl-eye {
	display: none;
}

.gwl .gwl-toggle-pass.is-visible .gwl-eye-off {
	display: block;
}

.gwl .gwl-check {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	font-size: .9em;
	color: var(--gwl-text);
	cursor: pointer;
}

.gwl .gwl-check input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--gwl-button-bg);
}

.gwl .gwl-code-input {
	font-size: 1.4em;
	font-variant-numeric: tabular-nums;
	letter-spacing: .4em;
	text-align: center;
}

.gwl .gwl-turnstile {
	display: flex;
	justify-content: center;
	min-height: 65px;
	margin: 0 0 18px;
}

/* ── Botões e links ─────────────────────────────────────────────────────── */

.gwl .gwl-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: var(--gwl-input-height);
	margin: 0;
	padding: 0 20px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	color: var(--gwl-button-text);
	background: var(--gwl-button-bg);
	border: 0;
	border-radius: var(--gwl-button-radius);
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease, transform .05s ease;
}

.gwl .gwl-button:hover,
.gwl .gwl-button:focus {
	color: var(--gwl-button-text);
	background: var(--gwl-button-hover);
	text-decoration: none;
}

.gwl .gwl-button:focus-visible {
	outline: 2px solid var(--gwl-input-focus);
	outline-offset: 2px;
}

.gwl .gwl-button:active {
	transform: translateY(1px);
}

.gwl .gwl-button.is-loading,
.gwl .gwl-button[disabled] {
	opacity: .65;
	cursor: default;
}

.gwl .gwl-button--ghost,
.gwl .gwl-button--ghost:hover,
.gwl .gwl-button--ghost:focus {
	color: var(--gwl-text);
	background: transparent;
	border: 1px solid var(--gwl-input-border);
}

.gwl .gwl-button--ghost:hover:not([disabled]) {
	border-color: var(--gwl-input-focus);
}

.gwl a {
	color: var(--gwl-link);
	text-decoration: none;
}

.gwl a:hover {
	text-decoration: underline;
}

.gwl a.gwl-button:hover {
	text-decoration: none;
}

.gwl .gwl-link-button {
	display: inline;
	margin: 0;
	padding: 0;
	font: inherit;
	color: var(--gwl-link);
	text-align: left;
	text-decoration: underline;
	background: none;
	border: 0;
	box-shadow: none;
	cursor: pointer;
}

.gwl .gwl-link-button:hover,
.gwl .gwl-link-button:focus {
	color: var(--gwl-link);
	background: none;
}

.gwl .gwl-alt {
	margin: 20px 0 0;
	font-size: .9em;
	text-align: center;
	text-wrap: balance;
}

/* ── Mensagens ──────────────────────────────────────────────────────────── */

.gwl .gwl-notice {
	margin: 0 0 20px;
	padding: 12px 14px;
	font-size: .92em;
	line-height: 1.45;
	border: 1px solid;
	border-radius: var(--gwl-input-radius);
}

.gwl .gwl-notice--error {
	color: var(--gwl-error);
	background: color-mix(in srgb, var(--gwl-error) 10%, transparent);
	border-color: color-mix(in srgb, var(--gwl-error) 35%, transparent);
}

.gwl .gwl-notice--success {
	color: var(--gwl-success);
	background: color-mix(in srgb, var(--gwl-success) 10%, transparent);
	border-color: color-mix(in srgb, var(--gwl-success) 35%, transparent);
}

.gwl .gwl-notice--info {
	color: var(--gwl-text);
	background: color-mix(in srgb, var(--gwl-link) 10%, transparent);
	border-color: color-mix(in srgb, var(--gwl-link) 35%, transparent);
}

.gwl .gwl-footer {
	margin: 28px 0 0;
	font-size: .82em;
	text-align: center;
	color: var(--gwl-text);
	opacity: .7;
}

/* ── Perfil ─────────────────────────────────────────────────────────────── */

/* Página própria: barra do topo + conteúdo */
.gwl-profile-page .gwl-wrap {
	flex-direction: column;
}

.gwl-page .gwl-topbar {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 24px;
	background: var(--gwl-topbar-bg, transparent);
	border-bottom: 1px solid color-mix(in srgb, var(--gwl-card-border) 70%, transparent);
}

.gwl .gwl-topbar .gwl-logo {
	margin: 0;
	text-align: left;
}

.gwl .gwl-topbar .gwl-logo img {
	width: min(var(--gwl-logo-width), 140px);
	margin: 0;
}

.gwl .gwl-topbar .gwl-logo-text {
	font-size: 1.15em;
}

.gwl .gwl-topbar-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px 20px;
	font-size: .9em;
}

.gwl .gwl-topbar-user {
	color: var(--gwl-text);
	opacity: .7;
}

@media (max-width: 600px) {
	.gwl-page .gwl-topbar {
		padding: 12px 16px;
	}

	.gwl .gwl-topbar-user {
		display: none;
	}
}

.gwl-page .gwl-main--profile {
	flex-direction: column;
	justify-content: flex-start;
	padding: 48px 16px 72px;
}

.gwl .gwl-page-head {
	width: 100%;
	max-width: var(--gwl-profile-width, 640px);
	margin: 0 0 24px;
}

.gwl .gwl-page-head .gwl-title,
.gwl .gwl-page-head .gwl-subtitle {
	margin: 0 0 4px;
	text-align: left;
}

.gwl-profile-page .gwl-profile {
	display: flex;
	justify-content: center;
	width: 100%;
}

/* Dentro do tema, com fundo próprio: a área em volta do formulário ganha cor/imagem */
.gwl.gwl-embed.gwl-profile-has-bg {
	padding: 48px 16px;
	background-color: var(--gwl-page-bg);
	background-image: var(--gwl-bg-image);
	background-size: cover;
	background-position: center;
	border-radius: var(--gwl-card-radius);
}

.gwl.gwl-embed.gwl-profile-has-bg.gwl-has-bg-image {
	box-shadow: inset 0 0 0 100vmax var(--gwl-overlay);
}

.gwl .gwl-section-title {
	margin: 32px 0 16px;
	padding: 24px 0 0;
	font-family: var(--gwl-font-title);
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.3;
	color: var(--gwl-title);
	border-top: 1px solid var(--gwl-card-border);
}

.gwl-profile .gwl-form:first-of-type > .gwl-section-title:first-of-type,
.gwl-profile .gwl-notice + .gwl-form > .gwl-section-title:first-of-type {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.gwl .gwl-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 16px;
}

@media (max-width: 560px) {
	.gwl .gwl-row {
		grid-template-columns: 1fr;
	}
}

.gwl .gwl-help {
	margin: 6px 0 0;
	font-size: .85em;
	color: var(--gwl-text);
	opacity: .7;
}

.gwl .gwl-current {
	margin: 0 0 16px;
}

.gwl .gwl-strength {
	display: none;
	align-items: center;
	gap: 10px;
	margin: -6px 0 0;
	min-height: 18px;
}

.gwl .gwl-strength.is-active {
	display: flex;
}

.gwl .gwl-strength-bar {
	flex: 1 1 auto;
	height: 4px;
	background: var(--gwl-input-border);
	border-radius: 2px;
	overflow: hidden;
	position: relative;
}

.gwl .gwl-strength-bar::after {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--gwl-strength, 0%);
	background: var(--gwl-strength-color, transparent);
	transition: width .2s ease, background-color .2s ease;
}

.gwl .gwl-strength-label {
	min-width: 90px;
	font-size: .8em;
	text-align: right;
	opacity: .8;
}

.gwl .gwl-reauth {
	margin: 28px 0 20px;
	padding: 20px;
	border: 1px dashed var(--gwl-input-border);
	border-radius: var(--gwl-input-radius);
}

.gwl .gwl-reauth-title {
	margin: 0 0 4px;
	font-family: var(--gwl-font-title);
	font-size: 1em;
	font-weight: 700;
	color: var(--gwl-title);
}

.gwl .gwl-reauth .gwl-help {
	margin: 0 0 16px;
}

.gwl .gwl-reauth-alt {
	margin: -6px 0 0;
	font-size: .9em;
}

.gwl .gwl-code-status:empty {
	display: none;
}

.gwl .gwl-code-status {
	margin: 8px 0 12px;
}

#gwl-profile-form > .gwl-button {
	margin-top: 28px;
}

.gwl .gwl-sessions {
	margin-top: 8px;
}

.gwl .gwl-sessions .gwl-help {
	margin: 0 0 16px;
}

@media (prefers-reduced-motion: reduce) {
	.gwl *,
	.gwl *::before,
	.gwl *::after {
		transition: none !important;
	}
}
