/*
Theme Name: Divi Child Via Pajuçara
Theme URI: https://www.viapajucara.com.br/
Description: Tema filho do Divi Builder 5 para Via Pajuçara, com tela de login personalizada e shortcode de simulador de cubagem.
Author: Starfez
Author URI: https://www.starfez.com
Version: 1.5.1
Template: Divi
*/

/*============================================================
Via Pajuçara - Tela de login (wp-login.php)
Adaptado para a identidade visual Via Pajuçara,
com layout limpo e responsivo.
============================================================*/
:root {
	--vp-blue: #003e83;
	--vp-blue-dark: #002d60;
	--vp-blue-light: #0a5bb5;
	--vp-orange: #ee8600;
	--vp-orange-dark: #d47600;
	--vp-white: #FFFFFF;
	--vp-gray: #F4F7FB;
	--vp-ink: #0F172A;
	--vp-muted: #64748B;
	--vp-border: #D9E2EF;
}

body.login {
	--vp-blue: #003e83;
	--vp-blue-dark: #002d60;
	--vp-blue-light: #0a5bb5;
	--vp-orange: #ee8600;
	--vp-orange-dark: #d47600;
	--vp-white: #FFFFFF;
	--vp-gray: #F4F7FB;
	--vp-ink: #0F172A;
	--vp-muted: #64748B;
	--vp-border: #D9E2EF;

	margin: 0;
	padding: 24px;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: linear-gradient(135deg, #002d60 0%, #003e83 45%, #0a5bb5 100%);
}

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

/* ---------- Remocao dos elementos padrao ---------- */
body.login .language-switcher,
body.login #backtoblog,
body.login .forgetmenot,
body.login #caps-warning,
body.login #login > #nav {
	display: none !important;
}

body.login form label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Card central ---------- */
body.login #login {
	width: 480px;
	max-width: 100%;
	margin: 0;
	padding: 44px 44px 34px;
	position: relative;
	z-index: 2;
	background: var(--vp-white);
	border: 1px solid #e3e9f0;
	border-radius: 20px;
	box-shadow:
		0 20px 50px rgba(0, 45, 96, 0.28),
		0 6px 18px rgba(0, 45, 96, 0.12);
	display: grid;
	grid-template-columns: 1fr;
	column-gap: 12px;
	animation: vp-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.login #login > h1,
body.login #login > #login_error,
body.login #login > .message,
body.login #login form > p:not(.submit),
body.login #login form > .user-pass-wrap {
	grid-column: 1 / -1;
	margin: 0 0 16px;
}

body.login #login form {
	display: contents;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	overflow: visible !important;
}

body.login #login form .submit {
	grid-column: 1 / -1;
	margin: 0 !important;
}

/* ---------- Marca (logo) ---------- */
body.login #login h1 {
	text-align: center;
	margin-bottom: 28px;
}

body.login #login h1 a {
	display: block;
	width: 260px;
	height: 72px;
	margin: 0 auto;
	background: url('https://www.viapajucara.com.br/wp-content/uploads/2021/02/logo-vp-menu.png') no-repeat center / contain;
	text-indent: -9999px;
	overflow: hidden;
	outline: none;
}

/* ---------- Campos ---------- */
body.login #login form > p:not(.submit),
body.login #login form > .user-pass-wrap {
	position: relative;
}

body.login #login form > p:not(.submit):not(.user-pass-wrap):not(.vp-login-challenge)::before,
body.login #login form > .user-pass-wrap::before {
	content: "";
	position: absolute;
	left: 17px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	z-index: 1;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	pointer-events: none;
}

body.login #login form > p:not(.submit):not(.user-pass-wrap):not(.vp-login-challenge)::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239aa7b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1'/%3E%3C/svg%3E");
}

