/*
 * My Account – Login page styles
 * Applied only when body.wdm-login-page is present (logged-out visitors).
 */

/* ── Reset body ──────────────────────────────────────────────────────────── */

body.wdm-login-page,
body.error404 {
	margin: 0;
	padding: 0;
	background: #F6F6F6;
	min-height: 100vh;
	overflow-x: clip;
}

/* Push content below WP admin bar when present */
body.admin-bar .wdm-lp-image-col {
	top: 64px;
	height: calc(100vh - 96px);
}

/* ── Two-column wrapper ──────────────────────────────────────────────────── */

.wdm-lp-wrap {
	display: flex;
	align-items: flex-start;
	min-height: 100vh;
	padding: 32px;
	gap: 20px;
	box-sizing: border-box;
}

/* ── Left: form column ───────────────────────────────────────────────────── */

.wdm-lp-form-col {
	flex: 0 0 calc(50% - 10px);
	min-height: calc(100vh - 64px);
	display: flex;
	flex-direction: column;
	padding: 43.5px;
	box-sizing: border-box;
	background: #fff;
	border-radius: 16px;
	position: relative;
}

.wdm-error-page-mobile-header {
	display: none;
}

/* Header row: home button + logo */
.wdm-lp-header {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	margin-bottom: 0;
}

/* Logo */
.wdm-lp-logo {
	display: block;
	text-decoration: none;
}

.wdm-lp-logo img {
	width: 137px;
	height: 32px;
	display: block;
}

/* Form inner – vertically centered */
.wdm-lp-form-inner {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 32px 0;
	max-width: 396px;
	margin: 0 auto;
	width: 100%;
}

body.error404 .wdm-lp-form-inner {
	align-items: flex-start;
}

/* Page heading */
.wdm-lp-title {
	font-size: 32px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-align: center;
	margin: 0 0 6px;
	color: #323232;
	text-transform: uppercase;
}

body.error404 .wdm-lp-title {
	font-size: 20px;
	line-height: 1.25;
	letter-spacing: 0;
	text-align: left;
	margin: 0 0 8px;
}

/* "Don't have account? Register" */
.wdm-lp-switch {
	text-align: center;
	font-size: 16px;
	color: #4C4C4D;
	margin: 0 0 24px;
}

body.error404 .wdm-lp-switch {
	text-align: left;
	font-size: 16px;
	line-height: 1.5;
	color: #4C4C4D;
	margin: 0 0 18px;
}

.wdm-lp-switch a {
	color: #1b4fa8;
	font-weight: 600;
	text-decoration: none;
}

.wdm-lp-switch a:hover {
	text-decoration: underline;
}

/* ── Form fields ─────────────────────────────────────────────────────────── */

.woocommerce-form-login {
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.wdm-lp-field {
	margin-bottom: 16px;
}

.wdm-lp-field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #1a1a2e;
	margin-bottom: 5px;
}

.wdm-lp-field input[type="text"],
.wdm-lp-field input[type="email"],
.wdm-lp-field input[type="password"] {
	width: 100%;
	border: 1.5px solid #cdd0d8;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 14px;
	color: #1a1a2e;
	background: #fff;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.18s;
	font-family: inherit;
}

.wdm-lp-field input:focus {
	border-color: #1b4fa8;
}

/* Password show/hide wrapper */
.wdm-lp-pw-wrap {
	position: relative;
}

.wdm-lp-pw-wrap input {
	padding-right: 40px;
}

.wdm-lp-pw-toggle {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	color: #999;
	line-height: 0;
}

.wdm-lp-pw-toggle:hover {
	color: #1b4fa8;
}

/* ── Remember me + Lost password row ─────────────────────────────────────── */

.wdm-lp-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.wdm-lp-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #555;
	cursor: pointer;
}

.wdm-lp-remember input[type="checkbox"] {
	accent-color: #1b4fa8;
	width: 15px;
	height: 15px;
	cursor: pointer;
	flex-shrink: 0;
}

.wdm-lp-lost-pw {
	font-size: 13px;
	color: #1b4fa8;
	text-decoration: none;
}

