/* Toolvane admin screen */

.toolvane-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.toolvane-title .dashicons {
	width: 28px;
	height: 28px;
	font-size: 28px;
	color: #2271b1;
}

.toolvane-version {
	padding: 2px 10px;
	border-radius: 999px;
	background: #f0f0f1;
	color: #50575e;
	font-size: 12px;
	font-weight: 500;
}

.toolvane-tabs {
	display: flex;
	flex-wrap: wrap;
}

.toolvane-content {
	margin-top: 20px;
}

.toolvane-intro {
	max-width: 860px;
	color: #50575e;
	font-size: 14px;
}

/* Dashboard filters */

.toolvane-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 12px 0 4px;
}

.toolvane-filter.is-active {
	border-color: #2271b1;
	background: #2271b1;
	color: #fff;
}

/* Module grid */

.toolvane-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
	margin: 16px 0;
}

.toolvane-card {
	display: flex;
	flex-direction: column;
	padding: 16px 18px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.toolvane-card.is-enabled {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.toolvane-card-head {
	display: flex;
	align-items: center;
	gap: 10px;
}

.toolvane-card-head h2 {
	flex: 1;
	margin: 0;
	font-size: 15px;
}

.toolvane-card-head .dashicons {
	color: #2271b1;
}

.toolvane-card p {
	flex: 1;
	margin: 10px 0;
	color: #50575e;
}

.toolvane-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.toolvane-card-link {
	font-weight: 600;
	text-decoration: none;
}

.toolvane-badge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	background: #f0f6fc;
	color: #2271b1;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.toolvane-badge-red {
	background: #fcf0f1;
	color: #d63638;
}

/* Toggle switch */

.toolvane-switch {
	position: relative;
	display: inline-block;
	flex-shrink: 0;
	width: 40px;
	height: 22px;
}

.toolvane-switch input {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
}

.toolvane-slider {
	position: absolute;
	inset: 0;
	border-radius: 22px;
	background: #c3c4c7;
	cursor: pointer;
	transition: background 0.15s;
}

.toolvane-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.15s;
}

.toolvane-switch input:checked + .toolvane-slider {
	background: #2271b1;
}

.toolvane-switch input:checked + .toolvane-slider::before {
	transform: translateX(18px);
}

.toolvane-switch input:focus-visible + .toolvane-slider {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
}

/* Settings fields */

.toolvane-checkboxes label {
	display: inline-block;
	min-width: 220px;
	margin: 0 12px 6px 0;
}

.toolvane-heading-row th {
	padding: 24px 0 0;
}

.toolvane-heading-row h3 {
	margin: 0;
	padding-bottom: 6px;
	border-bottom: 1px solid #dcdcde;
	font-size: 15px;
}

.toolvane-heading-row .description {
	font-weight: 400;
}

.toolvane-copy {
	display: inline-block;
	margin-top: 4px;
	cursor: text;
	user-select: all;
	word-break: break-all;
}

/* Panels */

.toolvane-panel {
	max-width: 1200px;
	margin-bottom: 20px;
	padding: 4px 20px 16px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
}

.toolvane-panel h2 {
	display: flex;
	align-items: center;
	gap: 12px;
}

.toolvane-danger {
	border-color: #f0b8b8;
}

.toolvane-redirect-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
}

.toolvane-redirect-form label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-weight: 600;
}

.toolvane-redirect-form input[type="text"] {
	width: 280px;
	max-width: 100%;
}

.toolvane-inline-form {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.toolvane-csv {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
}

.toolvane-csv .description {
	flex-basis: 100%;
	margin: 0;
}

.toolvane-actions {
	text-align: right;
	white-space: nowrap;
}

.toolvane-ref {
	max-width: 260px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.toolvane-cleanup-table {
	max-width: 640px;
	margin-bottom: 8px;
}

@media screen and (max-width: 782px) {
	.toolvane-grid {
		grid-template-columns: 1fr;
	}

	.toolvane-redirect-form input[type="text"] {
		width: 100%;
	}
}
