/* Layout and structure */

body.wp-admin .maildoctor-screen {
	max-width: 1180px;
	padding: 0 0 48px;
	box-sizing: border-box;
}

.maildoctor-templates--v2 {
	display: grid;
	grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
	gap: 28px;
	align-items: flex-start;
	margin-top: 24px;
}

.maildoctor-templates__sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
	position: sticky;
	top: 96px;
	z-index: 5;
}

.maildoctor-toggle-card {
	background: var(--md-color-surface);
	border: 1px solid var(--md-color-border);
	border-radius: 14px;
	padding: 24px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.maildoctor-toggle-card__copy h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--md-color-text);
}

.maildoctor-toggle-card__copy p {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--md-color-muted);
	line-height: 1.5;
}

.maildoctor-toggle-card__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.maildoctor-toggle-card__actions .toggle-control {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--md-color-text);
}

.maildoctor-template-list {
	background: var(--md-color-surface);
	border: 1px solid var(--md-color-border);
	border-radius: 14px;
	box-shadow: 0 10px 35px rgba(15, 23, 42, 0.05);
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 22px;
}

.template-list__header h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	color: var(--md-color-text);
}

.template-list__header p {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--md-color-muted);
	line-height: 1.5;
}

.template-list__nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.template-list__nav a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--md-color-border);
	border-radius: 10px;
	color: var(--md-color-text);
	background: var(--md-color-surface);
	text-decoration: none;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.template-list__nav a:hover,
.template-list__nav a:focus {
	border-color: var(--md-color-accent);
	color: var(--md-color-accent);
}

.template-list__nav a.is-active {
	border-color: var(--md-color-accent);
	background: var(--md-color-accent-soft);
	color: var(--md-color-accent);
}

.template-list__label {
	font-weight: 600;
	font-size: 13px;
	flex: 1 1 auto;
}

.template-list__status {
	font-size: 12px;
	font-weight: 600;
	color: var(--md-color-success);
	white-space: nowrap;
}

.template-card-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.template-card {
	position: relative;
	border: 1px solid var(--md-color-border);
	border-radius: 12px;
	padding: 18px 20px;
	background: var(--md-color-surface);
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
	display: flex;
	flex-direction: column;
	gap: 14px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.template-card:hover,
.template-card:focus-within {
	border-color: var(--md-color-accent);
	box-shadow: 0 10px 28px rgba(34, 113, 177, 0.18);
	transform: translateY(-2px);
}

.template-card.is-current {
	border-color: var(--md-color-accent);
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.template-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}