@import '../../../styles/styles.scss';
@import '../../../styles/website-colors.styles.scss';
@import '../../../styles/cls-mat-components-overrides/cls-mat-expansion-panel-overrides.scss';
@import '../../../styles/cls-mat-components-overrides/cls-mat-chip-overrides.scss';

:host {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 8px;
	flex-grow: 25;

	.container-title {
		display: flex;
		flex-direction: row;
		gap: 8px;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-start;

		mat-icon {
			$icon-size: 24px;
			font-size: $icon-size;
			width: $icon-size;
			height: $icon-size;
			color: $color-error;
		}

		.title {
			color: $color-black;
			font-size: 16px;
			font-style: normal;
			font-weight: 700;
			line-height: normal;
		}
	}

	.description {
		color: $color-black;
		text-align: center;
		font-size: 14px;
		font-style: normal;
		font-weight: 700;
		line-height: normal;
		white-space: nowrap;
	}
	.hide-alerts-icon {
		$icon-size: 18px;
		font-size: $icon-size;
		width: $icon-size;
		height: $icon-size;
		color: $color-black;
		cursor: pointer;
		transition: transform 0.2s ease-in-out;
	}

	.hide-alerts-icon:hover {
		color: $color-primary;
	}

	::ng-deep {
		mat-expansion-panel {
			gap: 10px !important;
		}
		.mat-expansion-panel-content {
			display: flex;
			max-height: 100%;
			@media screen and (min-width: 960px) {
				max-height: 100%;
			}
		}

		/* 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;
			gap: 16px !important;
			align-items: center !important;
			flex-wrap: wrap !important;
		}

		.chip-button {
			border: none !important;
			background: transparent !important;
			padding: 0px !important;
			margin: 0px !important;
		}

		.info-icon {
			color: rgba(11, 22, 62, 0.6);
			$icon-size: 14px;
			font-size: $icon-size;
			width: $icon-size;
			height: $icon-size;
			cursor: pointer;
		}

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

		.mat-expansion-panel-header {
			border-radius: 0px;
			padding: 8px !important;
			background-color: $color-container-background !important;
		}

		.mat-expansion-panel .mat-expansion-panel-header.cdk-keyboard-focused {
			border: 2px solid black !important;
			outline: unset !important;
		}

		.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover:not([aria-disabled='true']) {
			background: $color-container-background !important;
		}
	}

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

	mat-accordion:hover {
		::ng-deep .mat-expansion-panel-header {
			background-color: $color-container-background !important;
		}
	}

	::ng-deep .mobile-results-panel-header {
		padding: 8px !important;
	}

	.categories-container {
		display: flex;
		flex-direction: row;
		gap: 10px;
		flex-wrap: wrap;

		mat-chip {
			width: fit-content !important;
			border-radius: 16px !important;
			text-transform: capitalize;
			cursor: pointer;
			border: 1px solid $grayed-out-disabled !important;
			background: $color-main-gray !important;
			box-shadow: 0px 0px 2px 0px rgba(11, 22, 62, 0.08), 0px 0px 10px 0px rgba(11, 22, 62, 0.04) !important;
			color: $color-dark-blue !important;
			font-size: 12px !important;
			font-style: normal !important;
			font-weight: 500 !important;
			line-height: normal !important;
			padding: 3px 8px !important;
		}
	}

	.title-percentage-container {
		display: flex;
		flex-direction: row;
		gap: 16px;
		align-items: center;

		&.is-upgrade-title {
			gap: 8px;
		}

		.percentage {
			font-weight: 700;
		}
	}

	.matches-category-title-container {
		display: flex;
		flex-direction: column;
		gap: 2px;
		.stats-container {
			display: flex;
			flex-direction: row;
			gap: 8px;
			align-items: center;
			flex-wrap: wrap !important;
			span {
				font-size: 14px;
				font-style: normal;
				font-weight: 500;
				line-height: normal;
				color: $color-black-opacity-60;
			}
			mat-icon {
				width: 16px;
				height: 16px;
				font-size: 16px;
				color: $grayed-out-disabled;
			}
		}
	}

	.new-chip {
		border-radius: 16px !important;
		background: rgba(63, 154, 245, 0.2) !important;
		display: flex !important;
		padding: 2px 8px !important;
		align-items: center !important;
		gap: 10px !important;
		color: $color-primary !important;
		font-size: 12px !important;
		font-style: normal !important;
		font-weight: 700 !important;
		line-height: normal !important;
	}
}
