/**
 * Custom WordPress Login Style for vilmar.com.ua
 * Layout: Split 2-column view (Left: Login Form, Middle: Ukrainian Flag Divider, Right: Trident & Organization Info)
 * Footer: Language switcher & copyright
 */

:root {
	--vilmar-blue: #0b4f9c;
	--vilmar-blue-dark: #073870;
	--vilmar-blue-light: #1e70cd;
	--ua-blue: #0057b7;
	--ua-yellow: #ffd700;
	--ua-gold: #c99700;
	--bg-gradient: linear-gradient(135deg, #0b1c38 0%, #112d58 50%, #0d2242 100%);
	--card-bg: #ffffff;
	--card-border: #e2e8f0;
	--card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
	--text-main: #0f172a;
	--text-muted: #64748b;
	--input-bg: #f8fafc;
	--input-border: #cbd5e1;
	--input-focus: #0b4f9c;
	--input-focus-ring: rgba(11, 79, 156, 0.18);
	--radius-lg: 16px;
	--radius-md: 8px;
}

/* Background & Body */
body.login {
	background: var(--bg-gradient) !important;
	min-height: 100vh;
	min-height: 100dvh;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--text-main);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 24px 16px;
	box-sizing: border-box;
	position: relative;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* Top Ukrainian Flag Accent Bar */
body.login::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--ua-blue) 0%, var(--ua-blue) 50%, var(--ua-yellow) 50%, var(--ua-yellow) 100%);
	z-index: 999;
}

/* Background watermark / decorative glow */
body.login::after {
	content: "";
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 800px;
	height: 800px;
	background: radial-gradient(circle, rgba(11, 79, 156, 0.25) 0%, rgba(0, 87, 183, 0.05) 50%, transparent 70%);
	pointer-events: none;
	z-index: 0;
}

/* Main Split Wrapper */
.vilmar-login-container {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	background: var(--card-bg);
	border-radius: var(--radius-lg);
	box-shadow: var(--card-shadow);
	width: 100%;
	max-width: 840px;
	height: auto;
	min-height: auto;
	overflow: hidden;
	position: relative;
	z-index: 2;
	margin: auto 0;
	flex-shrink: 0;
}

/* Left Side: Standard WordPress Form Area */
.vilmar-left-panel {
	flex: 1 1 50%;
	padding: 40px 36px 36px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: auto;
}

#login {
	width: 100% !important;
	max-width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Hide standard duplicate WP logo container since we have official header/branding */
#login h1 {
	margin-bottom: 20px;
	text-align: left;
}

#login h1 a {
	display: none !important;
}

/* Section Title inside Login Panel */
.vilmar-form-header {
	margin-bottom: 24px;
}

.vilmar-form-header h2 {
	margin: 0 0 6px 0;
	font-size: 22px;
	font-weight: 700;
	color: var(--text-main);
	letter-spacing: -0.02em;
}

.vilmar-form-header p {
	margin: 0;
	font-size: 13px;
	color: var(--text-muted);
}

/* WordPress Form Resets */
.login form {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	height: auto !important;
	overflow: visible !important;
}

/* Form Headings and Labels */
.login label {
	color: var(--text-main) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	margin-bottom: 6px !important;
	display: block;
}

