/**
 * AmbassadorHub – Dashboard styles
 *
 * Loaded only on the toplevel_page_ambassadorhub admin screen.
 * Primary colour tokens delegate to the WordPress admin theme custom
 * properties so the UI adapts to whichever colour scheme the user has
 * selected (Default, Midnight, Ocean, Sunrise, etc.).
 *
 * Tokens used:
 *   --wp-admin-theme-color           e.g. #2271b1 in Default
 *   --wp-admin-theme-color-darker-10 e.g. #135e96 in Default
 *   --wp-admin-theme-color-darker-20 e.g. #0a4b78 in Default
 */

/* ==========================================================================
   Layout
   ========================================================================== */

.ambh-dashboard {
	max-width: 1400px;
	margin-left: auto;
	margin-right: auto;
}

.ambh-dashboard__section {
	margin-bottom: 50px;
}

.ambh-dashboard__section-title {
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 14px;
}

.ambh-dashboard__graph {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 20px 18px 16px;
	height:300px;
}

.ambh-dashboard__section-title--no-margin {
	margin-bottom: 0;
}

/* ==========================================================================
   KPI cards
   ========================================================================== */

.ambh-kpi-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 16px;
}

.ambh-kpi-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 20px 18px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	position: relative;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ambh-kpi-card:hover {
	border-color: var(--wp-admin-theme-color);
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.08 );
}

.ambh-kpi-card__icon {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: var(--wp-admin-theme-color);
}

.ambh-kpi-card__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ambh-kpi-card__value {
	font-size: 32px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.1;
}

.ambh-kpi-card__label {
	font-size: 12px;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.ambh-kpi-card__link {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: 12px;
	font-weight: 600;
	color: var(--wp-admin-theme-color);
	text-decoration: none;
	margin-top: auto;
}

.ambh-kpi-card__link:hover {
	color: var(--wp-admin-theme-color-darker-10);
	text-decoration: underline;
}

.ambh-kpi-card__link .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* ==========================================================================
   Setup checklist
   ========================================================================== */

.ambh-setup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.ambh-setup-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ambh-setup-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	background: transparent;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	cursor: pointer;
	color: #646970;
	transition: background 0.1s ease, color 0.1s ease;
}

.ambh-setup-toggle:hover {
	background: #f0f0f1;
	color: #1d2327;
}

.ambh-setup-toggle .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.ambh-setup-section.is-collapsed .ambh-progress,
.ambh-setup-section.is-collapsed .ambh-setup-list {
	display: none;
}

.ambh-setup-section.is-collapsed .ambh-setup-header {
	margin-bottom: 0;
}

.ambh-setup-header__sub {
	margin: 4px 0 0;
	font-size: 12px;
	color: #646970;
}

.ambh-setup-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: color-mix( in srgb, var(--wp-admin-theme-color) 10%, #fff );
	color: var(--wp-admin-theme-color);
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	border: 1px solid color-mix( in srgb, var(--wp-admin-theme-color) 35%, #fff );
	white-space: nowrap;
}

.ambh-setup-badge--done {
	background: #edfaef;
	color: #1a7928;
	border-color: #b8e6be;
}

.ambh-setup-badge--done .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* Progress bar */
.ambh-progress {
	height: 6px;
	background: #f0f0f1;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 16px;
}

.ambh-progress__bar {
	height: 100%;
	background: linear-gradient(
		90deg,
		var(--wp-admin-theme-color),
		color-mix( in srgb, var(--wp-admin-theme-color) 55%, #fff )
	);
	border-radius: 3px;
	transition: width 0.4s ease;
}

/* Step list */
.ambh-setup-list {
	margin: 0;
	padding: 0;
	list-style: none;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	overflow: hidden;
}

.ambh-setup-step {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid #f0f0f1;
	transition: background 0.1s ease;
	margin-bottom: 0;
}

.ambh-setup-step:last-child {
	border-bottom: none;
}

.ambh-setup-step:hover {
	background: #f9f9f9;
}

.ambh-setup-step__icon {
	font-size: 20px;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.ambh-setup-step.is-done .ambh-setup-step__icon {
	color: #1a7928;
}

.ambh-setup-step.is-skipped .ambh-setup-step__icon {
	color: #7db887;
}

.ambh-setup-step.is-pending .ambh-setup-step__icon {
	color: #c3c4c7;
}

.ambh-setup-step__content {
	flex: 1;
	min-width: 0;
}

.ambh-setup-step__title {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
}

.ambh-setup-step.is-done .ambh-setup-step__title {
	color: #1a7928;
}

.ambh-setup-step.is-skipped .ambh-setup-step__title {
	color: #7db887;
}

.ambh-setup-step__desc {
	display: block;
	font-size: 12px;
	color: #646970;
	margin-top: 2px;
}

.ambh-setup-step__action {
	flex-shrink: 0;
}

.ambh-setup-step__skip {
	flex-shrink: 0;
	color: #646970 !important;
	border-color: #c3c4c7 !important;
	background: #f6f7f7 !important;
	box-shadow: none !important;
}
