/**
 * Greyd Plugin Dashboard Styles
 * 
 * This style is loaded on admin screens only.
 *
 * @package Greyd
 */

:root {
	--wp-admin-color-dark: #2D3337;
	--wp-admin-color-medium-darker: #6d6d6d;
	--wp-admin-color-medium: #767676;
	--wp-admin-color-light: #dddddd;
	--wp-admin-color-offwhite: #f0f0f1;

	--wp-admin-color-white: #fff;
	--wp-admin-color-lightgrey: #e2e5e6;
	--wp-admin-color-grey: #d7d7d7;

	--wp-admin-color-blue: #3858E9;
	--wp-admin-color-blue-dark: #1c2c74;

	--wp-admin-color-green: #32853d;
	--wp-admin-color-red: #b11500;
	--wp-admin-color-lightred: #efd0cc;

	--greyd--spacing--10: clamp(0.5rem, 1vw, 1rem);
	--greyd--spacing--20: clamp(0.66rem, 1.5vw, 1.33rem);
	--greyd--spacing--30: clamp(1rem, 2vw, 1.66rem);
	--greyd--spacing--40: clamp(1.33rem, 2.5vw, 2rem);
	--greyd--spacing--50: clamp(1.66rem, 3vw, 2.5rem);
}

/**
 * Reset some WP Admin styles
 */
@media screen and (max-width: 600px) {
	.toplevel_page_greyd_dashboard #wpbody {
		padding-top: 0;
	}
}

.toplevel_page_greyd_dashboard #wpcontent {
	padding-left: 0;
}

.toplevel_page_greyd_dashboard #wpbody .wrap {
	margin: 0;
}

.toplevel_page_greyd_dashboard #wpbody #wpbody-content > .notice {
	margin: 1em;
}

.toplevel_page_greyd_dashboard #wpbody .wrap a:hover,
.toplevel_page_greyd_dashboard #wpbody .wrap a:focus,
.toplevel_page_greyd_dashboard #wpbody .wrap a:active {
	color: var(--wp-admin-color-blue-dark);
	text-decoration: none;
}

.toplevel_page_greyd_dashboard #wpbody .wrap h3 {
	font-size: 1.2em;
}

.greyd_dashboard a {
	color: var(--wp-admin-color-blue);
}

/**
 * Buttons
 */
.greyd_admin_button {
	background: var(--wp-admin-color-offwhite);
	border: 1px solid var(--wp-admin-color-offwhite) !important;
	color: var(--wp-admin-color-dark) !important;
	border-radius: 2px;
	box-sizing: border-box;
	display: block;
	font-weight: bold;
	padding: 0.75rem 2rem;
	text-decoration: none !important;
	white-space: nowrap;
	width: 100%;
}

.greyd_admin_button:hover,
.greyd_admin_button:focus,
.greyd_admin_button:active {
	background: var(--wp-admin-color-blue);
	border: 1px solid var(--wp-admin-color-blue) !important;
	color: var(--wp-admin-color-white) !important;
	text-decoration: none;
	cursor: pointer;
}

.greyd_admin_link {
	background: var(--wp-admin-color-offwhite);
	border: 1px solid var(--wp-admin-color-offwhite) !important;
	color: var(--wp-admin-color-dark) !important;
	border-radius: 2px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 2rem;
	text-decoration: none !important;
	white-space: nowrap;
}

.greyd_admin_link:hover,
.greyd_admin_link:focus,
.greyd_admin_link:active {
	background: var(--wp-admin-color-blue);
	border: 1px solid var(--wp-admin-color-blue) !important;
	color: var(--wp-admin-color-white) !important;
	text-decoration: none;
}

.greyd_admin_link--outline {
	background: transparent;
	border: 1px solid var(--wp-admin-color-dark) !important;
	border-radius: 2px;
	color: var(--wp-admin-color-dark) !important;
	display: flex;
	padding: 0.75rem 2rem;
	text-decoration: none;
	white-space: nowrap;
}

.greyd_admin_link--outline:hover,
.greyd_admin_link--outline:focus,
.greyd_admin_link--outline:active {
	color: var(--wp-admin-color-dark);
	opacity: 1;
}

