@import './color';
@import './mixins';
@import './dimension';

.ag-theme-alpine .ag-details-row {
	border: 0;
	padding: 0;
	.ag-root-wrapper {
		border: 0;
	}
}

.ag-theme-alpine .ag-header-cell-label .ag-header-cell-text {
	color: $aeap-color-navy;
	font-family: NunitoFont;
	font-size: 1.6rem;
	font-style: normal;
	font-weight: 600;
	height: auto;
	overflow: visible;
	overflow-wrap: normal;
	text-overflow: clip;
	white-space: normal;
	width: 80%;
}

.planning-workbook-grid .ag-header-cell-label .ag-header-cell-text {
	text-align: center;
}

.ag-theme-alpine .ag-header {
	background-color: $aeap-color-white;
	border-bottom: 0.1rem solid $aeap-border-light;
}

.ag-header-cell-label {
	justify-content: center;
	text-align: center;
}

.ag-right-align {
	text-align: right;
}

.ag-left-align {
	text-align: left;
}

.ag-center-align {
	text-align: center;
}

.ag-icon-menu {
	&::before {
		position: absolute;
		right: 10%;
		top: 33%;
	}
}

.ag-header-cell {
	border-right: 0.1rem solid $aeap-border-light;
	&.details,
	&.compare-class-tertiary {
		background: $aeap-color-beige;
	}

	&.compare-class-primary {
		background: $aeap-color-skyblue;
	}

	&.compare-class-secondary {
		background: $aeap-color-light-orange;
	}
}

.ag-theme-alpine .ag-pinned-left-header,
.ag-theme-alpine .ag-ltr .ag-cell {
	&.details,
	&.compare-class-tertiary {
		background: $aeap-color-beige;
	}

	&.compare-class-primary {
		background: $aeap-color-skyblue;
	}

	&.compare-class-secondary {
		background: $aeap-color-light-orange;
	}
}

// .ag-theme-alpine .ag-cell.ag-cell-last-left-pinned {
// 	&:not(.ag-cell-range-right) {
// 		&:not(.ag-cell-range-single-cell) {
// 			border-image: linear-gradient(to right, $aeap-pinned-border-grey 95%, $aeap-pinned-border-white 100%);
// 			border-image-slice: 9;
// 			border-style: solid;
// 			border-width: 0 0.8rem 0 0;
// 		}
// 	}
// }

.ag-theme-alpine .ag-cell {
	font-family: 'NunitoFont', Fallback, sans-serif;
	font-size: 1.6rem;
	font-style: normal;
	font-weight: normal;
	padding-left: 1.2rem;
	padding-right: 1.2rem;
}

.promotion-grid .ag-cell {
	font-family: 'NotosansFont';
	line-height: 4rem;
}

.ag-grid-icon-group {
	.icon-danger {
		color: $aeap-color-danger-icon;
	}

	.icon-grey {
		color: $aeap-toolbar-icon-active-color;
	}
}

.promotion-grid .ag-header-group-cell {
	border-right: 0.1rem solid $aeap-border-light;
}

.ag-theme-alpine .ag-row-odd {
	background-color: $aeap-color-white;
}

.promotion-grid .ag-row-level-1 {
	background-color: $aeap-color-light-grey-white;
}

.ag-week-header {
	background: $aeap-title-primary-border;
	border-right: 0.1rem solid $aeap-border;
	color: $aeap-title-primary;
	font-family: 'NunitoFont', Fallback, sans-serif;
	font-size: 1.6rem;
	font-weight: 600;
}

.ag-days-header {
	color: $aeap-title-primary;
	font-family: 'NunitoFont', Fallback, sans-serif;
	font-size: 1.6rem;
	font-style: italic;
	font-weight: 600;
}

.ag-days-header-title {
	color: $aeap-title-primary;
	font-family: 'NunitoFont', Fallback, sans-serif;
	font-size: 1.6rem;
	font-style: normal;
	font-weight: 600;
}

