/**
 * SendForce Mail Relay — WordPress Dashboard Widget Styles
 *
 * @package SendForce
 */

/* Widget container */
.smw-widget {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1E293B;
	font-size: 13px;
}

/* Header: legend + range select */
.smw-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.smw-legend {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #64748B;
}

.smw-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.smw-dot-sent   { background: #1dd1a1; }
.smw-dot-failed { background: #EF4444; }

.smw-range-select {
	height: 28px;
	padding: 0 24px 0 8px;
	font-size: 11px;
	border: 1px solid #E2E8F0;
	border-radius: 6px;
	background: #fff;
	color: #1E293B;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 8px center;
	outline: none;
}

.smw-range-select:focus {
	border-color: #1dd1a1;
	box-shadow: 0 0 0 2px rgba(29, 209, 161, 0.2);
}

/* Chart area */
.smw-chart-wrap {
	position: relative;
	height: 180px;
	margin-bottom: 0;
}

.smw-chart-wrap canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

/* Loading overlay */
.smw-chart-loader {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.75);
	border-radius: 4px;
}

.smw-chart-loader[style*="block"] {
	display: flex;
}

@keyframes smw-spin {
	to { transform: rotate( 360deg ); }
}

.smw-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid #E2E8F0;
	border-top-color: #1dd1a1;
	border-radius: 50%;
	animation: smw-spin 0.7s linear infinite;
}

/* Footer stats */
.smw-footer {
	display: flex;
	align-items: center;
	padding: 14px 0 10px;
	border-top: 1px solid #F1F5F9;
	margin-top: 12px;
}

.smw-stat {
	flex: 1;
	text-align: center;
}

.smw-stat-num {
	display: block;
	font-size: 20px;
	font-weight: 700;
	color: #1E293B;
	line-height: 1.1;
}

.smw-num-sent   { color: #1dd1a1; }
.smw-num-failed { color: #EF4444; }
.smw-num-rate   { color: #3B82F6; }

.smw-stat-lbl {
	display: block;
	font-size: 10px;
	color: #94A3B8;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-top: 3px;
}

.smw-stat-divider {
	width: 1px;
	height: 32px;
	background: #F1F5F9;
	flex-shrink: 0;
}

/* Actions */
.smw-actions {
	padding-top: 12px;
	text-align: right;
}

.smw-view-link {
	font-size: 12px;
	color: #1dd1a1;
	text-decoration: none;
	font-weight: 500;
}

.smw-view-link:hover {
	color: #10ac84;
	text-decoration: underline;
}
