/*
 * luxriot-stats.css
 * Videcom Luxriot visitor statistics
 */

#content.stats_content_full {
	width: 100%;
	max-width: 100%;
	float: none;
	box-sizing: border-box;
}


/* Login */

.stats_login_wrap {
	max-width: 400px;
	margin: 60px auto;
}

.stats_login_box {
	padding: 25px;
	border: 1px solid #ccc;
	background: #fff;
	box-sizing: border-box;
}

.stats_login_box .lux_info_heading {
	font-size: 22px;
	margin-bottom: 12px;
}

.stats_login_box label {
	display: block;
	margin: 14px 0 5px 0;
}

.stats_login_box input[type="text"],
.stats_login_box input[type="password"] {
	width: 100%;
	height: 36px;
	padding: 6px 8px;
	border: 1px solid #999;
	box-sizing: border-box;
}

.stats_login_error {
	margin-top: 15px;
	color: #a00000;
}

.stats_button {
	display: inline-block;
	margin-top: 16px;
	padding: 10px 15px;
	border: 0;
	background: #1768a0;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
}

.stats_button:hover {
	background: #125783;
}


/* Toolbar */

.stats_toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 5px;
}

.stats_period a,
.stats_period a:visited,
.stats_period a:active,
.stats_logout a,
.stats_logout a:visited,
.stats_logout a:active {
	color: #0055D5;
	text-decoration: underline;
}

.stats_period a {
	margin-left: 8px;
}

.stats_period a.active {
	font-weight: bold;
	color: #333;
	text-decoration: none;
}

.stats_period_dates {
	margin: 0 0 14px 0;
	font-size: 0.9em;
	color: #666;
}

.stats_error_box {
	padding: 12px 14px;
	margin-bottom: 15px;
	border: 1px solid #c99;
	background: #fff4f4;
	color: #800;
}


/* Summary */

.stats_summary {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 18px;
}

.stats_summary_box {
	min-height: 84px;
	padding: 15px;
	border: 1px solid #ccc;
	background: #fff;
	box-sizing: border-box;
}

.stats_summary_label {
	margin-bottom: 3px;
}

.stats_summary_value {
	font-size: 30px;
	line-height: 1.1;
	font-weight: bold;
	color: #174d7d;
}

.stats_summary_time {
	font-size: 24px;
}


/* Dashboard */

.stats_dashboard {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	align-items: stretch;
}

.stats_panel {
	min-width: 0;
	min-height: 0;
	padding: 12px;
	border: 1px solid #ccc;
	background: #fff;
	box-sizing: border-box;
}

.stats_panel .lux_info_heading {
	font-size: 18px;
	margin-bottom: 12px;
}

.stats_dashboard .stats_table {
	font-size: 0.9em;
	table-layout: fixed;
}

.stats_dashboard .stats_table th,
.stats_dashboard .stats_table td {
	padding: 4px 5px;
}

.stats_dashboard .stats_table td:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}


/* Tables */

.table_wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.stats_table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
}

