/* ==========================================================================
   Login 4C - [Autenticação] Login (Figma node 53186:38198)
   ========================================================================== */

:root {
	--plx-body-bg: #f8f7fa;
	--plx-text-primary: #221c46;
	--plx-text-secondary: rgba(34, 28, 70, 0.7);
	--plx-input-border: rgba(34, 28, 70, 0.22);
	--plx-primary-main: #1b51dc;
	--plx-primary-hover: #1642b5;
	--plx-secondary-main: #85fd96;
	--plx-secondary-hover: #6ff282;
	--plx-white: #ffffff;
	--plx-error: #e2000b;
	--plx-success-main: #008861;
	--plx-error-main: #b30000;
	--plx-warning-main: #874810;
	--plx-radius-sm: 4px;
	--plx-radius-md: 6px;
	--plx-radius-xl: 10px;
}

html,
body.plx-login-body {
	height: 100%;
}

body.plx-login-body {
	margin: 0;
	background-color: var(--plx-body-bg);
}

/* "a" e "footer" recebem Verdana direto em style-pluxee.css, por isso são listados aqui */
.plx-login,
.plx-login input,
.plx-login button,
.plx-login a,
.plx-login footer {
	font-family: 'DM Sans', Verdana, sans-serif;
	font-optical-sizing: auto;
	letter-spacing: 0;
}

/* main#content: sobrescreve "#content" de styles.css (min-height: 85vw) e style-pluxee.css */
main#content.plx-login {
	display: flex;
	width: 100%;
	min-height: 100vh;
	margin: 0;
	color: var(--plx-text-primary);
	background-color: var(--plx-body-bg);
}

/* ---------- Coluna esquerda ---------- */

.plx-login__main {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	padding: 40px 48px 0;
}

.plx-login__logo {
	display: block;
	width: 148px;
	height: 42px;
}

.plx-login__content {
	display: flex;
	flex: 1 0 auto;
	align-items: center;
	justify-content: center;
	padding: 24px 0;
}

.plx-login__form {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 407px;
	max-width: 100%;
	margin: 0;
}

.plx-login__title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 38px;
	color: var(--plx-text-primary);
}

