/**
 * DaazMarkets PRO — Sector Pulse widget
 * Styles for [daaz_gmp_sector_pulse]
 *
 * Layout: horizontal 3-metric panel (icon + title header, then 3 stat columns).
 * Theming: inherits --gmp-* CSS variables from the FREE plugin's style.css;
 *          overrides via .daaz-sp--light / .daaz-sp--dark modifier classes.
 */

/* ── Container ─────────────────────────────────────────────────────────────── */
.daaz-sector-pulse {
	display: flex;
	flex-direction: column;
	gap: 0;
	background: transparent;
	border: 1px solid var(--gmp-border, #e2e8f0);
	border-radius: 12px;
	padding: 16px 20px;
	font-family: inherit;
	color: var(--gmp-text-primary, #1e293b);
	max-width: 100%;
	box-sizing: border-box;
}

/* ── Header row ────────────────────────────────────────────────────────────── */
.daaz-sp-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
}

.daaz-sp-icon {
	font-size: 20px;
	line-height: 1;
	flex-shrink: 0;
}

.daaz-sp-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--gmp-text-primary, #1e293b);
	flex: 1;
}

.daaz-sp-count {
	font-size: 11px;
	color: var(--gmp-text-muted, #94a3b8);
	background: var(--gmp-bg-tertiary, rgba(0,0,0,.04));
	border: 1px solid var(--gmp-border, #e2e8f0);
	border-radius: 20px;
	padding: 2px 8px;
	white-space: nowrap;
}

/* ── Token footer row ──────────────────────────────────────────────────────── */
.daaz-sp-footer {
	margin-top: 10px;
	padding-top: 9px;
	border-top: 1px solid var(--gmp-border, #e2e8f0);
	font-size: 10px;
	color: var(--gmp-text-muted, #94a3b8);
	letter-spacing: .03em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Metrics row ───────────────────────────────────────────────────────────── */
.daaz-sp-metrics {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
}

.daaz-sp-metric {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 0 12px;
}

/* First metric has no left padding */
.daaz-sp-metric:first-child {
	padding-left: 0;
}

/* Divider between metrics */
.daaz-sp-metric--divider {
	border-left: 1px solid var(--gmp-border, #e2e8f0);
}

.daaz-sp-metric-value {
	font-size: 18px;
	font-weight: 700;
	color: var(--gmp-text-primary, #1e293b);
	line-height: 1.2;
	min-height: 1.4em;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
}

.daaz-sp-metric-label {
	font-size: 11px;
	color: var(--gmp-text-muted, #94a3b8);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ── Change colours ────────────────────────────────────────────────────────── */
.daaz-sp-up {
	color: var(--gmp-positive, #10b981);
}

.daaz-sp-down {
	color: var(--gmp-negative, #ef4444);
}

.daaz-sp-na {
	color: var(--gmp-text-muted, #94a3b8);
	font-size: 16px;
}

/* ── Verdict badge ─────────────────────────────────────────────────────────── */
.daaz-sp-verdict-wrap {
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}

.daaz-sp-verdict {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.daaz-sp-outperform   { color: var(--gmp-positive, #10b981); }
.daaz-sp-underperform { color: var(--gmp-negative, #ef4444); }
.daaz-sp-neutral      { color: var(--gmp-text-muted, #94a3b8); }

.daaz-sp-diff {
	font-size: 11px;
	color: var(--gmp-text-muted, #94a3b8);
	font-weight: 400;
	white-space: nowrap;
}

/* ── Error state ───────────────────────────────────────────────────────────── */
.daaz-sp-error {
	font-size: 13px;
	color: var(--gmp-negative, #ef4444);
	padding: 8px;
	margin: 0;
}

/* ── Dark theme ────────────────────────────────────────────────────────────── */
.daaz-sp--dark {
	--gmp-text-primary: #f8fafc;
	--gmp-text-muted:   #64748b;
	--gmp-positive:     #34d399;
	--gmp-negative:     #f87171;
}

/* ── Auto theme: honour prefers-color-scheme ───────────────────────────────── */
@media (prefers-color-scheme: dark) {
	.daaz-sp--auto {
		--gmp-text-primary: #f8fafc;
		--gmp-text-muted:   #64748b;
		--gmp-positive:     #34d399;
		--gmp-negative:     #f87171;
	}
}

/* ── Responsive: stack on narrow screens ───────────────────────────────────── */
@media (max-width: 480px) {
	.daaz-sp-metrics {
		grid-template-columns: 1fr 1fr;
		gap: 12px 0;
	}

	/* Third metric spans full width on the second row */
	.daaz-sp-metric:nth-child(3) {
		grid-column: 1 / -1;
		border-left: none;
		border-top: 1px solid var(--gmp-border, #e2e8f0);
		padding: 12px 0 0;
	}

	.daaz-sp-metric--divider:nth-child(2) {
		border-left: none;
		padding-left: 0;
	}

	.daaz-sp-metric:nth-child(2) {
		padding-left: 12px;
		border-left: 1px solid var(--gmp-border, #e2e8f0);
	}

	.daaz-sp-metric-value {
		font-size: 16px;
	}
}