.ag-subMenu-title {
	color: $aeap-title-primary;
	font-family: 'NunitoFont', Fallback, sans-serif;
	font-size: 1.6rem;
	font-weight: 600;
}

.ag-custom-icon {
	bottom: 1rem;
	color: $aeap-toolbar-icon-active-color;
	cursor: pointer;
	font-size: 2.4rem;
	left: 90%;
	position: absolute;
}

.ag-right-arrow-pin {
	position: absolute;
	right: 2.4rem;
}

.ag-disable {
	align-items: center;
	background: linear-gradient(
			to top left,
			$aeap-grid-locked-state-no-opacity 0%,
			$aeap-grid-locked-state-no-opacity calc(50% - 0.8px),
			$aeap-grid-locked-state-opacity 50%,
			$aeap-grid-locked-state-no-opacity calc(50% + 0.8px),
			$aeap-grid-locked-state-no-opacity 100%
		),
		linear-gradient(
			to top right,
			$aeap-grid-locked-state-no-opacity 0%,
			$aeap-grid-locked-state-no-opacity calc(50% - 0.8px),
			$aeap-grid-locked-state-opacity 50%,
			$aeap-grid-locked-state-no-opacity calc(50% + 0.8px),
			$aeap-grid-locked-state-no-opacity 100%
		);
	border: 0.1rem solid $aeap-color-light-grey-2;
	display: flex;
	font-family: 'NunitoFont', Fallback, sans-serif;
	font-size: 1.6rem;
	justify-content: center;
}

.ag-enabled {
	align-items: center;
	display: flex;
	font-family: 'NunitoFont', Fallback, sans-serif;
	font-size: 1.6rem;
	justify-content: center;
}

.ag-ordering-cell-grey {
	background: $aeap-grid-active-grey;
	text-align: right;
}

.ag-ordering-cell-white {
	background: $aeap-color-white;
}

.ag-late {
	background: $aeap-color-amber-light;
}

.ag-archive {
	background: $aeap-color-white;
}

.ag-normal {
	background: $aeap-color-success-light;
}

.ag-toggle-icon {
	color: $aeap-toolbar-icon-active-color;
	left: 80%;
	position: absolute;
	top: 25%;
}

.ag-icon-week {
	color: $aeap-toolbar-icon-active-color;
}

.ag-header-bottom-dark-border {
	border-bottom: 0.1rem solid $aeap-color-dark-grey;
}

.ag-header-right-dark-border {
	border-right: 0.1rem solid $aeap-color-dark-grey;
}

.ag-current-date {
	border-bottom: 0.3rem solid $aeap-color-blue;
}

.ag-bg-new-red {
	background: $aeap-cp-danger;
}

.ag-bordered-bottom-thick {
	border-bottom: 0.3rem solid $aeap-cp-border-bottom-headers;
}

.header-font-weight .ag-header-cell-label .ag-header-cell-text {
	font-weight: bold;
}

.ag-theme-alpine {
	.ag-menu {
		background: $aeap-color-white;
		border-color: $aeap-color-grey-1;
		box-shadow: 0.1rem 0.4rem 0.4rem $aeap-cp-black-very-thin;
	}
}

.ag-bg-new-green {
	background: $aeap-cp-success;
}

.ag-current-order-date {
	border-bottom: 0.3rem solid $aeap-color-success;
}

.ag-promo-icon {
	color: $aeap-color-amber;
	cursor: pointer;
	left: 0.5rem;
	position: absolute;
	top: 0.2rem;
}

.ag-comments-icon {
	color: $aeap-color-blue;
	cursor: pointer;
	position: absolute;
	right: 0.5rem;
	top: 0.2rem;
}

.ag-icon-right-placement {
	position: absolute;
	right: 1.6rem;
	top: 35%;
}

