@import 'src/Components/GlobalStyles/colors';
@import 'src/Components/GlobalStyles/mixins';

h5,
h4,
h3 {
	//font-size: 30px !important;
	text-transform: capitalize;
}

.dropdownSubMenu {
	position: absolute;
	top: 150px;
	right: 10px;
	padding: 10px 15px;
	background-color: $grey-button;
	color: var(--primary-color);
	border-radius: 10px;
	border: none;
	display: flex;

	p {
		margin-bottom: 0;
		margin-right: 10px;
	}

	&:hover,
	&:focus {
		background-color: lighten($grey-button, 5);
	}
}

.chartsTitle {
	// color: var(--primary-color);
	background-color: $light-grey;
	padding-top: 15px;
	padding-bottom: 15px;
	margin-bottom: 15px;
}

.groupContainer {
	display: block;
	margin-bottom: 20px;
	text-align: center;
	width: 940px;
	page-break-after: always;

	.groupWrapper {
		width: 840px;
		display: grid;
		grid-template-columns: 410px 410px;
		gap: 10px;

		h3,
		.h3 {
			font-size: 1.25rem;
		}

		// > div {
		// 	min-width: 450px;
		// }
	}
}

.container {
	&__main {
		display: flex;
		overflow-x: hidden;
		justify-content: center;
		padding: 10px 0 30px 0;

		&__sub_menu {
			@include SubNav;

			@media (max-width: 1000px) {
				ul {
					margin-left: 10px;
				}

				.item:first-of-type {
					margin-top: 20px;
				}
			}

			.item {
				font-weight: 400;
				font-size: 14px;
				line-height: 17px;
				color: $dark;

				&.active {
					color: var(--primary-color);
					font-weight: 600;
				}
			}

			@media (max-width: 1420px) {
				//margin-left: 50px;
			}
			// dropdown
			@media (max-width: 1000px) {
				margin-left: 0;
				position: absolute;
				top: 200px;
				right: 10px;
				background-color: $grey-button;
				color: black;
				z-index: 11;
				border-radius: 10px;
			}
		}

		&__chart {
			// width: 955px;
			// // margin: 0 auto;
			// display: grid;
			// grid-template-columns: 450px 450px;
			position: relative;
			gap: 20px;
			justify-content: center;

			@media (max-width: 1420px) {
				display: flex;
				flex-wrap: wrap;
				width: 70%;
			}

			&__chart1,
			&__chart4 {
				display: flex;
				align-items: center;
				justify-content: center;
				padding: 35px;
				// box-shadow: 0 3px 13px 0 $dropShadow;
				// @include customBoxShadow;
				position: relative;
				flex-direction: column;

				@media (max-width: 1420px) {
					flex-wrap: wrap;
					width: 470px;
					margin-right: 0;
				}

				&:hover {
					cursor: pointer;
				}

				&__title {
					width: 100%;

					p:first-child,
					p:last-child {
						font-size: 20px;
						white-space: nowrap;
					}

					p:nth-child(2),
					p:nth-child(3) {
						font-size: 30px;
					}

					p:nth-child(2) {
						color: var(--primary-color);
						font-weight: 600;
					}

					p:nth-child(3) {
						color: #4caf50;
						font-weight: 600;
					}
				}
			}

			&__chart1,
			&__chart2,
			&__chart3,
			&__chart4,
			&__chart5 {
				text-align: center;
				border-radius: 10px;

				label {
					display: flex;
					width: 100%;
					font-size: 20px;
					margin-bottom: 20px;
					align-items: center;
					border-top: 1px dashed rgb(0 0 0 / 30%);
					padding-top: 15px;
					text-align: left;

					input[type='checkbox'] {
						width: 50px;
						height: 20px;
					}
				}
			}

			&__chart5 {
				flex-direction: column;
			}

			&__chart2 {
				text-align: center;
				// box-shadow: 0 3px 13px 0 $dropShadow;
				// @include customBoxShadow;
				display: flex;
				flex-direction: column;
				justify-content: center;
				padding: 35px 0px;
				width: 450px;

				@media (max-width: 1400px) {
					width: 470px;
				}

				p {
					font-size: 20px;
					white-space: normal;
				}

				label {
					align-items: start;
				}
			}

			&__chart3 {
				grid-column-start: 1;
				grid-column-end: 3;
				//box-shadow: 0 3px 13px 0 $dropShadow;

				div {
					margin: 10px 0 0;
				}
			}

			&__chart4 {
				padding: 0;
				margin-right: 0;

				div:first-of-type {
					width: 100% !important;

					svg {
						display: inline-block;
						width: 100%;
					}

					h3,
					h4,
					h5 {
						//transform: scale(1.25);
						text-align: center;
						white-space: break-spaces;
					}
				}
			}

			&__chart5 {
				grid-column-start: 1;
				grid-column-end: 3;
				// box-shadow: 0 3px 13px 0 $dropShadow;
				// @include customBoxShadow;
			}

			&__chart6 {
				display: flex;
				flex-direction: column;
				text-align: center;
			}

			&__smallCharts {
				label {
					// padding: 15px 0 50px;
					margin-top: 10px;
					padding: 15px 0 0px;
					text-align: left;
				}
			}

			.netCashFlow {
				// padding: 20px 10px;
				// box-shadow: 0 3px 13px 0 $dropShadow;
				// @include customBoxShadow;
			}
		}
	}
}