body.login #login form > .user-pass-wrap::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239aa7b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
	width: 100% !important;
	height: 58px !important;
	margin: 0 !important;
	padding: 14px 48px !important;
	font-size: 15px !important;
	line-height: 1 !important;
	color: var(--vp-ink) !important;
	background: var(--vp-white) !important;
	border: 1.5px solid var(--vp-border) !important;
	border-radius: 14px !important;
	box-shadow: none !important;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.login input[type="password"] {
	padding-right: 52px !important;
}

body.login input:focus {
	border-color: var(--vp-blue-light) !important;
	box-shadow: 0 0 0 4px rgba(0, 62, 131, 0.14) !important;
}

body.login input::placeholder {
	color: #9aa7b8;
	opacity: 1;
}

body.login input::-ms-input-placeholder {
	color: #9aa7b8;
}

/* ---------- Desafio anti-bot ---------- */
body.login #login form .vp-login-challenge {
	margin: 0 0 16px !important;
}

body.login #login form .vp-login-challenge label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

body.login .vp-login-challenge__question {
	display: block;
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--vp-ink);
	line-height: 1.4;
}

body.login #login form .vp-login-challenge input[type="text"] {
	padding-left: 16px !important;
	padding-right: 16px !important;
}

/* ---------- Botao mostrar senha (nativo do WP) ---------- */
body.login #login .wp-hide-pw {
	position: absolute !important;
	right: 8px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	min-height: 42px !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	background: transparent !important;
	border: 0 !important;
	border-radius: 12px;
	cursor: pointer;
	color: #94a3b8;
	transition: background 0.2s ease, color 0.2s ease;
}

body.login #login .wp-hide-pw:hover {
	background: var(--vp-gray);
	color: var(--vp-blue);
}

body.login #login .wp-hide-pw .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
}

/* ---------- Botao Acessar ---------- */
body.login #login form .submit input[type="submit"] {
	width: 100% !important;
	height: 58px !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	letter-spacing: 0.2px;
	color: #fff !important;
	text-shadow: none !important;
	border: 0 !important;
	border-radius: 14px !important;
	background: linear-gradient(135deg, var(--vp-blue) 0%, var(--vp-blue-light) 100%) !important;
	box-shadow: 0 10px 22px rgba(0, 62, 131, 0.32) !important;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

body.login #login form .submit input[type="submit"]:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 30px rgba(0, 62, 131, 0.4) !important;
	filter: brightness(1.04);
}

body.login #login form .submit input[type="submit"]:active {
	transform: translateY(0);
	box-shadow: 0 8px 18px rgba(0, 62, 131, 0.28) !important;
}

body.login #login form .submit input[type="submit"]:focus-visible {
	outline: 3px solid rgba(238, 134, 0, 0.45);
	outline-offset: 2px;
}

body.login a:focus-visible {
	outline: 3px solid rgba(238, 134, 0, 0.45);
	outline-offset: 2px;
}

/* ---------- Erros e mensagens ---------- */
body.login #login_error,
body.login .message,
body.login .success {
	background: #fff !important;
	border: 0 !important;
	border-left: 4px solid #dc2626 !important;
	border-radius: 12px;
	box-shadow: 0 10px 24px rgba(6, 28, 60, 0.12) !important;
	color: #b91c1c;
	font-size: 13.5px;
	padding: 12px 14px !important;
	margin: 0 0 18px !important;
}

body.login .message,
body.login .success {
	border-left-color: var(--vp-orange) !important;
	color: #334155;
}

/* ---------- Animacoes ---------- */
@keyframes vp-card-in {
	from {
		opacity: 0;
		transform: translateY(18px) scale(0.985);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- Responsivo ---------- */
@media (max-width: 560px) {
	body.login {
		padding: 16px;
	}

	body.login #login {
		width: 100%;
		max-width: 480px;
		padding: 32px 22px 26px;
		border-radius: 20px;
	}

	body.login #login h1 a {
		width: 210px;
		height: 58px;
	}

	body.login input[type="text"],
	body.login input[type="password"],
	body.login input[type="email"] {
		height: 54px !important;
	}

	body.login #login form .submit input[type="submit"] {
		height: 54px !important;
		font-size: 15px !important;
	}
}