/* Inputs */
.login form .input,
.login input[type="text"],
.login input[type="password"] {
	background-color: var(--input-bg) !important;
	border: 1.5px solid var(--input-border) !important;
	border-radius: var(--radius-md) !important;
	font-size: 14px !important;
	padding: 10px 14px !important;
	color: var(--text-main) !important;
	box-shadow: none !important;
	transition: all 0.2s ease-in-out !important;
	width: 100% !important;
	box-sizing: border-box !important;
	min-height: 44px !important;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus {
	background-color: #ffffff !important;
	border-color: var(--input-focus) !important;
	box-shadow: 0 0 0 3.5px var(--input-focus-ring) !important;
	outline: none !important;
}

/* Password Toggle Icon */
.login .wp-pwd {
	position: relative;
}

.login .button.wp-hide-pw {
	top: 50% !important;
	transform: translateY(-50%) !important;
	right: 6px !important;
	height: 32px !important;
	min-height: 32px !important;
	padding: 0 6px !important;
	border: none !important;
	background: transparent !important;
	color: var(--text-muted) !important;
	box-shadow: none !important;
}

/* Remember Me Checkbox */
.login .forgetmenot {
	margin-top: 12px !important;
	margin-bottom: 12px !important;
	display: flex;
	align-items: center;
}

.login .forgetmenot label {
	font-size: 13px !important;
	font-weight: 500 !important;
	color: var(--text-muted) !important;
	display: inline-flex !important;
	align-items: center !important;
	cursor: pointer;
	user-select: none;
}

.login input[type="checkbox"] {
	border: 1.5px solid var(--input-border) !important;
	border-radius: 4px !important;
	background: var(--input-bg) !important;
	box-shadow: none !important;
	width: 18px !important;
	height: 18px !important;
	margin-right: 8px !important;
	margin-top: 0 !important;
	cursor: pointer;
	accent-color: var(--vilmar-blue);
}

/* Submit Button */
.wp-core-ui .button-primary#wp-submit,
.wp-core-ui .button-primary {
	background: var(--vilmar-blue) !important;
	border: none !important;
	border-radius: var(--radius-md) !important;
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	padding: 12px 24px !important;
	min-height: 46px !important;
	width: 100% !important;
	height: auto !important;
	line-height: normal !important;
	text-shadow: none !important;
	box-shadow: 0 4px 10px rgba(11, 79, 156, 0.3) !important;
	transition: all 0.2s ease-in-out !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 16px;
}

.wp-core-ui .button-primary#wp-submit:hover,
.wp-core-ui .button-primary:hover {
	background: var(--vilmar-blue-dark) !important;
	box-shadow: 0 6px 16px rgba(11, 79, 156, 0.4) !important;
	transform: translateY(-1px);
}

.wp-core-ui .button-primary#wp-submit:active,
.wp-core-ui .button-primary:active {
	transform: translateY(0);
}

/* Secondary Links (#nav & #backtoblog) */
.login #nav,
.login #backtoblog {
	text-align: center !important;
	padding: 0 !important;
	margin: 16px 0 0 0 !important;
	font-size: 13px !important;
}

.login #nav a,
.login #backtoblog a {
	color: var(--text-muted) !important;
	text-decoration: none !important;
	font-weight: 500 !important;
	transition: color 0.15s ease;
}

.login #nav a:hover,
.login #backtoblog a:hover {
	color: var(--vilmar-blue) !important;
	text-decoration: underline !important;
}

/* Notices and Errors */
.login .message,
.login .notice,
.login #login_error {
	border-radius: var(--radius-md) !important;
	border: 1px solid var(--card-border) !important;
	border-left: 4px solid #3b82f6 !important;
	background-color: #eff6ff !important;
	color: #1e40af !important;
	padding: 12px 14px !important;
	margin-bottom: 18px !important;
	font-size: 13px !important;
}

.login #login_error {
	border-left-color: #ef4444 !important;
	background-color: #fef2f2 !important;
	color: #991b1b !important;
}

/* Middle Divider: Flag of Ukraine line */
.vilmar-flag-divider {
	width: 4px;
	min-height: 100%;
	background: linear-gradient(to bottom, var(--ua-blue) 0%, var(--ua-blue) 50%, var(--ua-yellow) 50%, var(--ua-yellow) 100%);
	position: relative;
	flex-shrink: 0;
	box-shadow: 0 0 10px rgba(0, 87, 183, 0.2);
}

/* Right Side: Trident, Organization & Service Description */
.vilmar-right-panel {
	flex: 1 1 50%;
	background: linear-gradient(145deg, #092347 0%, #0d3161 60%, #081d3a 100%);
	color: #ffffff;
	padding: 44px 36px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	position: relative;
	min-height: auto;
}

/* Trident Icon Styling */
.vilmar-trident-wrapper {
	margin-bottom: 24px;
	filter: drop-shadow(0 4px 16px rgba(255, 215, 0, 0.35));
	display: flex;
	justify-content: center;
	align-items: center;
}

.vilmar-trident-img,
.vilmar-trident-svg {
	width: 84px;
	height: auto;
	max-height: 120px;
	object-fit: contain;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), filter 0.35s ease;
	display: block;
}

.vilmar-trident-wrapper:hover .vilmar-trident-img,
.vilmar-trident-wrapper:hover .vilmar-trident-svg {
	transform: scale(1.06);
	filter: drop-shadow(0 0 20px rgba(255, 225, 75, 0.65));
}

/* Organization Title */
.vilmar-org-title {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0 0 8px 0;
	color: #ffffff;
	line-height: 1.2;
}

.vilmar-domain-badge {
	display: inline-block;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(4px);
	padding: 3px 12px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: #e2e8f0;
	margin-bottom: 20px;
}

/* Service Description */
.vilmar-service-desc {
	font-size: 14px;
	line-height: 1.6;
	color: #cbd5e1;
	max-width: 320px;
	margin: 0 0 24px 0;
	font-weight: 400;
}