.stats_table th,
.stats_table td {
	padding: 4px 6px;
	border-bottom: 1px solid #ddd;
	text-align: left;
	vertical-align: top;
	line-height: 1.2;

	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.stats_table th {
	font-weight: bold;
}


/*
 * Results table column widths:
 *
 * 1 id
 * 2 viewed_at
 * 3 visitor_key
 * 4 page
 * 5 referrer
 * 6 user_agent
 * 7 log_key
 */

.stats_table th:nth-child(1),
.stats_table td:nth-child(1) {
	width: 3%;
}

.stats_table th:nth-child(2),
.stats_table td:nth-child(2) {
	width: 8%;
}

.stats_table th:nth-child(3),
.stats_table td:nth-child(3) {
	width: 20%;
}

.stats_table th:nth-child(4),
.stats_table td:nth-child(4) {
	width: 13%;
}

.stats_table th:nth-child(5),
.stats_table td:nth-child(5) {
	width: 18%;
}

.stats_table th:nth-child(6),
.stats_table td:nth-child(6) {
	width: 30%;
}

.stats_table th:nth-child(7),
.stats_table td:nth-child(7) {
	width: 8%;
}

.stats_note {
	margin-top: 14px;
	font-size: 0.9em;
}

div.stats_dashboard .stats_table th:nth-child(1),
div.stats_dashboard .stats_table td:nth-child(1) {
	width: auto;
}

div.stats_dashboard .stats_table th:nth-child(2),
div.stats_dashboard .stats_table td:nth-child(2) {
	width: 64px;
}


/* Time / measurement */

.stats_time_box {
	width: 100%;
	margin-top: 16px;
	padding: 18px;
	border: 1px solid #ccc;
	background: #fff;
	box-sizing: border-box;
}

.stats_time_box .lux_info_heading {
	font-size: 20px;
	margin-bottom: 16px;
}

.stats_technical_note {
	font-size: 0.85em;
	color: #777;
}



.stats_controls {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 10px 14px;
	margin-bottom: 14px;
	padding: 12px;
	border: 1px solid #ccc;
	background: #fff;
	box-sizing: border-box;
}

.stats_control label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.9em;
}

.stats_control select {
	min-width: 150px;
	height: 34px;
	padding: 4px 6px;
	box-sizing: border-box;
}

.stats_control_checkbox {
	padding-bottom: 7px;
}

.stats_control_checkbox label {
	margin: 0;
	white-space: nowrap;
}

.stats_controls .stats_button {
	margin-top: 0;
	height: 34px;
	padding: 6px 14px;
}

.stats_control_links {
	margin-left: auto;
	padding-bottom: 7px;
}


textarea#sql_text{
margin-bottom:20px;
}

input#admin_write_password{
margin-left:10px;
}




@media only screen and (max-width: 600px) {

	.stats_controls {
		display: block;
	}

	.stats_control {
		margin-bottom: 10px;
	}

	.stats_control select {
		width: 100%;
	}

	.stats_controls .stats_button {
		width: 100%;
	}

	.stats_control_links {
		margin-left: 0;
	}
}












.stats_topn_form {
	margin: 0;
}

.stats_topn_heading {
	display: flex;
	align-items: center;
	gap: 5px;
}

.stats_topn_heading select {
	width: auto;
	min-width: 0;
	height: 25px;
	padding: 1px 20px 1px 5px;
	font: inherit;
}

/* Responsive */

@media only screen and (max-width: 900px) {

	.stats_summary {
		grid-template-columns: repeat(2, 1fr);
	}

	.stats_dashboard {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.stats_panel {
		min-height: 0;
	}

	.stats_time_box {
		width: 100%;
	}
}


@media only screen and (max-width: 600px) {

	.stats_dashboard {
		grid-template-columns: 1fr;
	}

	#content.stats_content_full {
		padding-left: 8px;
		padding-right: 8px;
	}

	.stats_toolbar {
		display: block;
	}

	.stats_logout {
		margin-top: 12px;
	}

	.stats_summary {
		grid-template-columns: 1fr;
	}

	.stats_period a {
		display: inline-block;
		margin-top: 6px;
	}

	.stats_table {
		font-size: 12px;
	}

	.stats_table th,
	.stats_table td {
		padding: 3px 4px;
	}

	/*
	 * On phones hide columns which are less useful
	 * in the overview.
	 *
	 * visitor_key
	 * referrer
	 * log_key
	 */
	.stats_table th:nth-child(3),
	.stats_table td:nth-child(3),
	.stats_table th:nth-child(5),
	.stats_table td:nth-child(5),
	.stats_table th:nth-child(7),
	.stats_table td:nth-child(7) {
		display: none;
	}

	.stats_table th:nth-child(1),
	.stats_table td:nth-child(1) {
		width: 8%;
	}

	.stats_table th:nth-child(2),
	.stats_table td:nth-child(2) {
		width: 22%;
	}

	.stats_table th:nth-child(4),
	.stats_table td:nth-child(4) {
		width: 35%;
	}

	.stats_table th:nth-child(6),
	.stats_table td:nth-child(6) {
		width: 35%;
	}
}