@import "../variables";
@import "../mixins/text-gradient";

:root {
	--mind-admin-page-offset: 15px;
}

.mind-admin-page {
	background-color: #1d2327;

	#wpbody-content > .notice {
		display: none;
	}
	#wpcontent {
		min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0) - var(--mind-admin-page-offset));
		border-radius: 10px;
		margin-right: var(--mind-admin-page-offset);
		margin-bottom: var(--mind-admin-page-offset);
		background-color: #fff;
	}
	#wpfooter {
		bottom: var(--mind-admin-page-offset);
		right: var(--mind-admin-page-offset);
	}
	ul#adminmenu a.wp-has-current-submenu::after,
	ul#adminmenu > li.current > a.current::after {
		border-right-color: #fff;
	}
}

.mind-admin-root {
	color: #000;
}

.mind-admin-head {
	// position: sticky;
	// top: var(--wp-admin--admin-bar--height, 0);
	padding: 5px 20px;
	margin-left: -20px;
	margin-bottom: 100px;
}

.mind-admin-head-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	// max-width: 1200px;
	margin: 0 auto;
}

.mind-admin-head-logo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-right: auto;

	@include text-gradient(var(--mind-brand-color), var(--mind-brand-color-2));

	h1 {
		margin: 6px 10px;
		font-size: 14px;
		font-weight: 500;
	}

	svg {
		display: block;
		width: 20px;
		height: auto;
		color: var(--mind-brand-color);
	}
}

.mind-admin-content {
	max-width: 1000px;
	margin: 0 auto;

	> h2 {
		margin-bottom: 35px;
		font-size: 1.8em;
		font-weight: 400;
	}
}

.mind-admin-tabs {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	margin-left: 15px;
	list-style: none;

	> li {
		margin: 0;
	}

	a {
		position: relative;
		padding: 10px;
		margin: 0 2px;
		font-size: 1.1em;
		cursor: pointer;
		background: none;
		border: none;
		outline: none;
		text-decoration: none;
		color: inherit;

		&:hover,
		&:focus {
			color: var(--mind-brand-darken-color);
		}

		&.mind-admin-tabs-button-active::after {
			content: "";
			position: absolute;
			right: 4px;
			bottom: 2px;
			left: 4px;
			display: block;
			height: 1.5px;
			background: currentColor;
		}
	}
}

// Page content transition.
.mind-admin-content-transition {
	&-enter {
		opacity: 0;
		transform: translateY(-5px);
	}
	&-enter-active {
		opacity: 1;
		transform: translateY(0);
	}
	&-exit {
		opacity: 1;
		transform: translateY(0);
	}
	&-exit-active {
		opacity: 0;
		transform: translateY(5px);
	}
	&-enter-active,
	&-exit-active {
		transition: opacity 0.2s, transform 0.2s;
	}
}
