/**
 * JM Azure Authentication Login Page Styles
 *
 * Modern, premium design for the Azure login page template.
 *
 * @package    Jm_Azure_Authentication
 * @subpackage Jm_Azure_Authentication/assets/css
 */

/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
	--jm-azure: #0078d4;
	--jm-azure-dark: #005a9e;
	--jm-azure-light: #e7f3ff;
	--jm-font: "Mulish", sans-serif;
	--jm-radius: 8px;
	--jm-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 25px rgba(0, 0, 0, 0.08);
	--jm-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* ============================================
   RESET & BASE
   ============================================ */

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body.page-template-jm-azure-login {
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--jm-font);
	overflow-x: hidden;
}

/* ============================================
   MAIN WRAPPER
   ============================================ */

.jm-azure-login-wrapper {
	position: relative;
	min-height: 100vh;
	width: 100%;
	background: linear-gradient(140deg, #008a92 0%, #00AAB4 55%, #00c4cf 100%);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 40px;
}

.jm-azure-login-wrapper::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 1;
}

.jm-logo {
	position: absolute;
	z-index: 2;
	top: 40px;
	left: 40px;
	height: 80px;
	width: auto;
}

.jm-logo img{
	width: 100%;
	height: 100%;
}

/* ============================================
   LOGIN PANEL - ABSOLUTE RIGHT
   ============================================ */

.jm-azure-login-panel {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 560px;
	height: calc(100vh - 80px);
	display: flex;
	flex-direction: column;
	animation: slideInRight 0.6s ease both;
}

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.jm-azure-login-card {
	background: #ffffff;
	border-radius: var(--jm-radius);
	box-shadow: var(--jm-shadow-lg);
	padding: 32px 24px;
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

/* ============================================
   ALERT
   ============================================ */

.jm-azure-login-alert {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 18px;
	border-radius: 10px;
	margin-bottom: 28px;
	font-size: 13px;
	line-height: 1.5;
	animation: slideDown 0.4s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.jm-azure-login-alert.error {
	background: #fef2f2;
	border: 1.5px solid #fca5a5;
	color: #991b1b;
}

.jm-azure-login-alert svg {
	flex-shrink: 0;
	margin-top: 1px;
	stroke: #ef4444;
}

.jm-azure-login-alert strong {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	color: #7f1d1d;
}

.jm-azure-login-alert p {
	margin: 0;
	color: #991b1b;
}

/* ============================================
   HEADER
   ============================================ */

.jm-azure-login-header {
	margin-bottom: 24px;
}

.jm-azure-login-logo {
	margin-bottom: 50px;
}

.jm-azure-login-logo img,
.jm-azure-login-logo .custom-logo {
	max-height: 124px;
	width: auto;
	max-width: 200px;
	display: inline-block;
}

.jm-azure-login-title {
	font-size: 32px;
	font-weight: 600;
	color: #000000;
	margin: 0 0 12px 0;
	line-height: 1;
	text-align: center;
}

.jm-azure-login-intro {
	margin-top: 16px;
	color: #949494;
	font-size: 16px;
	line-height: 1.5;
}

.jm-azure-login-intro p {
	margin: 0 0 8px 0;
	font-size: inherit;
	line-height: inherit;
}

.jm-azure-login-intro p:last-child {
	margin-bottom: 0;
}

/* ============================================
   FORM
   ============================================ */

.jm-azure-login-form {
	margin-bottom: 32px;
	display: flex;
	justify-content: center;
}

/* Microsoft login button */
.jm-azure-login-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	border: 1px solid #BCB5B5;
	border-radius: 10px;
	padding: 12px 20px;
	font-family: var(--jm-font);
	font-size: 16px;
	font-weight: 500;
	color: #000000;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	overflow: hidden;
}

.jm-azure-login-btn:hover {
	transform: translateY(-2px);
}

.jm-azure-login-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.jm-azure-login-btn:focus {
	outline: none;
	box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.2);
}

.jm-azure-btn-content {
	display: flex;
	align-items: center;
	gap: 12px;
	transition: opacity 0.2s;
}

.jm-azure-login-btn.loading .jm-azure-btn-content {
	opacity: 0;
}

.jm-azure-login-icon {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.jm-azure-login-btn:hover .jm-azure-login-icon {
	transform: rotate(5deg) scale(1.05);
}

/* Button loader */
.jm-azure-btn-loader {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #ffffff;
	opacity: 0;
	transition: opacity 0.2s;
}

.jm-azure-login-btn.loading .jm-azure-btn-loader {
	opacity: 1;
	animation: spin 0.8s linear infinite;
}

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

/* Divider */
.jm-azure-login-divider {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 28px 0;
	color: #9ca3af;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.jm-azure-login-divider::before,
.jm-azure-login-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e5e7eb;
}

/* Info box */
.jm-azure-login-info {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px 16px;
	background: var(--jm-azure-light);
	border: 1px solid #b3d4f0;
	border-radius: 8px;
	color: #005a9e;
	font-size: 13px;
	line-height: 1.5;
}

.jm-azure-login-info svg {
	flex-shrink: 0;
	margin-top: 1px;
	stroke: var(--jm-azure);
}

.jm-azure-login-info p {
	margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */

.jm-azure-login-footer {
	margin-top: auto;
}

.jm-azure-login-support {
	font-size: 16px;
	color: #949494;
	line-height: 1.5;
}

.jm-azure-login-support p {
	margin: 0 0 8px 0;
	font-size: inherit;
	line-height: inherit;
}

.jm-azure-login-support p:last-child {
	margin-bottom: 0;
}

.jm-azure-login-support a {
	color: #00AAB4;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s;
}

.jm-azure-login-support a:hover {
	color: var(--jm-azure-dark);
	text-decoration: underline;
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
	.jm-azure-login-wrapper {
		padding: 30px;
	}

	.jm-azure-login-panel {
		max-width: 450px;
	}
}

@media (max-width: 768px) {
	.jm-azure-login-card {
		padding: 20px;
	}

	.jm-azure-login-wrapper {
		justify-content: center;
		align-items: flex-end;
	}

	.jm-azure-login-panel {
		max-width: 100%;
		height: calc(100vh - 150px);
	}

	.jm-azure-login-intro, .jm-azure-login-btn, .jm-azure-login-support {
		font-size: 14px;
	}

	.jm-azure-login-btn {
		padding: 10px 22px;
	}

	.jm-logo {
		top: 30px;
		left: 20px;
		height: 64px;
	}
}

@media (max-width: 480px) {
	.jm-azure-login-logo img,
	.jm-azure-login-logo .custom-logo {
		max-height: 90px;
	}

}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* High contrast mode */
@media (prefers-contrast: high) {
	.jm-azure-login-card {
		border: 2px solid #000;
	}

	.jm-azure-login-btn {
		border: 2px solid #000;
	}
}