.wdm-lp-lost-pw:hover {
	text-decoration: underline;
}

/* ── Submit button ───────────────────────────────────────────────────────── */

.wdm-lp-submit {
	width: 100%;
	background: #1b4fa8;
	color: #fff;
	border: none;
	padding: 13px 16px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 6px;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.18s;
}

.wdm-lp-submit:hover,
.wdm-lp-submit:focus {
	background: #163d87;
}

.wdm-error-page-search {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 16px;
	width: 100%;
}

.wdm-error-page-search__field {
	position: relative;
	width: 100%;
}

.wdm-error-page-search__field input[type="search"] {
	width: 100%;
	height: 48px;
	padding: 0 54px 0 16px;
	background: #fff;
	border: 1px solid #E6E6E6;
	color: #000;
	font-size: 16px;
	box-shadow: none;
	transition: all 0.3s ease-in-out;
	border-radius: 8px;
	box-sizing: border-box;
}

.wdm-error-page-search__field input[type="search"]::-webkit-input-placeholder,
.wdm-error-page-search__field input[type="search"]::-moz-placeholder,
.wdm-error-page-search__field input[type="search"]:-ms-input-placeholder,
.wdm-error-page-search__field input[type="search"]::-ms-input-placeholder {
	color: #6C6C6C;
}

.wdm-error-page-search__submit {
	position: absolute;
	top: 0;
	right: 0;
	width: 54px;
	height: 100%;
	padding: 0;
	border: 0;
	background: url("../../images/icons/header-search-icon.svg") center center / 18px 18px no-repeat;
	background-color: transparent;
	cursor: pointer;
	transition: all 0.3s ease-in-out;
	border-radius: 0;
}

.wdm-error-page-search__submit:hover {
	opacity: 0.85;
}

.wdm-error-page-home {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	text-align: center;
}

/* WooCommerce notices inside the form */
.wdm-login-page .woocommerce-notices-wrapper,
.wdm-login-page .woocommerce-error,
.wdm-login-page .woocommerce-message,
.wdm-login-page .woocommerce-info {
	margin-bottom: 16px;
}

body.error404 .woocommerce-notices-wrapper,
body.error404 .woocommerce-error,
body.error404 .woocommerce-message,
body.error404 .woocommerce-info {
	margin-bottom: 16px;
}

/* ── Home link (top-left of header row) ─────────────────────────────────── */

.wdm-lp-home-link {
	position: absolute;
	left: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1.5px solid #e0e0e0;
	border-radius: 8px;
	color: #323232;
	text-decoration: none;
	transition: border-color 0.18s, color 0.18s;
	flex-shrink: 0;
}

.wdm-lp-home-link:hover {
	border-color: #1b4fa8;
	color: #1b4fa8;
}

/* ── Right: sticky image column ──────────────────────────────────────────── */

.wdm-lp-image-col {
	flex: 1;
	position: sticky;
	top: 32px;
	height: calc(100vh - 64px);
	align-self: flex-start;
	background-color: #1b4fa8; /* solid blue fallback */
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	border-radius: 16px;
	box-sizing: border-box;
}

.wdm-lp-image-media {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	flex: 0 0 auto;
}

.wdm-lp-image-overlay {
	width: 100%;
	padding: 64px;
	background: linear-gradient(
		to top,
		rgba(0, 24, 70, 0.88) 0%,
		rgba(0, 24, 70, 0.45) 55%,
		transparent 100%
	);
	color: #fff;
}

.wdm-lp-panel-heading {
	font-size: 64px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
	margin: 0 0 16px;
	letter-spacing: 0.02em;
}

.wdm-lp-panel-text {
	font-size: 20px;
	line-height: 1.6;
	margin: 0;
	opacity: 0.9;
}

/* ── Mobile: hide image panel ────────────────────────────────────────────── */