.plx-login__password-group {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

/* ---------- Input outlined ---------- */

.plx-field {
	position: relative;
	width: 100%;
}

.plx-field__input {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 12px 16px;
	border: 1px solid var(--plx-input-border);
	border-radius: var(--plx-radius-md);
	background-color: transparent;
	font-size: 15px;
	font-weight: 400;
	line-height: 24px;
	color: var(--plx-text-primary);
	box-shadow: none;
	transition: border-color 0.2s ease;
}

.plx-field__input::placeholder {
	color: var(--plx-text-secondary);
	opacity: 1;
	text-transform: none;
}

.plx-field__input:hover {
	border-color: var(--plx-text-secondary);
}

.plx-field__input:focus {
	outline: none;
	border-color: var(--plx-primary-main);
	box-shadow: inset 0 0 0 1px var(--plx-primary-main);
}

.plx-field__label {
	position: absolute;
	top: -8px;
	left: 10px;
	padding: 2px 6px;
	border-radius: var(--plx-radius-sm);
	background-color: var(--plx-body-bg);
	font-size: 13px;
	font-weight: 400;
	line-height: 15px;
	color: var(--plx-text-secondary);
	pointer-events: none;
}

.plx-field__input:focus + .plx-field__label {
	color: var(--plx-primary-main);
}

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

.plx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 8px 20px;
	border: 0;
	border-radius: var(--plx-radius-md);
	font-size: 15px;
	font-weight: 600;
	line-height: 22px;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

/* !important: styles.css aplica cor, tamanho e sublinhado com !important em todo "a" */
a.plx-btn,
a.plx-btn:link,
a.plx-btn:visited,
a.plx-btn:hover,
a.plx-btn:focus {
	font-size: 15px !important;
	text-decoration: none !important;
}

a.plx-btn--text,
a.plx-btn--text:link,
a.plx-btn--text:visited,
a.plx-btn--text:hover,
a.plx-btn--text:focus,
a.plx-btn--secondary,
a.plx-btn--secondary:link,
a.plx-btn--secondary:visited,
a.plx-btn--secondary:hover,
a.plx-btn--secondary:focus {
	color: var(--plx-text-primary) !important;
}

.plx-btn__icon {
	display: block;
	width: 16px;
	height: 16px;
}

.plx-btn--primary {
	width: 100%;
	background-color: var(--plx-primary-main);
	color: var(--plx-white);
}

.plx-btn--primary:hover,
.plx-btn--primary:focus {
	background-color: var(--plx-primary-hover);
	color: var(--plx-white);
}

.plx-btn--secondary {
	background-color: var(--plx-secondary-main);
	color: var(--plx-text-primary);
}

.plx-btn--secondary:hover,
.plx-btn--secondary:focus {
	background-color: var(--plx-secondary-hover);
	color: var(--plx-text-primary);
}

.plx-btn--text {
	padding: 8px 12px;
	background-color: transparent;
	color: var(--plx-text-primary);
}

.plx-btn--text:hover,
.plx-btn--text:focus {
	background-color: rgba(34, 28, 70, 0.06);
	color: var(--plx-text-primary);
}

/* ---------- Rodapé ---------- */

/* sobrescreve "footer" de style-pluxee.css (fundo branco, altura fixa, float, Verdana) */
.plx-login__footer {
	display: block;
	float: none;
	width: auto;
	height: auto;
	background-color: transparent;
	padding: 16px 24px;
	font-size: 15px;
	font-weight: 400;
	line-height: 22px;
	color: var(--plx-text-secondary);
}

/* ---------- Coluna direita (banner) ---------- */

/* height/float/width: sobrescreve "aside" de style-pluxee.css, que impedia o stretch */
.plx-login__aside {
	display: flex;
	flex: 0 0 50%;
	width: auto;
	height: auto;
	float: none;
	padding: 12px;
}

.plx-login__banner {
	position: relative;
	flex: 1 1 auto;
	min-height: 440px;
	overflow: hidden;
	border-radius: var(--plx-radius-xl);
	background-image:
		linear-gradient(90deg, rgba(47, 43, 61, 0.1) 0%, rgba(47, 43, 61, 0.1) 100%),
		linear-gradient(213.42deg, rgba(6, 99, 122, 0) 45.623%, rgb(6, 99, 122) 94.835%),
		linear-gradient(213.42deg, rgba(36, 179, 100, 0) 45.623%, rgb(36, 179, 100) 94.835%),
		url('../img/login/login-banner.jpg');
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

.plx-login__banner-content {
	position: absolute;
	left: 28px;
	bottom: 72px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	width: 326px;
	max-width: calc(100% - 56px);
	color: var(--plx-white);
}

.plx-login__banner-icon {
	display: block;
	width: 32px;
	height: 32px;
}

.plx-login__banner-title {
	margin: 0;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--plx-white);
}

.plx-login__banner-text {
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 22px;
	color: var(--plx-white);
}

.plx-login__banner-text strong {
	display: block;
	font-weight: 600;
}

/* ---------- Responsivo ---------- */

@media screen and (max-width: 1023px) {
	.plx-login__aside {
		display: none;
	}
}

@media screen and (max-width: 479px) {
	.plx-login__main {
		padding: 24px 16px 0;
	}

	.plx-login__footer {
		padding: 16px 0;
	}
}

/* ==========================================================================
   Drawer "Vamos criar sua conta" - [Autenticação] Autosserviço (Figma node 48432:7254)
   ========================================================================== */

body.plx-drawer-open {
	overflow: hidden;
}

.plx-drawer {
	position: fixed;
	inset: 0;
	z-index: 1000;
	visibility: hidden;
	pointer-events: none;
	font-family: 'DM Sans', Verdana, sans-serif;
	letter-spacing: 0;
	/* visibility só muda depois da animação de saída */
	transition: visibility 0s linear 0.25s;
}

.plx-drawer.is-open {
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}

.plx-drawer input,
.plx-drawer button,
.plx-drawer label,
.plx-drawer span {
	font-family: 'DM Sans', Verdana, sans-serif;
	letter-spacing: 0;
}

.plx-drawer__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(34, 28, 70, 0.5);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.plx-drawer.is-open .plx-drawer__backdrop {
	opacity: 1;
}

.plx-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: 400px;
	max-width: 100%;
	margin: 0;
	background-color: var(--plx-white);
	box-shadow: 0 5px 30px rgba(47, 43, 61, 0.18);
	transform: translateX(100%);
	transition: transform 0.25s ease;
}

.plx-drawer.is-open .plx-drawer__panel {
	transform: translateX(0);
}

.plx-drawer__form {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	margin: 0;
}

/* font-family: sobrescreve "header" de style-pluxee.css (Sansa Bold) */
.plx-drawer__header {
	font-family: 'DM Sans', Verdana, sans-serif;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 24px;
	border-bottom: 1px solid rgba(47, 43, 61, 0.12);
}

