/* GA Widget – front-end shortcode styles */

.ga-widget-value {
	display: inline-block;
	font-weight: 600;
}
.ga-widget-value.ga-widget-error {
	color: #b32d2e;
	font-weight: 500;
}

/* ----- Online widget (UX: hierarchy, scannability, recognition) ----- */
.ga-widget-online-card {
	/* Container: clear boundary, comfortable touch target */
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 44px;
	padding: 0.625rem 1rem;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-left: 3px solid #e37400;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	line-height: 1.25;
}

/* GA icon: source/trust, doesn’t compete with the number */
.ga-widget-online-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	background: #fff8f0;
	border-radius: 8px;
	border: 1px solid rgba(227, 116, 0, 0.15);
}
.ga-widget-online-card__icon svg {
	width: 22px;
	height: 22px;
	display: block;
}

/* Content group: number + label read as one unit */
.ga-widget-online-card__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.125rem;
	min-width: 0;
}

/* Primary: the number (main takeaway) */
.ga-widget-online-card__value {
	font-size: 1.375rem;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

/* Secondary: context (“Online”) */
.ga-widget-online-card__label {
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #64748b;
	line-height: 1.2;
}

/* Subtle feedback so it feels like a live stat */
.ga-widget-online-card:hover {
	border-left-color: #f9ab00;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* When online widget is wrapped in a link (settings: Online widget link) */
.ga-widget-online-card__link,
.ga-widget-online-link {
	display: inline-block;
	text-decoration: none;
	color: inherit;
}
.ga-widget-online-card__link:hover,
.ga-widget-online-link:hover {
	text-decoration: none;
	color: inherit;
}

/* ----- Advertiser stats page (Traffic, Country, Device – last 28 days) ----- */
.ga-widget-stats {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	max-width: 900px;
	margin: 0 auto;
	color: #1e293b;
	line-height: 1.5;
}
.ga-widget-stats--error {
	padding: 1rem;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	color: #b32d2e;
}
.ga-widget-stats__source {
	font-size: 0.8125rem;
	color: #64748b;
	margin: 0.5rem 0 0 0;
	text-align: right;
}
.ga-widget-stats__source a {
	color: #1a73e8;
	text-decoration: none;
}
.ga-widget-stats__source a:hover {
	text-decoration: underline;
}
@media (max-width: 640px) {
	.ga-widget-stats__source {
		text-align: center;
	}
}
.ga-widget-stats__section {
	margin-bottom: 2rem;
}
.ga-widget-stats__heading {
	font-size: 1.125rem;
	font-weight: 600;
	color: #0f172a;
	margin: 0 0 0.75rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #e37400;
}
/* Chart: Total users by day – line chart (Google Analytics style) */
.ga-widget-stats__chart-wrap {
	--ga-widget-line-color: #1a73e8;
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: #fff;
	border: 1px solid #dadce0;
	border-radius: 8px;
}
.ga-widget-stats__chart-title {
	font-size: 0.9375rem;
	font-weight: 600;
	color: #3c4043;
	margin: 0 0 0.75rem 0;
}
.ga-widget-stats__chart {
	width: 100%;
}
.ga-widget-stats__chart--line .ga-widget-stats__chart-inner {
	display: flex;
	align-items: stretch;
	gap: 0;
	width: 100%;
}
.ga-widget-stats__chart-plot-area {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.ga-widget-stats__chart-svg-wrap {
	flex: 0 0 160px;
	min-height: 160px;
	width: 100%;
}
.ga-widget-stats__chart-svg {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	object-position: left center;
}
.ga-widget-stats__chart-grid {
	stroke: #e8eaed;
	stroke-width: 1;
	vector-effect: non-scaling-stroke;
}
.ga-widget-stats__chart-line {
	stroke: var(--ga-widget-line-color);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.ga-widget-stats__chart-point {
	cursor: pointer;
}
.ga-widget-stats__chart-y-axis {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex-shrink: 0;
	align-self: flex-start;
	height: 160px;
	padding-left: 0.75rem;
	font-size: 0.6875rem;
	font-variant-numeric: tabular-nums;
	color: #5f6368;
	text-align: right;
}
.ga-widget-stats__chart-plot-area .ga-widget-stats__chart-x-axis {
	flex-shrink: 0;
}
.ga-widget-stats__chart-y-axis--right {
	justify-content: space-between;
	padding-left: 0.75rem;
	border-left: 1px solid #e8eaed;
}
.ga-widget-stats__chart-y-tick {
	line-height: 1;
}
.ga-widget-stats__chart-x-axis {
	display: flex;
	gap: 0;
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px solid #e8eaed;
	font-size: 0.6875rem;
	color: #5f6368;
	text-align: center;
}
.ga-widget-stats__chart-x-axis .ga-widget-stats__chart-label {
	flex: 1;
	min-width: 0;
}
.ga-widget-stats__table-wrap {
	overflow-x: auto;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.ga-widget-stats__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}
.ga-widget-stats__table th,
.ga-widget-stats__table td {
	padding: 0.625rem 1rem;
	text-align: left;
	border-bottom: 1px solid #e2e8f0;
}
.ga-widget-stats__table thead th {
	background: #f8fafc;
	font-weight: 600;
	color: #475569;
}
.ga-widget-stats__table tbody tr:hover {
	background: #f8fafc;
}
.ga-widget-stats__table .ga-widget-stats__num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	color: #0f172a;
}
.ga-widget-stats__pct {
	font-weight: 400;
	color: #64748b;
	font-size: 0.875em;
	margin-left: 0.25rem;
}
.ga-widget-stats__table tfoot .ga-widget-stats__total th,
.ga-widget-stats__table tfoot .ga-widget-stats__total td {
	background: #f1f5f9;
	font-weight: 600;
	border-top: 2px solid #e2e8f0;
	border-bottom: none;
	padding: 0.75rem 1rem;
}
.ga-widget-stats__table tfoot .ga-widget-stats__total .ga-widget-stats__pct {
	color: #475569;
}
