/* stylelint-disable max-nesting-depth, no-descending-specificity, selector-class-pattern */

@import './variables';

input[type=text], input[type=password], input[type=color],
input[type=date], input[type=datetime], input[type=datetime-local],
input[type=email], input[type=month], input[type=number],
input[type=search], input[type=tel], input[type=text],
input[type=time], input[type=url], input[type=week],
input[type=radio] {
	box-shadow: none;
}

input[type=text]:focus, input[type=password]:focus, input[type=color]:focus,
input[type=date]:focus, input[type=datetime]:focus, input[type=datetime-local]:focus,
input[type=email]:focus, input[type=month]:focus, input[type=number]:focus,
input[type=search]:focus, input[type=tel]:focus, input[type=text]:focus,
input[type=time]:focus, input[type=url]:focus, input[type=week]:focus,
input[type=radio]:focus, select:focus, textarea:focus {
	border: 1px solid $acc-gray-200;
	box-shadow: none;
}

a,
.button-link {
	color: $acc-brand;
}
a:hover,
a:focus,
.button-link:hover,
.button-link:focus {
	color: $acc-charcoal;
}

.components-button,
.page-title-action {
	border-color: transparent;
	color: $acc-charcoal;
	border-radius: 10px;
	border-width: 1px;
	background: transparent;
	display: inline-block;
	box-sizing: border-box;
	box-shadow: none;
	display: inline-block;
	transition: all 0.2s ease;

	&.dashicons-before::before {
		margin-right: 5px;
		position: relative;
		top: 2px;
	}

	&.AddNew {
		min-width: 140px;
	}
}
.components-button:hover,
.components-button:focus,
.components-button:active,
.components-button:hover:not(:disabled):not([aria-disabled="true"]),
.components-button:focus:not(:disabled):not([aria-disabled="true"]),
.components-button:active:not(:disabled):not([aria-disabled="true"]) {
	color: $acc-charcoal;
	background: rgba(29, 35, 39, 0.08);
	box-shadow: inset 0 0 0 1px rgba(29, 35, 39, 0.25);
}

.button.button-primary,
.components-button.is-primary {
	border-radius: 10px;
	padding: 7px 30px 7px 27px;
	height: 36px;
	line-height: 20px;
	color: $acc-white;
	background-color: $acc-charcoal;
	font-weight: 700;
}
.button.button-primary:hover:not(:disabled):not([aria-disabled="true"]),
.button.button-primary:focus:not(:disabled):not([aria-disabled="true"]),
.button.button-primary:active:not(:disabled):not([aria-disabled="true"]),
.components-button.is-primary:hover:not(:disabled):not([aria-disabled="true"]),
.components-button.is-primary:focus:not(:disabled):not([aria-disabled="true"]),
.components-button.is-primary:active:not(:disabled):not([aria-disabled="true"]) {
	background-color: $acc-charcoal-hover;
	color: $acc-white;
	box-shadow: none;
}

.components-button:disabled,
.components-button:disabled:hover,
.components-button:disabled:focus,
.components-button:disabled:active,
.components-button[aria-disabled="true"],
.components-button[aria-disabled="true"]:hover,
.components-button[aria-disabled="true"]:focus,
.components-button[aria-disabled="true"]:active {
	background: $acc-gray-200;
	box-shadow: none;
	border-color: transparent;
	cursor: not-allowed;
}

.components-button.has-icon:disabled,
.components-button.has-icon:disabled:hover,
.components-button.has-icon:disabled:focus,
.components-button.has-icon:disabled:active,
.components-button.has-icon[aria-disabled="true"],
.components-button.has-icon[aria-disabled="true"]:hover,
.components-button.has-icon[aria-disabled="true"]:focus,
.components-button.has-icon[aria-disabled="true"]:active {
	background: none;
	color: $acc-gray-150;
	box-shadow: none;
	border-color: none;
}

.components-button.is-secondary,
.page-title-action,
.page-title-action:not(:disabled):not([aria-disabled="true"]) {
	padding: 7px 30px 7px 27px;
	height: 36px;
	line-height: 20px;
	border-color: $acc-charcoal;
	color: $acc-charcoal;
	border-radius: 10px;
	box-shadow: inset 0 0 0 1px $acc-charcoal;
	background: transparent;
	display: inline-block;
	font-weight: 700;
}
.components-button.is-secondary:hover:not(:disabled):not([aria-disabled="true"]),
.components-button.is-secondary:focus:not(:disabled):not([aria-disabled="true"]),
.components-button.is-secondary:active:not(:disabled):not([aria-disabled="true"]),
.page-title-action:hover:not(:disabled):not([aria-disabled="true"]),
.page-title-action:focus:not(:disabled):not([aria-disabled="true"]),
.page-title-action:active:not(:disabled):not([aria-disabled="true"]) {
	border-color: $acc-charcoal-hover;
	color: $acc-charcoal-hover;
	box-shadow: inset 0 0 0 1px $acc-charcoal-hover;
	background: transparent;
}