.greyd_admin_link--outline.disabled {
	opacity: 0.6;
	pointer-events: none;
}

.greyd_admin_link--outline:hover span.text,
.greyd_admin_link--outline:focus span.text,
.greyd_admin_link--outline:active span.text {
	text-decoration: underline;
}

.greyd_admin_button--dark {
	background: var(--wp-admin-color-dark);
	border: 1px solid var(--wp-admin-color-dark) !important;
	color: var(--wp-admin-color-white) !important;
}

.greyd_admin_button--disabled {
	pointer-events: none;
}

.greyd_admin_button--disabled:hover,
.greyd_admin_button--disabled:focus,
.greyd_admin_button--disabled:active {
	background: var(--wp-admin-color-offwhite);
	border: 1px solid var(--wp-admin-color-offwhite) !important;
	color: var(--wp-admin-color-dark) !important;
	text-decoration: none;
	pointer-events: none;
}

/**
 * Custom Button adjustments
 */
.greyd_dashboard--header--content-button a.disabled,
.greyd_dashboard--header--content-button a.installed,
.greyd_dashboard--main--active-features--top-right .greyd_admin_button--outline.disabled,
.greyd_dashboard--main--active-features--top-right .greyd_admin_button--outline.installed {
	color: var(--wp-admin-color-white) !important;
}

.greyd_dashboard--header--content-button a.disabled,
.greyd_dashboard--main--active-features--top-right .greyd_admin_button--outline.disabled {
	opacity: 0.75;
}

/**
 * Plugin Install Warning
 */
.plugin_install_warning {
	/* display: none; */
	background-color: var(--wp-admin-color-lightred);
	border: 1px solid var(--wp-admin-color-red);
	display: none;
	padding: var(--greyd--spacing--10);
}

/**
 * System Status Button
 */
.system_status_button {
	margin-bottom: var(--greyd--spacing--20);
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	width: auto;
}

.system_status_button:hover {
	cursor: pointer;
}

.system_status_button.copied {
	background-color: var(--wp-admin-color-green);
	border-color: var(--wp-admin-color-green) !important;
}

/**
 * =================================================================
 *                     Dashboard Header
 * =================================================================
 */

/**
 * Dashboard header at the top
 */
.greyd_dashboard--header {
	background: repeating-linear-gradient(0deg, #F9DD61 0, #F9DD61 24%, transparent 0, transparent 50%), repeating-linear-gradient(135deg, #F2B25A 0, #F2B25A 1%, transparent 0, transparent 50%);
	background-size: 32px 32px;
	background-color: #F9DD61;
	display: flex;
	align-items: center;
	opacity: 1;
	width: 100%;
}

.greyd_dashboard--header--content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: var(--greyd--spacing--40) var(--greyd--spacing--50);
	margin: 0 auto;
	max-width: 1800px;
	width: 100%;
	box-sizing: border-box;
	gap: var(--greyd--spacing--20);
}

@media (max-width: 840px) {
	.greyd_dashboard--header--content {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 600px) {
	.greyd_dashboard--header--content {
		margin-top: 46px;
	}
}

.greyd_dashboard--header--content-title {
	display: flex;
	align-items: center;
	gap: var(--greyd--spacing--20);
}

/** 
 * Logo Icon
 */
.greyd_admin_logo {
	display: block;
	-webkit-transition: opacity .2s;
	transition: opacity .2s;
}

.greyd_admin_logo:hover {
	opacity: .7;
}

/**
 * H1
 */
.greyd_dashboard--header--content-title h1 {
	font-weight: bold;
	line-height: 1.2;
	margin: 0;
}

/**
 * Install Button on the right
 */
.greyd_dashboard--header--content-button {
	font-size: 1rem;
	font-weight: 600;
}

/**
 * =================================================================
 *                     Dashboard Content
 * =================================================================
 */

/**
 * Dashboard Grid
 */
.greyd_dashboard {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	margin: 0 auto;
	max-width: 1800px;
	width: 100%;
}

@media (max-width: 840px) {
	.greyd_dashboard {
		grid-template-columns: 1fr;
	}
}

/**
 * Main Content
 */
.greyd_dashboard--main {
	grid-column: 1 / span 9;
}

@media (max-width: 1260px) {
	.greyd_dashboard--main {
		grid-column: 1 / span 8;
	}
}

@media (max-width: 840px) {
	.greyd_dashboard--main {
		grid-column: 1;
	}
}

.greyd_dashboard--main--plugin-active {
	background: var(--wp-admin-color-white);
	border-bottom: 1px solid var(--wp-admin-color-grey);
	border-left: 1px solid var(--wp-admin-color-grey);
	padding: var(--greyd--spacing--50);
}

@media (max-width: 782px) {
	.greyd_dashboard--main--plugin-active {
		border-left: 0;
	}
}

.greyd_dashboard--main--active-features,
.greyd_dashboard--main--more-features,
.greyd_dashboard--main--settings {
	padding: var(--greyd--spacing--50);
}

.greyd_dashboard--main--more-features,
.greyd_dashboard--main--settings {
	padding-top: 0;
}

.greyd_dashboard--main--active-features--top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: var(--greyd--spacing--40);
}