.plx-drawer__heading {
	flex: 1 1 auto;
	min-width: 0;
}

.plx-drawer__title,
.plx-drawer__subtitle {
	font-family: 'DM Sans', Verdana, sans-serif;
	letter-spacing: 0;
}

.plx-drawer__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 22px;
	color: #2f2b3d;
}

.plx-drawer__subtitle {
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 20px;
	color: rgba(47, 43, 61, 0.7);
}

.plx-drawer__close {
	display: block;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.plx-drawer__close img {
	display: block;
	width: 24px;
	height: 24px;
}

.plx-drawer__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 24px;
	padding: 24px;
	overflow-y: auto;
}

/* sobrescreve "footer" de style-pluxee.css (altura fixa, float, fundo e Verdana) */
.plx-drawer__footer {
	float: none;
	width: auto;
	height: auto;
	gap: 8px;
	background-color: var(--plx-white);
	font-family: 'DM Sans', Verdana, sans-serif;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 24px;
	border-top: 1px solid rgba(34, 28, 70, 0.12);
}

/* No drawer o fundo é branco (paper) e o placeholder usa text-disabled */
.plx-drawer .plx-field__label {
	background-color: var(--plx-white);
}

.plx-drawer .plx-field__input::placeholder {
	color: rgba(34, 28, 70, 0.4);
}

.plx-drawer .plx-field__input {
	background-color: var(--plx-white);
}

.plx-drawer .plx-field__input:disabled {
	background-color: rgba(34, 28, 70, 0.04);
	color: rgba(34, 28, 70, 0.4);
	cursor: not-allowed;
}

/* Estado de erro no drawer: mesmo padrão do login (Figma: error-main, borda de 2px, texto abaixo do campo) */
.plx-drawer .plx-field.has-error .plx-field__input,
.plx-drawer .plx-field.has-error .plx-field__input:focus {
	border: 2px solid var(--plx-error-main);
	box-shadow: none;
}

.plx-drawer .plx-field.has-error .plx-field__label {
	color: var(--plx-error-main);
}

.plx-drawer .plx-field__error {
	margin: 0;
	padding: 4px 16px 0;
	font-size: 13px;
	line-height: 16px;
	color: var(--plx-error-main);
}

.plx-drawer .plx-field.has-error .plx-field__error:empty {
	display: none;
}

/* ---------- Estado de erro ---------- */

.plx-field.has-error .plx-field__input,
.plx-field.has-error .plx-field__input:focus {
	border-color: var(--plx-error);
	box-shadow: inset 0 0 0 1px var(--plx-error);
}

.plx-field.has-error .plx-field__label {
	color: var(--plx-error);
}

.plx-field__error {
	display: none;
	margin: 4px 0 0 16px;
	font-size: 13px;
	line-height: 20px;
	color: var(--plx-error);
}

.plx-field.has-error .plx-field__error {
	display: block;
}

/* ---------- Botão outline ---------- */

.plx-btn--outline {
	padding: 7px 19px;
	border: 1px solid var(--plx-text-primary);
	background-color: transparent;
	color: var(--plx-text-primary);
}

.plx-btn--outline:hover,
.plx-btn--outline:focus {
	background-color: rgba(34, 28, 70, 0.06);
	color: var(--plx-text-primary);
}

.plx-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Envio em andamento: spinner no lugar do texto, mantendo a largura do botão */
.plx-btn.is-loading {
	position: relative;
	color: transparent !important;
	cursor: progress;
}

.plx-btn__spinner {
	display: none;
}

.plx-btn.is-loading .plx-btn__spinner {
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid var(--plx-text-primary);
	border-right-color: transparent;
	border-radius: 50%;
	animation: plx-spin 0.7s linear infinite;
}

@keyframes plx-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ==========================================================================
   Recuperação de senha - [DTC-74] Autenticação (Figma node 48941:24626)
   ========================================================================== */

.plx-login__panel {
	width: 407px;
	max-width: 100%;
}

.plx-login__panel[hidden] {
	display: none !important;
}

.plx-login__panel .plx-login__form {
	width: 100%;
}