.components-button.is-tertiary {
	border-color: transparent;
	color: $acc-charcoal;
	border-radius: 10px;
	border-width: 1px;
	background: transparent;
}
.components-button.is-tertiary:hover:not(:disabled):not([aria-disabled="true"]),
.components-button.is-tertiary:focus:not(:disabled):not([aria-disabled="true"]),
.components-button.is-tertiary:active:not(:disabled):not([aria-disabled="true"]) {
	color: $acc-charcoal-hover;
	box-shadow: inset 0 0 0 1px $acc-charcoal-hover;
}

.components-button.is-destructive {
	color: $acc-negative;
	border-color: $acc-negative;
}

.components-button.is-destructive:hover:not(:disabled):not([aria-disabled="true"]) {
	color: $acc-negative;
	box-shadow: inset 0 0 0 1px $acc-negative;
}

.components-button.is-destructive:focus:not(:disabled):not([aria-disabled="true"]),
.components-button.is-destructive:active:not(:disabled):not([aria-disabled="true"]) {
	color: $acc-negative;
	box-shadow: inset 0 0 0 1px $acc-negative;
}

.components-button.is-link {
	border: 0;
	padding: 0;
	background: none;
	text-decoration: none;
	color: $acc-brand;
	box-shadow: none;
}
.components-button.is-link:hover:not(:disabled):not([aria-disabled="true"]),
.components-button.is-link:focus:not(:disabled):not([aria-disabled="true"]),
.components-button.is-link:active:not(:disabled):not([aria-disabled="true"]) {
	text-decoration: none;
	color: $acc-charcoal;
	box-shadow: none !important;
	border: 0;
	text-decoration: none;
}

.components-form-toggle .components-form-toggle__input:focus+.components-form-toggle__track {
	box-shadow: 0 0 0 2px $acc-white, 0 0 0 4px $acc-brand;
}

.components-form-toggle.is-checked .components-form-toggle__track {
	background-color: $acc-brand;
}

.radio-group .components-button-group {
	button {
		padding: 7px 10px;
	}
}

.components-button-group .components-button {
	border-right: 0;
	cursor: pointer;
	font-weight: 500;
	padding: 7px 10px;
	color: $acc-charcoal;
	border-color: $acc-charcoal;
	box-shadow: inset 0 0 0 1px $acc-charcoal;
	background: $acc-white;
	border-radius: 0;
	border: 0;

	&:hover,
	&:focus {
		color: $acc-charcoal;
		border-color: $acc-charcoal;
		box-shadow: inset 0 0 0 1px $acc-charcoal;
	}

	&:first-child {
		border-top-left-radius: 10px;
		border-bottom-left-radius: 10px;
	}

	&:last-child {
		border-top-right-radius: 10px;
		border-bottom-right-radius: 10px;
	}

	&.is-secondary:hover,
	&.is-secondary:active,
	&.is-secondary:focus {
		color: $acc-charcoal;
		border-color: $acc-charcoal;
		box-shadow: inset 0 0 0 1px $acc-charcoal;
	}

	&.is-primary,
	&.is-primary:hover,
	&.is-primary:active,
	&.is-primary:focus {
		border: 0;
		outline: none;
		background: $acc-charcoal;
		border-color: $acc-charcoal;
		color: $acc-white;
		box-shadow: none;
	}

	&.is-primary:focus:not(:disabled):not([aria-disabled="true"]) {
		box-shadow: inset 0 0 0 1px $acc-charcoal;
	}
}


.wrap > form > * {
	margin-left: 5%;
	margin-right: 5%;
}

.wrap > form > .form-table {
	width: 90%;
}

.wrap > #posts-filter > .wp-list-table {
	margin: 0;
}

.subsubsub,
.search-box {
	margin-top: 30px;
	margin-left: 5%;
	margin-right: 5%;
}

.wp-list-table {
	border: 0;
	border-left: 0;
	border-right: 0;
	margin: 0;
}
.wp-list-table thead,
.wp-list-table tfoot {
	border: 1px solid $acc-gray-150;
	border-left: 0;
	border-right: 0;
	background: $acc-gray-100;

	th, td {
		border: 0;
		font-size: 0.7rem;
		color: $acc-gray-400;
		font-weight: 400;
		text-transform: uppercase;
		letter-spacing: 0.03rem;
	}

	.check-column {
		padding-top: 0;
	}
}

.wp-list-table tbody tr {
	background-color: $acc-white;
}

.wp-list-table tbody tr:first-child td,
.wp-list-table tbody tr:first-child th {
	border-top: 0;
}
.wp-list-table tbody tr:last-child td {
	border-bottom: 0;
}
.wp-list-table tbody td,
.wp-list-table tbody th {
	border: 10px solid $acc-white;
	border-width: 10px 0;
}
.wp-list-table th:first-child,
.wp-list-table td:first-child {
	padding-left: 5%;
}
.wp-list-table .check-column:first-child {
	width: 7%;
	max-width: calc(2.2em + 5%);
}
.wp-list-table th:last-child,
.wp-list-table td:last-child {
	padding-right: 5%;
}

.tablenav {
	margin-left: 5%;
	margin-right: 5%;
}
