/**
 * Stylesheets dành cho giao diện Frontend (Popup Đăng nhập) của QQ Access Control.
 * Thiết kế theo phong cách Glassmorphism hiện đại, cao cấp.
 *
 * @package QQ_Access_Control
 */

/* Lớp phủ mờ toàn màn hình */
.qqac-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(15, 23, 42, 0.7); /* Xanh Slate đậm mờ */
	backdrop-filter: blur(8px);               /* Làm mờ hậu cảnh */
	-webkit-backdrop-filter: blur(8px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

/* Hộp đăng nhập chính */
.qqac-login-box {
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 40px rgba(0, 0, 0, 0.03);
	max-width: 420px;
	width: 100%;
	padding: 35px 30px;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, 0.8);
	transition: transform 0.3s ease;
}

/* Tiêu đề & Icon khóa */
.qqac-login-header {
	text-align: center;
	margin-bottom: 25px;
}

.qqac-icon-lock {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	background: #eff6ff;
	border-radius: 50%;
	font-size: 28px;
	margin-bottom: 15px;
	border: 1px solid #dbeafe;
}

.qqac-login-header h2 {
	margin: 0 0 8px 0;
	color: #1e293b;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
}

.qqac-description {
	margin: 0;
	color: #64748b;
	font-size: 14px;
	line-height: 1.5;
}

/* Cấu trúc Form nhóm */
.qqac-form-group {
	margin-bottom: 20px;
}

.qqac-form-group label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: #334155;
	margin-bottom: 6px;
}

/* Ô nhập liệu */
.qqac-input-field {
	width: 100% !important;
	padding: 10px 14px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	color: #0f172a !important;
	background: #f8fafc !important;
	box-sizing: border-box !important;
	box-shadow: none !important;
	transition: all 0.2s ease !important;
	height: auto !important;
}

.qqac-input-field:focus {
	outline: none !important;
	border-color: #2563eb !important;
	background: #ffffff !important;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Wrapper mật khẩu có nút Toggle mắt */
.qqac-input-password-wrap {
	position: relative;
	width: 100%;
}

.qqac-input-password-wrap .qqac-input-field {
	padding-right: 40px !important;
}

.qqac-toggle-password-btn {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 16px;
	color: #64748b;
	padding: 0;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.qqac-toggle-password-btn:focus {
	outline: none;
}

/* Khu vực Captcha */
.qqac-captcha-wrap {
	display: flex;
	gap: 12px;
	align-items: center;
}

.qqac-input-captcha-field {
	flex: 1;
	text-align: center;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.qqac-captcha-img-box {
	display: flex;
	align-items: center;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 2px 8px 2px 2px;
	background: #f1f5f9;
}

.qqac-captcha-img-box img {
	height: 34px;
	width: auto;
	border-radius: 6px;
	display: block;
}

.qqac-captcha-refresh-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 5px;
	margin-left: 5px;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
}

.qqac-captcha-refresh-btn:hover {
	transform: rotate(45deg);
}

.qqac-captcha-refresh-btn:focus {
	outline: none;
}

/* Thông báo lỗi */
.qqac-error-message {
	background-color: #fef2f2;
	border-left: 4px solid #ef4444;
	color: #b91c1c;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.4;
	margin-top: 15px;
	font-weight: 500;
}

/* Nút Submit chính */
.qqac-btn-submit {
	width: 100%;
	padding: 12px;
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
}

.qqac-btn-submit:hover {
	background: linear-gradient(135deg, #1d4ed8, #1e40af);
	box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.qqac-btn-submit:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4);
}

.qqac-btn-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* Spinner quay trong nút submit */
.qqac-btn-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: qqac-spin 0.8s linear infinite;
	display: inline-block;
	margin-left: 8px;
}

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

/* Rung lắc lỗi khi Submit sai */
.qqac-shake {
	animation: qqac-shake-anim 0.4s ease;
}

@keyframes qqac-shake-anim {
	0%, 100% { transform: translateX(0); }
	20%, 60% { transform: translateX(-8px); }
	40%, 80% { transform: translateX(8px); }
}

/* Toast thông báo thành công */
.qqac-toast-success {
	position: fixed;
	top: 25px;
	right: 25px;
	background: #0f5132; /* Xanh lá đậm */
	color: #ffffff;
	padding: 15px 25px;
	border-radius: 8px;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 14px;
	z-index: 100000;
	border-left: 4px solid #198754;
	animation: qqac-toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes qqac-toast-in {
	from {
		opacity: 0;
		transform: translateY(-20px) scale(0.9);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}