@media (max-width: 550px) {
	.greyd_dashboard--main--active-features--top {
		flex-direction: column;
		align-items: flex-start;
	}
}

.greyd_dashboard--main--active-features--top-left h2 {
	margin-top: 0;
}

.greyd_dashboard--main--active-features--top-left p {
	color: var(--wp-admin-color-medium-darker);
	margin-bottom: 0;
}

/**
 * Feature Grid
 */
.greyd_dashboard--feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: var(--greyd--spacing--40);
	margin-top: var(--greyd--spacing--40);
}

@media (max-width: 550px) {
	.greyd_dashboard--feature-grid {
		margin-top: var(--greyd--spacing--50);
	}
}

.greyd_dashboard--feature {
	display: flex;
	flex-direction: column;
	background-color: var(--wp-admin-color-white);
	border: 1px solid var(--wp-admin-color-grey);
	border-radius: 5px;
	transition: all .2s ease;
}

.greyd_dashboard--feature--image {
	aspect-ratio: 5 / 3;
	border-top-left-radius: 3px;
	border-top-right-radius: 3px;
}

.greyd_dashboard--feature--content {
	border-top: 1px solid var(--wp-admin-color-grey);
	padding: var(--greyd--spacing--30);
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.greyd_dashboard--feature--title {
	margin-top: 0;
}

.greyd_dashboard--feature--desc {
	color: var(--wp-admin-color-medium);
	flex-grow: 1;
}

.greyd_dashboard--feature--required {
	display: inline-flex;
	align-items: center;
	background-color: var(--wp-admin-color-offwhite);
	color: var(--wp-admin-color-medium-darker);
	border-radius: 50px;
	padding: 2px 8px 2px 2px;
	gap: 8px;
	margin: 0;
	margin-top: var(--greyd--spacing--10);
	font-size: 10px;
}

.greyd_dashboard--feature--helplink {
	margin-bottom: 0;
}

.greyd_dashboard--feature--button {
	border-top: 1px solid var(--wp-admin-color-light);
	margin-top: var(--greyd--spacing--30);
	padding-top: var(--greyd--spacing--30);
}

.greyd_dashboard--settings-panels .greyd_dashboard--feature {
	background-color: #f6f6f6;
	border-color: #d7d7d7;
}

.greyd_dashboard--settings-panels .greyd_dashboard--feature--content {
	border-top: 0;
}

.greyd_dashboard--settings-panels .greyd_dashboard--feature--desc {
	display: flex;
	flex-direction: column;
}

.greyd_dashboard--settings-panels .greyd_dashboard--feature--desc .greyd_dashboard--feature--desc-text {
	flex-grow: 1;
}

/**
 * Sidebar
 */
.greyd_dashboard--sidebar {
	background: var(--wp-admin-color-white);
	border: 1px solid var(--wp-admin-color-grey);
	border-top: 0;
	grid-column: 10 / span 3;
}

.toplevel_page_greyd_dashboard #wpbody .notice ~ .wrap .greyd_dashboard--sidebar {
	border-top: 1px solid var(--wp-admin-color-grey);
}

@media(max-width: 1260px) {
	.greyd_dashboard--sidebar {
		grid-column: 9 / span 4;
	}
}

