@import '../../styles/website-colors.styles.scss';
@import '../../styles/styles.scss';
@import '../../styles/cls-mat-components-overrides//cls-mat-slide-toggle-overrides.scss';
@import '../../styles/cls-mat-components-overrides/cls-scroll-bar-overrides.scss';
@import '../../styles/cls-mat-components-overrides/cls-mat-chip-overrides.scss';
@import '../../styles/cls-mat-components-overrides/cls-mat-checkbox-overrides.scss';
@import '../../styles/cls-mat-components-overrides/cls-mat-expansion-panel-overrides.scss';

:host {
	display: flex;
	flex-direction: column;
	font-family: haboro-soft, sans-serif !important;

	[dir='rtl'] {
		::ng-deep {
			.include-results-checkbox {
				::ng-deep {
					.mat-checkbox-label {
						display: flex;
						align-items: center;
					}
				}
			}

			.tag-list {
				direction: rtl;
				::ng-deep {
					.mat-checkbox-inner-container {
						margin: 0 0 0 4px !important;
					}
				}
			}

			.tag-list-container {
				direction: ltr;
			}
		}
	}

	::ng-deep {
		input,
		button,
		span {
			font-family: haboro-soft, sans-serif !important;
		}

		.disabled-section {
			opacity: 0.5;
			pointer-events: none;
		}

		.mat-expansion-panel {
			gap: 8px !important;
		}

		/* Hide default toggle icon */
		.mat-expansion-panel-header .mat-expansion-indicator::after {
			border: none;
			content: '';
		}

		.mat-expansion-indicator {
			display: none !important;
		}

		mat-panel-description {
			margin-inline-end: 0px !important;
			justify-content: end;
		}

		.mat-expansion-panel-header[aria-expanded='true'] .expand-icon {
			transform: rotate(180deg);
		}

		.mat-expansion-panel-header {
			padding-inline-end: 0px !important;
		}
	}

	mat-accordion {
		width: 100%;
		display: flex;

		&.disabled {
			opacity: 0.5;
			pointer-events: none;
		}
	}
}

.expand-icon {
	width: 18px;
	height: 18px;
	font-size: 18px;
	color: $color-black;
	transition: transform 0.2s ease-in-out;
	transition: 0.4s ease-in-out;
}

.header-container {
	width: 100%;
	.title-container {
		width: 100%;
		span {
			color: $color-black;
			font-weight: 700;
			font-size: 20px;
		}

		.clear-button {
			cursor: pointer;
			border: 0px;
			outline: none;
			background-color: $color-white;
			color: $color-primary;
			mat-icon {
				font-size: 24px;
				width: 24px;
				height: 24px;
			}
			span {
				white-space: nowrap;
				color: $color-primary;
				font-size: 14px;
				font-weight: 500;
			}
			&:focus-visible {
				outline: 2px solid black;
			}
		}
	}
	.result-container {
		line-height: normal !important;
		display: flex;
		flex-direction: column;
		gap: 4px;

		.total-results {
			color: $color-black;
			font-size: 16px;
			font-weight: 700;

			&.mobile {
				font-weight: 500;
				font-family: haboro-soft, sans-serif !important;
			}
		}
		.total-excuded {
			cursor: pointer;
			font-weight: 400;
			font-size: 14px;
			color: $color-primary;
		}
		.total-filtered {
			font-weight: 400;
			font-size: 14px;
			color: $color-dark-blue;
		}
		.separate-circle-icon {
			height: 4px;
			width: 4px;
			font-size: 4px;
			color: $color-medium-dark;
			opacity: 0.4;
		}
		.hide-separate-circle-icon {
			visibility: hidden;
		}
	}
}

.mobile-body-top-container {
	max-height: 370px;
	overflow-y: auto;
	padding: 16px 0px 0px 10px !important;
	display: flex;
	flex-direction: column !important;
	gap: 16px;

	.mobile-body-container {
		overflow-y: auto;
		overflow-x: hidden;
		padding-inline-end: 16px;
	}
}

.body-container {
	width: 100%;
	height: 100%;
	.body-title {
		font-size: 16px;
		font-weight: 700;
		color: $color-black;
	}

	.left-side-container {
		width: 33%;
		max-width: 33%;
		flex: 1;
		mat-divider {
			width: 100%;
		}

		.sources-type-top-container {
			width: 100%;
			.sources-type-container {
				width: 100%;
			}
		}

		.section-container {
			width: 100%;
			.meta-filter-container {
				width: 100%;
			}
		}
	}

	.right-side-conatier {
		width: 33%;
		max-width: 33%;
		flex: 1;
		mat-divider {
			width: 100%;
		}

		.match-type-container {
			width: 100%;
			.match-type-filter-container {
				width: 100%;
			}
		}

		.general-filters-container {
			width: 100%;
			.general-filter-container {
				width: 100%;
			}
		}

		.included-tags-container {
			width: 100%;
			.included-tags-filter-result {
				width: 100%;
			}
		}
	}

	.vertical-divider {
		opacity: 0.6;
	}
}

.apply-and-discard-button-contaier {
	display: flex;
	justify-content: flex-end;
	gap: 16px;
	padding: 0px !important;
	padding-inline-end: 10px !important;
	margin: 0px !important;
	min-height: auto !important;
	button {
		cursor: pointer;
		border-radius: 24px 0px 16px 24px;
	}
	.discard-changes-button {
		font-size: 16px !important;
		font-weight: 500;
		font-family: haboro-soft, sans-serif !important;
	}
	.apply-filters-button {
		font-size: 18px !important;
		font-weight: 700 !important;
	}
}

.dialog-error-message {
	color: $color-error;
	font-size: 12px;
	font-style: normal;
	font-weight: 500;
	line-height: normal;
}

.body-title-container {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
}

.mat-dialog-content {
	margin: 0px !important;
	padding: 32px 0px !important;
	padding-inline-end: 10px !important;
}

.mat-dialog-title {
	margin: 0px !important;
	padding: 0px !important;
	padding-inline-end: 10px !important;
}

.mat-dialog-content.mobile-body-top-container {
	padding: 16px 10px 0px 0px !important;
}

.total-stat {
	font-family: haboro-soft, sans-serif !important;
	color: $color-black;
	font-size: 12px;
	font-weight: 700 !important;
}

.included-tags-container {
	display: flex;
	flex-direction: row;
	gap: 8px;
	align-items: center;
	justify-content: flex-start;
}

cr-excluded-results-dailog {
	padding-inline-end: 10px !important;
}
.left-side-container {
	width: 33%;
	max-width: 33%;
}

.right-side-conatier.mobile {
	width: 100% !important;
	max-width: 100% !important;
}

.left-side-container.mobile {
	width: 100% !important;
	max-width: 100% !important;
}
.chips-stats-container {
	display: flex;
	flex-direction: row;
	gap: 4px;
	align-items: center;
	justify-content: flex-start;
	mat-chip {
		font-size: 14px !important;
		font-style: normal !important;
		font-weight: 500 !important;
		line-height: normal !important;
		font-family: haboro-soft, sans-serif !important;
	}

	.total-excluded {
		cursor: pointer !important;
	}
}
.mobile-option-title {
	color: $color-black;
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: normal;
	text-transform: capitalize;
	display: flex;
	flex-direction: row;
	gap: 8px;
	align-items: center;
	justify-content: flex-start;
}
