/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

ag-grid-angular {
	width: 100%;
	margin: auto;
	min-height: 350px;
	height: 80vh;
}

.extra-actions {
	width: 100%;
	display: flex;
	margin: auto;

	& > :first-child {
		margin-left: auto;
		border-radius: 5px 0 0 0;
	}

	& > :last-child {
		border-radius: 0 5px 0 0;
	}

	& > button, & > div {

		&:not(:first-child) {
			border-left-width: 1px;
		}

		&:not(:last-child) {
			border-right-width: 0;
		}
	}
}

.column-menu {
	max-height: 40vh;
}

.toggle-columns {
	position: relative;

	menu {
		min-width: 200px;
		margin-left: auto;
		position: absolute;
		top: 0;
		right: 0;
		margin-top: 2em;
		z-index: 999;
		background-color: white;
		border-width: 1px;
		border-radius: 0 0 3px 3px;
		border-style: none solid solid;
		box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
		border-color: #dadee0;
		padding: 0;

		li {
			list-style: none;
			padding: 2px 8px;

			label, input {
				cursor: pointer;
			}

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

			input {
				margin-right: 2em;
			}

			&:hover {
				background-color: rgb(245, 245, 245);
			}
		}
	}

	button {
		.caret {
			display: inline-block;
			transition: 0.5s;

			&.rotate {
				transform: rotate(-180deg);
			}
		}
	}
}

/* Table context menus */
menu[type="contextmenu"] {
	display: block;
	position: fixed;
	background-color: white;
	padding: 0;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
	border-radius: 3px;

	&[hidden] {
		visibility: hidden;
	}

	ul {
		display: block;
		clear: both;
		font-weight: normal;
		line-height: 1.428571429;
		white-space: nowrap;
		padding: 0;
		margin: 0;

		li {
			display: block;
			clear: both;

			&:hover {
				color: #262626;
				background-color: #f5f5f5;
			}

			a, button {
				color: #333333;
				text-decoration: none;
				padding: 7px 20px;
				display: block;
				clear: both;
			}

			button {
				background: transparent;
				border: none;
				width: 100%;
				text-align: left;
				text-transform: none;
				line-height: 1.428571429;
				font-family: Roboto, "Helvetica Neue", sans-serif;
				font-size: medium;

				&[disabled] {
					color: gray;
					background-color: #f5f5f5;
				}
			}
		}

		hr.divider {
			margin: 0;
		}
	}
}
