/* ==========================================================================
   WIDGET THỐNG KÊ SỐ LƯỢNG NGƯỜI TRUY CẬP (POPUP MODAL CHUẨN TRÒN)
   Phong cách Glassmorphism đồng bộ, hiển thị số thực tế từ PHP
   ========================================================================== */

/* 1. KHUNG CHỨA MODAL THỐNG KÊ TRUY CẬP */
.visitor-modal-wrapper {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 2147483646;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	pointer-events: none;
	padding: 16px;
	box-sizing: border-box;
	user-select: none;
	-webkit-user-select: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Đảm bảo luôn hiển thị kể cả khi bật Fullscreen */
:fullscreen .visitor-modal-wrapper,
:-webkit-full-screen .visitor-modal-wrapper,
:-moz-full-screen .visitor-modal-wrapper,
:-ms-fullscreen .visitor-modal-wrapper {
	position: fixed !important;
	z-index: 2147483647 !important;
}

.visitor-modal-wrapper.active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.visitor-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(5, 10, 20, 0.75);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

/* 2. BẢNG CHI TIẾT SỐ LIỆU (STATS MODAL BOX) */
.visitor-modal-box {
	position: relative;
	width: 330px;
	max-width: 92vw;
	background: linear-gradient(165deg, rgba(15, 23, 42, 0.97) 0%, rgba(10, 15, 29, 0.99) 100%);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 20px;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.2);
	padding: 18px;
	color: #ffffff;
	display: flex;
	flex-direction: column;
	gap: 12px;
	transform: scale(0.9) translateY(15px);
	transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 2;
}

.visitor-modal-wrapper.active .visitor-modal-box {
	transform: scale(1) translateY(0);
}

/* Header bảng */
.visitor-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.visitor-card-title {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #38bdf8;
	display: flex;
	align-items: center;
	gap: 8px;
}

.visitor-card-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.visitor-card-badge {
	font-size: 10.5px;
	background: rgba(34, 197, 94, 0.2);
	color: #4ade80;
	border: 1px solid rgba(34, 197, 94, 0.4);
	padding: 2px 7px;
	border-radius: 6px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 4px;
}

.visitor-modal-close-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #cbd5e1;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	outline: none;
	transition: all 0.25s ease;
}

.visitor-modal-close-btn:hover {
	background: #ef4444;
	border-color: #ef4444;
	color: #ffffff;
	transform: rotate(90deg);
}

/* Danh sách các dòng số liệu */
.visitor-stat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.05);
	font-size: 13px;
}

.visitor-stat-row:hover {
	background: rgba(255, 255, 255, 0.07);
}

.visitor-stat-label {
	color: #cbd5e1;
	display: flex;
	align-items: center;
	gap: 6px;
}

.visitor-stat-value {
	font-weight: 700;
	font-size: 14px;
}

.val-online {
	color: #34d399;
}

.val-today {
	color: #60a5fa;
}

.val-yesterday {
	color: #fbbf24;
}

.val-month {
	color: #c084fc;
}

.val-total {
	color: #38bdf8;
	font-size: 15px;
}

/* Footer bảng */
.visitor-card-footer {
	padding-top: 8px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 11px;
	color: #94a3b8;
}

.visitor-refresh-btn {
	background: none;
	border: none;
	color: #38bdf8;
	font-size: 11.5px;
	cursor: pointer;
	padding: 3px 6px;
	display: flex;
	align-items: center;
	gap: 5px;
	outline: none;
	transition: all 0.3s ease;
	border-radius: 6px;
}

.visitor-refresh-btn:hover {
	background: rgba(56, 189, 248, 0.15);
	transform: scale(1.05);
}

/* 3. RESPONSIVE CHO ĐIỆN THOẠI (80% KÍCH THƯỚC) */
@media screen and (max-width: 768px) {
	.visitor-modal-box {
		width: 80vw;
		max-width: 80vw;
		max-height: 80vh;
		max-height: 80dvh;
		border-radius: 18px;
		padding: 14px;
	}
}
