/* CQ Branding - Login Page Customization */

:root {
	--cq-primary: #135078;
	--cq-primary-dark: #0f172a;
	--cq-primary-light: #e8f4ff;
	--cq-secondary: #00a7a7;
	--cq-accent: #00a7a7;
	--cq-success: #16a34a;
	--cq-warning: #ea580c;
	--cq-error: #dc2626;
	--cq-text-primary: #1e293b;
    --cq-text-light-primary: #ffffff;
	--cq-text-secondary: #648b6a;
	--cq-border: #cbd5e1;
	--cq-dark-border: #475569;
}

.cq-login-wrapper {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	background-color: #0f172a;
	background-image: 
		linear-gradient(135deg, rgba(19, 80, 120, 0.5) 0%, rgba(15, 23, 42, 0.6) 100%),
		url('/assets/cqbranding/images/hero-bg.jpg');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: fixed;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
	z-index: 1000;
}

/* Login Section */
.cq-login-section {
	width: 100%;
	max-width: 420px;
}

.cq-login-section.for-email-login,
.cq-login-section.for-signup,
.cq-login-section.for-forgot,
.cq-login-section.for-login-with-email-link {
	display: none;
}

/* Login Header */
.cq-login-header {
	text-align: center;
	margin-bottom: 32px;
	animation: slideDown 0.6s ease-out;
}

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

.cq-logo-container {
	position: relative;
	z-index: 3;
}

.cq-app-logo {
	height: 60px;
	width: auto;
	display: inline-block;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.cq-login-title {
	font-size: 28px;
	font-weight: 700;
	color: var(--cq-text-light-primary);
	margin: 16px 0 8px 0;
	letter-spacing: -0.5px;
	position: relative;
	z-index: 3;
}

.cq-login-subtitle {
	font-size: 14px;
	color: var(--cq-text-light-primary);
	margin: 0;
	font-weight: 500;
	position: relative;
	z-index: 3;
}

/* Login Card */
.cq-login-card {
	background-color: white !important;
	border-radius: 12px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	padding: 40px;
	margin-bottom: 24px;
	animation: slideUp 0.6s ease-out;
	overflow: hidden;
	position: relative;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Login Form */
.cq-login-form {
	display: flex;
	flex-direction: column;
	position: relative;
	z-index: 2;
}

.cq-login-form-body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 24px;
	background: rgba(255, 255, 255, 0.95);
	padding: 20px;
	border-radius: 4px;
	backdrop-filter: blur(10px);
}

.cq-login-form-body .form-group {
	margin: 0;
}

.cq-form-label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--cq-text-primary);
	letter-spacing: 0.3px;
}

.cq-form-input {
	border: 1.5px solid var(--cq-border);
	border-radius: 4px;
	padding: 12px 16px 12px 40px;
	font-size: 14px;
	transition: all 0.3s ease;
	background-color: #f8fafc;
}

.cq-form-input:focus {
	border-color: var(--cq-primary);
	background-color: white;
	box-shadow: 0 0 0 3px rgba(19, 80, 120, 0.1);
	outline: none;
}

.cq-form-input::placeholder {
	color: #94a3b8;
}

/* Error State */
.cq-form-input.input-error {
	border-color: var(--cq-error);
	background-color: #fef2f2;
	animation: nudge 0.4s ease-in-out;
}

.cq-form-input.input-error:focus {
	border-color: var(--cq-error);
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

@keyframes nudge {
	0%, 100% {
		transform: translateX(0);
	}
	25% {
		transform: translateX(-8px);
	}
	50% {
		transform: translateX(8px);
	}
	75% {
		transform: translateX(-8px);
	}
}

/* Form Fields */
.email-field,
.password-field {
	position: relative;
	display: flex;
	align-items: center;
}

.field-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--cq-secondary);
	pointer-events: none;
}

.toggle-password {
	position: absolute;
	right: 12px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	user-select: none;
	transition: color 0.3s ease;
}

.toggle-password:hover {
	color: var(--cq-primary);
}

/* Buttons */
.cq-login-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: rgba(255, 255, 255, 0.95);
	padding: 15px;
	border-radius: 8px;
	backdrop-filter: blur(10px);
	position: relative;
	z-index: 2;
}

.btn-cq-primary,
.btn-cq-secondary {
	border: none;
	border-radius: 8px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.btn-cq-primary {
	background-color: var(--cq-primary);
	color: white;
}

.btn-cq-primary:hover {
	background-color: var(--cq-secondary);
	box-shadow: 0 10px 15px -3px rgba(19, 80, 120, 0.2);
	transform: translateY(-2px);
}

.btn-cq-primary:active {
	transform: translateY(0);
}

.btn-cq-secondary {
	background-color: white;
	color: var(--cq-primary);
	border: 1.5px solid var(--cq-border);
}

.btn-cq-secondary:hover {
	background-color: var(--cq-primary-light);
	border-color: var(--cq-primary);
}

/* Forgot Password Link */
.forgot-password-message {
	text-align: right;
	margin: 8px 0 0 0;
	font-size: 13px;
}

.cq-link {
	color: var(--cq-primary);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.3s ease;
}

.cq-link:hover {
	color: var(--cq-secondary);
	text-decoration: underline;
}

/* Social Logins */
.cq-social-logins {
	margin-top: 24px;
}

.login-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 24px 0;
	color: var(--cq-text-secondary);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.login-divider::before,
.login-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background-color: var(--cq-border);
}

.login-divider span {
	color: var(--cq-text-secondary);
}

.social-login-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.login-button-wrapper {
	width: 100%;
}

.btn-login-option {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background-color: #f8fafc;
	color: var(--cq-text-primary);
	border: 1px solid var(--cq-border);
	font-weight: 500;
	font-size: 13px;
	text-transform: none;
	letter-spacing: normal;
	padding: 10px 16px;
}

.btn-login-option:hover {
	background-color: var(--cq-primary-light);
	border-color: var(--cq-primary);
	color: var(--cq-primary);
}

/* Sign Up Message */
.cq-signup-message {
	color: rgba(255, 255, 255, 0.8);
	font-size: 14px;
	margin: 0;
}

.cq-signup-message .cq-link {
	color: white;
	text-decoration: underline;
	font-weight: 700;
}

.cq-signup-message .cq-link:hover {
	color: var(--cq-secondary);
}

/* Responsive Design */
@media (max-width: 480px) {
	.cq-login-wrapper {
		padding: 10px;
	}

	.cq-login-title {
		font-size: 24px;
	}

	.cq-login-card {
		padding: 30px 20px;
	}

	.cq-app-logo {
		height: 50px;
	}

	.cq-login-form-body {
		gap: 16px;
	}
}

/* Print Styles */
@media print {
	.cq-login-wrapper {
		display: none;
	}
}