@media (max-width: 768px) {
	body.wdm-login-page,
	body.error404 {
		background: #F6F6F6;
	}

	.wdm-lp-wrap {
		padding: 16px;
		gap: 0;
		flex-direction: column;
	}

	body.error404 .wdm-error-page-mobile-header {
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
		width: 100%;
		padding: 0 56px;
		box-sizing: border-box;
		margin-bottom: 16px;
		min-height: 40px;
	}

	body.error404 .wdm-error-page-mobile-header .wdm-lp-home-link {
		position: absolute;
		left: 0;
	}

	body.error404 .wdm-error-page-mobile-header .wdm-lp-logo {
		max-width: calc(100% - 112px);
	}

	body.error404 .wdm-error-page-mobile-header .wdm-lp-logo img {
		width: 137px;
		height: 32px;
		max-width: 100%;
	}

	body.error404 .wdm-lp-form-col {
		flex: 0 0 auto;
		min-height: auto;
		padding: 0;
		background: transparent;
		border-radius: 0;
		order: 3;
	}

	body.error404 .wdm-lp-image-col {
		display: flex;
		position: relative;
		top: auto;
		height: 363px;
		min-height: 363px;
		margin: 0 0 20px;
		width: 100%;
		border-radius: 16px;
		flex: 0 0 auto;
		order: 2;
	}

	.wdm-lp-image-col {
		display: none;
	}

	body.error404 .wdm-lp-header {
		display: none;
	}

	body.error404 .wdm-lp-form-inner {
		padding: 0;
		max-width: 100%;
		margin: 0;
		align-items: flex-start;
		width: 100%;
	}

	body.error404 .wdm-lp-title {
		font-size: 18px;
	}

	body.error404 .wdm-lp-switch {
		font-size: 14px;
	}

	body.error404 .wdm-error-page-search {
		gap: 14px;
	}

	body.error404 .wdm-lp-home-link {
		position: static;
	}
}

@media (max-width: 1024px) and (min-width: 769px) {
	body.error404 .wdm-error-page-mobile-header {
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
		margin-bottom: 20px;
		min-height: 40px;
	}

	body.error404 .wdm-error-page-mobile-header .wdm-lp-home-link {
		position: absolute;
		left: 0;
	}

	body.error404 .wdm-lp-header {
		display: none;
	}

	body.error404 .wdm-lp-wrap {
		padding: 20px;
		flex-direction: column;
	}

	body.error404 .wdm-lp-image-col {
		display: flex;
		position: relative;
		top: auto;
		height: 360px;
		min-height: 360px;
		border-radius: 16px;
		flex: 0 0 auto;
		margin-bottom: 20px;
		width: 100%;
		order: 2;
	}

	.wdm-lp-image-col {
		display: none;
	}

	body.error404 .wdm-lp-form-col {
		min-height: auto;
		background: transparent;
		border-radius: 0;
		padding: 0;
		order: 3;
	}

	.wdm-lp-form-col {
		flex: 0 0 100%;
		padding: 48px;
	}

	.wdm-error-page-search {
		gap: 14px;
	}

	body.error404 .wdm-lp-title {
		font-size: 18px;
	}

	body.error404 .wdm-lp-switch {
		font-size: 14px;
	}
}

/* Required asterisk */
.wdm-lp-required {
	color: #e53935;
	margin-left: 2px;
}

/* Radio button group (Juridiskā forma) */
.wdm-lp-radio-group {
	display: flex;
	gap: 24px;
	align-items: center;
	flex-wrap: wrap;
}

.wdm-lp-radio {
	display: flex !important;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
	color: #323232;
	font-weight: 400;
	margin-bottom: 0;
}

.wdm-lp-radio input[type="radio"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	flex-shrink: 0;
}

/* Select wrapper with custom chevron arrow */
.wdm-lp-select-wrap {
	position: relative;
}

.wdm-lp-select-wrap select {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234C4C4D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-color: #fff;
	padding-right: 40px;
	cursor: pointer;
}

/* Privacy policy text (custom class + WooCommerce output) */
.wdm-lp-privacy,
.woocommerce-privacy-policy-text {
	font-size: 12px;
	font-weight: 400;
	color: #4C4C4D;
	line-height: 1.33;
	letter-spacing: 0.03em;
	margin: 16px 0 0;
}

.wdm-lp-privacy a,
.woocommerce-privacy-policy-text a {
	color: #1b4fa8;
	text-decoration: underline;
}
