/* =========================================================
   RWB MGM - Custom Login Page
   ========================================================= */

/* ---- Reset & base ---- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	height: 100%;
	background-color: #F2F0EB;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* ---- Page layout ---- */
.rwb-login-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background-color: #F2F0EB;
	padding: 60px 16px;
}

/* ---- Card container ---- */
.rwb-login-card {
	width: 100%;
	max-width: 480px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* ---- Logo ---- */
.rwb-login-logo {
	display: block;
	max-width: 220px;
	width: 100%;
	height: auto;
	margin-bottom: 28px;
}

/* ---- Title ---- */
.rwb-login-title {
	font-size: 32px;
	font-weight: 700;
	color: #00012B;
	margin: 0 0 8px 0;
	text-align: center;
	line-height: 1.25;
	letter-spacing: -0.5px;
}

/* ---- Subtitle ---- */
.rwb-login-subtitle {
	font-size: 14px;
	color: #6B7280;
	margin: 0 0 32px 0;
	text-align: center;
	line-height: 1.5;
}

/* ---- WooCommerce notices ---- */
.rwb-login-notices {
	width: 100%;
}

.rwb-login-notices ul.woocommerce-error {
	list-style: none;
	margin: 0 0 16px 0;
	padding: 12px 16px;
	background: #FEF2F2;
	border: 1px solid #FECACA;
	border-radius: 8px;
	color: #DC2626;
	font-size: 14px;
}

/* ---- Form ---- */
.rwb-login-form {
	width: 100%;
}

/* ---- Field group (floating label) ---- */
.rwb-login-field {
	position: relative;
	width: 100%;
	margin-bottom: 16px;
}

/* Input */
.rwb-login-field input[type="text"],
.rwb-login-field input[type="email"],
.rwb-login-field input[type="password"] {
	display: block;
	width: 100%;
	height: 56px;
	background: #FFFFFF;
	border: none;
	border-radius: 8px;
	padding: 24px 16px 8px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	color: #111827;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: 0px 4px 24px rgba(23, 23, 23, 0.12);
	transition: box-shadow 0.15s;
}

.rwb-login-field input[type="text"]:focus,
.rwb-login-field input[type="email"]:focus,
.rwb-login-field input[type="password"]:focus {
	box-shadow: 0px 4px 24px rgba(23, 23, 23, 0.22);
}

/* Password field: room for eye button */
.rwb-login-field--password input {
	padding-right: 52px;
}

/* ---- Floating label ---- */
.rwb-login-field > label {
	position: absolute;
	left: 16px;
	top: 28px; /* fixed to half of 56px input height — immune to wrapper height growth */
	transform: translateY(-50%);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 400;
	color: #9CA3AF;
	pointer-events: none;
	transition: top 0.15s ease, transform 0.15s ease, font-size 0.15s ease;
	white-space: nowrap;
}

/* Float label up when input is focused OR has content */
.rwb-login-field input:focus + label,
.rwb-login-field input:not(:placeholder-shown) + label {
	top: 8px;
	transform: translateY(0);
	font-size: 11px;
	color: #9CA3AF;
}

/* ---- Eye toggle button ---- */
.rwb-login-toggle-password {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: #9CA3AF;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.rwb-login-toggle-password:hover {
	color: #6B7280;
}

.rwb-login-toggle-password svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* ---- Select field (Agent Location) ---- */
.rwb-login-field--select {
	position: relative;
	width: 100%;
	margin-bottom: 16px;
}

.rwb-login-field--select select {
	display: block;
	width: 100%;
	height: 56px;
	background: #FFFFFF;
	border: none;
	border-radius: 8px;
	padding: 24px 44px 8px 16px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	color: #111827;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-shadow: 0px 4px 24px rgba(23, 23, 23, 0.12);
	transition: box-shadow 0.15s;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	cursor: pointer;
}

.rwb-login-field--select select:focus {
	box-shadow: 0px 4px 24px rgba(23, 23, 23, 0.22);
}

/* Floating label — always pinned up (select always has a value visible) */
.rwb-login-field--select > label {
	position: absolute;
	left: 16px;
	top: 8px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-size: 11px;
	font-weight: 400;
	color: #9CA3AF;
	pointer-events: none;
	z-index: 1;
	white-space: nowrap;
}

/* ---- Remember me + Forgot password row ---- */
.rwb-login-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	width: 100%;
}

.rwb-login-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #374151;
	cursor: pointer;
}

.rwb-login-remember input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: #00012B;
	cursor: pointer;
	flex-shrink: 0;
}

.rwb-login-forgot {
	font-size: 14px;
	color: #374151;
	text-decoration: none;
}

.rwb-login-forgot:hover {
	color: #00012B;
	text-decoration: underline;
}

/* ---- Submit button — Figma spec: white bg, dark border ---- */
.rwb-login-submit {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	padding: 8px 16px;
	gap: 8px;
	width: 100%;
	height: 56px;
	background: #FFFFFF;
	border: 1px solid #00012B;
	border-radius: 8px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 16px;
	line-height: 135%;
	color: #00012B;
	cursor: pointer;
	margin-bottom: 20px;
	transition: background-color 0.15s, color 0.15s;
}

.rwb-login-submit:hover {
	background: #00012B;
	color: #FFFFFF;
}

/* ---- Register link ---- */
.rwb-login-register {
	font-size: 14px;
	color: #6B7280;
	text-align: center;
	margin: 0 0 40px 0;
}

.rwb-login-register a {
	color: #7C3AED;
	text-decoration: none;
	font-weight: 500;
}

.rwb-login-register a:hover {
	text-decoration: underline;
}

/* ---- Field error state ---- */
.rwb-login-field.has-error input[type="text"],
.rwb-login-field.has-error input[type="email"],
.rwb-login-field.has-error input[type="password"],
.rwb-login-field--select.has-error select {
	box-shadow: 0 0 0 1.5px #DC2626, 0px 4px 24px rgba(220, 38, 38, 0.10);
}

.rwb-login-field.has-error input[type="text"]:focus,
.rwb-login-field.has-error input[type="email"]:focus,
.rwb-login-field.has-error input[type="password"]:focus,
.rwb-login-field--select.has-error select:focus {
	box-shadow: 0 0 0 1.5px #DC2626, 0px 4px 24px rgba(220, 38, 38, 0.15);
}

.rwb-field-error {
	display: block;
	font-size: 12px;
	font-weight: 400;
	color: #DC2626;
	margin-top: 6px;
	padding-left: 2px;
	line-height: 1.4;
}

/* ---- Footer ---- */
.rwb-login-footer {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #9CA3AF;
}

.rwb-login-footer-logo {
	display: block;
	height: 20px;
	width: auto;
}