.smallChart {
	padding: 20px;
	transform: scale(1) !important;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;

	svg {
		g {
			transform: scale(1);
		}
	}

	&__title {
		margin-top: 20px;
	}

	.footer {
		display: flex;
		flex-direction: column;

		&__element {
			display: grid;
			grid-template-columns: 1fr 1fr;
			justify-content: center;
			column-gap: 50px;
		}
	}
}

.smallChartsTitle {
	padding: 0;
	transform: scale(1) !important;
	width: 100% !important;
}

.popupMenu {
	background-color: white;
	// box-shadow: 0 3px 13px 0 $dropShadow;
	position: fixed;
	top: 50%;
	left: 50%;
	padding: 80px 50px 120px;
	transform: translate(-50%, -50%);
	border-radius: 15px;

	&__manageSubscription {
		&__container {
			transform: scale(0.5);
		}
	}

	h4 {
		margin-bottom: 50px;
		text-align: center;
	}

	a {
		background-color: var(--primary-color);
		border-radius: 15px;
		padding: 20px 40px;
		color: white;
		white-space: nowrap;
	}

	.closeButton {
		position: absolute;
		top: 20px;
		right: 20px;
	}
}

.workingCapital {
	background-color: red;
	color: red;
	fill: red;
}

.buttonsMain {
	position: relative;

	.editButton,
	.cancelButton,
	.reloadButton,
	.exportButton,
	.saveButton {
		position: absolute;
		top: -60px;
		right: 0;
		left: unset;
		//width: 150px;
		width: 50px;

		@include Button;

		padding: 5px 10px;

		@media (max-width: 1000px) {
			top: -60px;
			left: -50px;
		}
	}

	.editButton,
	.reloadButton,
	.exportButton {
		background-color: ghostwhite;
		color: $grey-button;
		right: 60px;

		&:focus,
		&:active {
			color: var(--primary-color);
		}
	}

	.exportButton {
		right: 0;
	}

	.reloadButton {
		right: 120px;
	}

	.saveButton {
		right: 20px;
		color: var(--primary-color);
		text-decoration: none;
	}

	.cancelButton {
		right: 100px;
		text-decoration: none;
		color: $grey-button;

		&:hover {
			color: var(--primary-color);
		}
	}

	.closedButton {
		transition: all 0.3s ease-in-out;
		transform: rotateZ(90deg);
	}

	.openButton {
		transition: all 0.3s ease-in-out;
		padding-right: 1px;
		transform: rotateZ(-90deg);
	}
}

.landingPage {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;

	p {
		margin: 40px 0 20px;
	}

	// a {
	// 	border: 1px solid var(--primary-color);
	// 	text-decoration: none;
	// 	color: var(--primary-color);
	// 	padding: 10px 15px;
	// 	border-radius: 10px;
	// 	transition: all 0.2s ease-in-out;

	// 	&:hover {
	// 		color: var(--primary-color);
	// 		transform: scale(1.03);
	// 	}
	// }

	.addFinancialsButton {
		padding: 15px 70px;
		border-radius: 10px;
		border: none;
		background-color: var(--primary-color);
		font-size: 16px;
		cursor: pointer;
		transition: all 0.3s ease-in-out;

		a {
			text-decoration: none;
			color: white;
		}

		&:hover {
			transform: translateY(-5px);
		}

		&:active {
			transform: translateY(0);
		}
	}
}

.pageBreak {
	page-break-before: always; /* or use page-break-after, depending on needs */
}

.pageBreakAfter {
	display: flex;
	page-break-after: always;
}

#chartsWrapper .pageBreakAfter,
#chartsWrapper [class^='pageBreakAfter'],
#chartsWrapper [class^='Dashboard_pageBreakAfter'] {
	display: block;
	page-break-after: always;
}

#chartsWrapper .__main__chart,
#chartsWrapper [class^='Dashboard_container__main__chart'] {
	width: 100%;
	border: 0;
	border-image-width: 0;
	box-shadow: none;
}

.noBreak {
	@media print {
		page-break-inside: avoid; /* Prevents a page break inside this element */
	}
}

.pdfMarginTop {
	margin-top: 10px;
}
