/* Общие стили для страницы статистики */
.ai-content-wizard-statistics-page {
	background: linear-gradient(135deg, #6ddb90 0%, #35a79c 100%) !important;
	color: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	max-width: 100%;
	margin-top: 20px;
	font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Стили для формы фильтрации */
.ai-cw-statistics-filter-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 15px;
	background: #f7f7f7;
	color: #333;
	padding: 15px;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	margin-bottom: 20px;
}

.ai-cw-statistics-filter-form label {
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
}

.ai-cw-statistics-filter-form select,
.ai-cw-statistics-filter-form input[type="date"],
.ai-cw-statistics-filter-form input[type="submit"] {
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background: #fff;
}

/* Стили для контейнера дат произвольного периода */
#custom_period_fields {
	/* По умолчанию скрыто через inline-стиль (display:none) */
	border: 1px dotted #ccc;
	border-radius: 4px;
	padding: 8px;
}

/* Когда активен кастомный период, принудительно показываем блок как flex */
#custom_period_fields.custom-active {
	display: flex !important;
	align-items: center;
	gap: 10px;
}

/* Обёртка для дат, чтобы они располагались в один ряд */
.custom-dates-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}

.custom-dates-wrapper label {
	margin: 0;
	font-weight: 600;
}

/* Стили для кнопки - выравнивание по правому краю */
.ai-cw-statistics-filter-form input[type="submit"] {
	background: #35a79c;
	color: #fff;
	border: none;
	cursor: pointer;
	margin-left: auto;
}

/* Эффекты при фокусе */
.ai-cw-statistics-filter-form select:focus,
.ai-cw-statistics-filter-form input[type="date"]:focus,
.ai-cw-statistics-filter-form input[type="submit"]:focus {
	border-color: #35a79c;
	box-shadow: 0 0 3px rgba(53, 167, 156, 0.5);
}

/* Ховер для кнопки */
.ai-cw-statistics-filter-form input[type="submit"]:hover {
	background: #2e8a85;
}

/* Убираем стандартное оформление календаря для Webkit (если нужно) */
.ai-cw-statistics-filter-form input[type="date"]::-webkit-calendar-picker-indicator {
	filter: invert(50%);
	cursor: pointer;
}

/* Стили для таблицы статистики */
.ai-content-wizard-statistics-page .ai-cw-statistics-table {
	background-color: #fff !important;
	color: #333 !important;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: auto !important;
	width: 100%;
}

.ai-content-wizard-statistics-page .ai-cw-statistics-table th,
.ai-content-wizard-statistics-page .ai-cw-statistics-table td {
	padding: 8px;
	border-bottom: 1px solid #ddd;
}

/* Стили для шапки таблицы */
.ai-cw-statistics-table thead {
	background: linear-gradient(135deg, #6d9edb 0%, #35a79c 100%);
	color: #fff;
	text-align: left;
	font-weight: bold;
	font-size: 1.1em;
}

.ai-content-wizard-statistics-page .ai-cw-statistics-table th {
	font-size: 18px;
	font-weight: 700;
}

/* Стиль для строки с дневным итогом */
.ai-content-wizard-statistics-page .ai-cw-statistics-table .daily-total {
	background-color: #bde0c0;
	font-weight: bold;
}

/* Стиль для строки с общим итогом */
.ai-content-wizard-statistics-page .ai-cw-statistics-table .grand-total {
	background: linear-gradient(135deg, #e1b31b 0%, #c1d72e 100%);
	color: #fff;
	font-weight: bold;
	font-size: 1.1em;
}
.ai-content-wizard-statistics-page .ai-cw-statistics-table .grand-total td {
	font-size: 16px;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
	.ai-content-wizard-statistics-page {
		padding: 10px;
	}
	.ai-cw-statistics-filter-form {
		flex-direction: column;
		align-items: stretch;
	}
	.ai-cw-statistics-filter-form label,
	.ai-cw-statistics-filter-form select,
	.ai-cw-statistics-filter-form input[type="date"],
	.ai-cw-statistics-filter-form input[type="submit"] {
		width: 100%;
		margin-left: 0;
	}
	/* Контейнер для дат в столбик на мобильных устройствах */
	#custom_period_fields.custom-active {
		flex-direction: column;
		align-items: stretch;
	}
}