@media (max-width: 840px) {
	.greyd_dashboard--sidebar {
		border-top: 1px solid var(--wp-admin-color-grey);
		border-left: 0;
		border-right: 0;
		grid-column: 1;
	}
}

.greyd_dashboard--sidebar > div {
	padding: var(--greyd--spacing--50);
}

.greyd_dashboard--sidebar > div > h2:first-of-type {
	margin-top: 0;
}

.greyd_dashboard--sidebar > div:not(:last-of-type) {
	border-bottom: 1px solid var(--wp-admin-color-grey);
}

.greyd_dashboard--sidebar--need-help ul {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.greyd-changelog {
	font-size: smaller;
	hyphens: auto;
	text-wrap: pretty;
}

.greyd-changelog > h4:first-of-type {
	margin-top: 0;
}

.greyd-changelog > ul {
	list-style: disc;
	padding-left: 1rem;
}

.greyd_dashboard--sidebar--status-list {
	display: flex;
	flex-direction: column;
	gap: var(--greyd--spacing--40);
}

.greyd_dashboard--sidebar--status-list li {
	display: flex;
	align-items: flex-start;
	gap: var(--greyd--spacing--20);
}

.greyd_dashboard--sidebar--status-list li .text {
	display: flex;
	flex-flow: column;
	gap: 0.5rem;
}
.greyd_dashboard--sidebar--status-list li .text.small {
	font-size: 0.7rem;
	line-height: 0.9rem;
}

/**
 * =================================================================
 *                   Greyd System Status Modal
 * =================================================================
 */

.greyd_system_status_wrapper {
	margin-top: var(--greyd--spacing--10);
}

#greyd_system_status {
	max-width: 600px;
	padding: 2em;
	border: 1px solid var(--wp-admin-color-grey);
	border-radius: 4px;
}

#greyd_system_status::backdrop {
	background-color: rgba(0, 0, 0, 0.5);
}

#greyd_system_status .close_modal_button {
	position: absolute;
	top: 0;
	right: 0;
	padding: 10px 10px 0 10px;
	cursor: pointer;
}

.greyd_system_status_content h3 {
	margin-top: 0;
}

.greyd_system_status_content textarea {
	width: 600px;
	height: 300px;
	padding: 12px;
	font-family: 'Courier New', Courier, monospace;
}

/**
 * =================================================================
 *                     Greyd Dashboard Notice
 * =================================================================
 */

.greyd_dashboard_notice {
	border: 1px solid var(--wp-admin-color-dark);
	border-left-width: 10px;
	border-radius: 2px;
	margin: 0 0 var(--greyd--spacing--50) 0 !important;
	padding: 0;
	display: flex;
	flex-direction: row;
}

@media (max-width: 600px) {
	.greyd_dashboard_notice {
		flex-direction: column;
	}
}

.greyd_dashboard_notice--image {
	padding: var(--greyd--spacing--30) var(--greyd--spacing--20) var(--greyd--spacing--30) var(--greyd--spacing--40);
}

@media (max-width: 600px) {
	.greyd_dashboard_notice--image {
		max-width: 46px;
		padding: var(--greyd--spacing--10) var(--greyd--spacing--40) 0 var(--greyd--spacing--40);
	}
}

.greyd_dashboard_notice--content {
	padding: var(--greyd--spacing--40);
}

@media (max-width: 600px) {
	.greyd_dashboard_notice--content {
		padding-top: var(--greyd--spacing--10);
	}
}

.greyd_dashboard_notice--content h3 {
	margin: 0 0 var(--greyd--spacing--20) 0;
}

.greyd_dashboard_notice--content p {
	color: var(--wp-admin-color-medium);
	margin: 0 0 var(--greyd--spacing--20) 0;
	padding: 0;
}

.greyd_dashboard_notice--buttons {
	display: flex;
	align-items: center;
	gap: var(--greyd--spacing--20);
	flex-wrap: wrap;
}

/**
 * =================================================================
 *                        Helper Classes
 * =================================================================
 */

.visually-hidden {
	border: 0;
	clip: rect(0 0 0 0);
	height: auto;
	margin: 0;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}