.ag-dropdown-type-icon {
	color: $aeap-toolbar-icon-active-color;
	cursor: pointer;
	position: absolute;
	right: 0.8rem;
	top: 32%;
}

.ag-rounding-icon {
	bottom: 0.5rem;
	color: $aeap-color-danger-icon;
	cursor: pointer;
	left: 0.3rem;
	position: absolute;
}

.ag-rounding-total-icon {
	background: $aeap-color-danger-icon;
	cursor: pointer;
	height: 4.8rem;
	left: 0;
	position: absolute;
	width: 0.7rem;
}

.ag-custom-tooltip {
	background: $aeap-color-very-dark-grey;
	color: $aeap-color-white;
	width: 18.8rem;
}

.ag-custom-tray-tooltip {
	background: $aeap-color-danger-icon;
	color: $aeap-color-white;
	width: 18.8rem;
}

.ag-row-disabled {
	opacity: 0.5;
	pointer-events: none;
}

::ng-deep ag-grid-angular {
	.ag-root-wrapper {
		.ag-header-cell.load-scenario-table-title.font-weight-semibold {
			.ag-header-cell-text {
				font-weight: bold;
			}
		}
	}
}

.ag-theme-alpine .ag-header-cell-resize {
	&::after {
		background-color: transparent;
	}
}

.ag-theme-alpine .ag-rich-select-value {
	display: none;
}

.ag-theme-alpine .ag-rich-select-row {
	color: $aeap-color-dark-grey;
	font-family: 'NotosansFont', Fallback, sans-serif;
}

.ag-theme-alpine .ag-rich-select {
	background-color: $aeap-color-white;
}

.ag-theme-alpine .ag-rich-select-row-selected {
	background-color: transparent;
	color: $aeap-color-navy;
	font-weight: 600;
}

.ag-custom-no-rows {
	color: $aeap-color-black;
	font-style: italic;
	margin-top: 9rem;
	padding: 1rem;
}

.ag-theme-alpine .ag-row-selected {
	background-color: $aeap-color-row-highlight;
}

.promotion-grid .ag-row-selected {
	background-color: transparent;
}

.promotion-grid .ag-header-cell-label .ag-header-cell-text {
	font-size: 1.4rem;
}

.ag-theme-alpine .ag-ltr .ag-cell {
	border-right: 0.1rem solid $aeap-color-light-greyish-white;
}

.ag-theme-alpine .ag-ltr .ag-header-select-all {
	margin-left: -0.4rem;
}

.ag-popup-editor {
	width: 13rem;
}

// .ag-theme-alpine .ag-pinned-left-header {
// 	border-image: linear-gradient(to right, $aeap-pinned-border-grey 99%, $aeap-pinned-border-white 100%);
// 	border-image-slice: 9;
// 	border-style: solid;
// 	border-width: 0 0.8rem 0 0;
// }

.ag-theme-alpine .ag-horizontal-left-spacer {
	&:not(.ag-scroller-corner) {
		border-right: 0;
	}
}

.grid-currentTime-highlight {
	border-bottom: thick solid $aeap-color-voilet;
}

.promotion-grid .ag-row-group-expanded .ag-cell {
	font-weight: 700;
}

.promotion-grid .ag-header-row {
	font-family: 'NotosansFont';
	font-weight: normal;
}
.ag-header-cell.ag-focus-managed.ag-header-cell-sortable.custom-spacing-up::after {
  content: "";
  width: 14px;
  height: 14px;
  background-position: center;
  background-size: 14px;
  background-image: url('/assets/icon/up.png');
  position: absolute;
  right: 2px;
  top:6px;
}
.ag-header-cell.ag-focus-managed.ag-header-cell-sortable.custom-spacing-down::after {
  content: "";
  width: 14px;
  height: 14px;
  background-position: center;
  background-size: 14px;
  background-image: url('/assets/icon/down.png');
  position: absolute;
  right: 2px;
  top:6px;
}