.plx-login__heading {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.plx-login__subtitle {
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 22px;
	color: var(--plx-text-secondary);
}

/* "Voltar" alinhado à esquerda, sem ocupar a largura do formulário */
.plx-btn--back {
	align-self: flex-start;
}

/* Campos com erro (prrprm=3), conforme o frame "Acesso inválido" */
.plx-login__panel .plx-field.has-error .plx-field__input,
.plx-login__panel .plx-field.has-error .plx-field__input:focus {
	border: 2px solid var(--plx-error-main);
	box-shadow: none;
}

.plx-login__panel .plx-field.has-error .plx-field__label {
	color: var(--plx-error-main);
}

/* ---------- Alerta (toast) ---------- */

.plx-toast-stack {
	position: fixed;
	top: 32px;
	right: 24px;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 440px;
	max-width: calc(100% - 32px);
	max-height: calc(100vh - 64px);
	overflow-x: hidden;
	overflow-y: auto;
}

.plx-toast-stack:empty {
	display: none;
}

.plx-toast {
	display: flex;
	flex: 0 0 auto;
	align-items: flex-start;
	gap: 16px;
	padding: 12px 16px;
	border-radius: var(--plx-radius-md);
	box-shadow: 0 1px 6px rgba(47, 43, 61, 0.1);
	font-family: 'DM Sans', Verdana, sans-serif;
	letter-spacing: 0;
	color: var(--plx-white);
}

.plx-toast--success {
	background-color: var(--plx-success-main);
}

.plx-toast--error {
	background-color: var(--plx-error-main);
}

.plx-toast--warning {
	background-color: var(--plx-warning-main);
}

.plx-toast__icon {
	flex: 0 0 auto;
	padding: 4px;
	border-radius: var(--plx-radius-md);
	background-color: var(--plx-white);
	box-shadow: 0 1px 3px rgba(47, 43, 61, 0.1);
}

.plx-toast__icon img {
	display: block;
	width: 22px;
	height: 22px;
}

.plx-toast__content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.plx-toast__content p {
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 22px;
	color: var(--plx-white);
	word-break: break-word;
}

.plx-toast__content p.plx-toast__title {
	font-size: 18px;
	font-weight: 500;
	line-height: 24px;
}

.plx-toast__content b {
	font-weight: 700;
}

/* !important: styles.css aplica cor, tamanho e sublinhado com !important em todo "a" */
.plx-toast__content a,
.plx-toast__content a:link,
.plx-toast__content a:visited,
.plx-toast__content a:hover {
	font-family: 'DM Sans', Verdana, sans-serif;
	font-size: 15px !important;
	color: var(--plx-white) !important;
	text-decoration: underline !important;
}

.plx-toast__close {
	flex: 0 0 auto;
	margin: 0;
	padding: 7px;
	border: 0;
	border-radius: 500px;
	background: transparent;
	cursor: pointer;
}

.plx-toast__close:hover,
.plx-toast__close:focus {
	background-color: rgba(255, 255, 255, 0.16);
}

.plx-toast__close img {
	display: block;
	width: 20px;
	height: 20px;
}

@media screen and (max-width: 479px) {
	.plx-toast-stack {
		top: 16px;
		right: 16px;
	}
}

/* Mensagem abaixo do campo (helper-text do Figma: 13px, error-main) */
.plx-login__panel .plx-field__error {
	margin: 0;
	padding: 4px 16px 0;
	font-family: 'DM Sans', Verdana, sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 16px;
	color: var(--plx-error-main);
}

.plx-login__panel .plx-field.has-error .plx-field__error:empty {
	display: none;
}

/* ---------- Alerta: entrada e saída animadas ---------- */

@keyframes plx-toast-in {
	from {
		opacity: 0;
		transform: translateX(24px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes plx-toast-out {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(24px);
	}
}

.plx-toast {
	animation: plx-toast-in 0.3s ease-out both;
}

.plx-toast.is-leaving {
	animation: plx-toast-out 0.3s ease-in forwards;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.plx-drawer,
	.plx-drawer__backdrop,
	.plx-drawer__panel {
		transition: none;
	}

	.plx-toast,
	.plx-toast.is-leaving {
		animation: none;
	}

	.plx-btn.is-loading .plx-btn__spinner {
		animation-duration: 2s;
	}
}

/* Com o drawer aberto, o alerta fica ao lado do painel (sem cobrir o cabeçalho e o botão fechar) */
body.plx-drawer-open .plx-toast-stack {
	z-index: 1001;
	right: 424px;
}

/* Telas estreitas: o drawer ocupa a largura toda, então o alerta fica acima do rodapé do drawer */
@media screen and (max-width: 879px) {
	body.plx-drawer-open .plx-toast-stack {
		top: auto;
		right: 16px;
		bottom: 80px;
	}
}