/* Subtle Security / State Badge */
.vilmar-security-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #94a3b8;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 18px;
	width: 100%;
	justify-content: center;
}

.vilmar-security-badge svg {
	width: 16px;
	height: 16px;
	fill: var(--ua-yellow);
}

/* Footer: Language Switcher & Copyright */
.vilmar-login-footer {
	position: relative;
	z-index: 10;
	margin-top: 20px;
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-align: center;
	flex-shrink: 0;
	width: 100%;
}

.login .language-switcher {
	margin: 0 !important;
	position: static !important;
	text-align: center;
}

.login .language-switcher select {
	background-color: rgba(255, 255, 255, 0.1) !important;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
	border-radius: var(--radius-md) !important;
	color: #e2e8f0 !important;
	padding: 6px 14px !important;
	font-size: 13px !important;
	backdrop-filter: blur(6px);
	cursor: pointer;
	transition: all 0.2s ease;
}

.login .language-switcher select:focus,
.login .language-switcher select:hover {
	background-color: rgba(255, 255, 255, 0.18) !important;
	border-color: rgba(255, 255, 255, 0.45) !important;
	outline: none;
}

.login .language-switcher select option {
	background-color: #0b1c38;
	color: #ffffff;
}

.vilmar-copyright {
	color: #94a3b8;
	font-size: 12px;
	margin: 0;
}

/* Responsive (Mobile & Tablet) */
@media (max-width: 768px) {
	body.login {
		padding: 16px 12px 24px;
		justify-content: flex-start;
	}

	.vilmar-login-container {
		flex-direction: column;
		max-width: 440px;
		width: 100%;
		height: auto;
		min-height: auto;
		margin: 0 auto;
		overflow: hidden;
		flex-shrink: 0;
	}

	.vilmar-right-panel {
		order: 1;
		flex: 0 0 auto;
		width: 100%;
		height: auto;
		min-height: auto;
		padding: 22px 18px 16px;
	}

	.vilmar-trident-wrapper {
		margin-bottom: 10px;
	}

	.vilmar-trident-img,
	.vilmar-trident-svg {
		width: 52px;
		max-height: 74px;
	}

	.vilmar-org-title {
		font-size: 19px;
		margin-bottom: 4px;
	}

	.vilmar-domain-badge {
		font-size: 10.5px;
		padding: 2px 10px;
		margin-bottom: 8px;
	}

	.vilmar-service-desc {
		font-size: 12px;
		line-height: 1.45;
		margin: 0 0 10px 0;
		max-width: 300px;
	}

	.vilmar-security-badge {
		padding-top: 10px;
		font-size: 11px;
		gap: 6px;
	}

	.vilmar-flag-divider {
		order: 2;
		width: 100%;
		height: 3px;
		min-height: 3px;
		flex: 0 0 3px;
		background: linear-gradient(to right, var(--ua-blue) 0%, var(--ua-blue) 50%, var(--ua-yellow) 50%, var(--ua-yellow) 100%);
		box-shadow: 0 0 8px rgba(0, 87, 183, 0.25);
	}

	.vilmar-left-panel {
		order: 3;
		flex: 0 0 auto;
		width: 100%;
		height: auto;
		min-height: auto;
		padding: 22px 18px 24px;
	}

	.vilmar-form-header {
		margin-bottom: 16px;
		text-align: left;
	}

	.vilmar-form-header h2 {
		font-size: 19px;
		margin-bottom: 4px;
	}

	.vilmar-form-header p {
		font-size: 12.5px;
	}

	.login form .input,
	.login input[type="text"],
	.login input[type="password"] {
		font-size: 16px !important; /* Prevents auto-zoom on iOS */
		min-height: 44px !important;
		padding: 8px 12px !important;
	}

	.login .forgetmenot {
		margin-top: 10px !important;
		margin-bottom: 10px !important;
	}

	.wp-core-ui .button-primary#wp-submit,
	.wp-core-ui .button-primary {
		min-height: 46px !important;
		font-size: 15px !important;
		margin-top: 14px !important;
		width: 100% !important;
	}

	.login #nav,
	.login #backtoblog {
		margin: 12px 0 0 0 !important;
		font-size: 12.5px !important;
	}

	.vilmar-login-footer {
		margin-top: 16px;
		margin-bottom: 12px;
	}
}

/* Extra small mobile adjustments */
@media (max-width: 380px) {
	.vilmar-right-panel {
		padding: 18px 14px 14px;
	}

	.vilmar-left-panel {
		padding: 18px 14px 20px;
	}

	.vilmar-service-desc {
		display: none;
	}
}
