/**
 * Waitlytics — Admin Styles
 *
 * @package Waitlytics
 */

/* ─── Page Layout ────────────────────────────────────────────── */

.wtly-wrap {
	max-width: 1200px;
}

.wtly-page-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.wtly-version {
	font-size: 13px;
	font-weight: 400;
	color: #666;
}

.wtly-pro-badge {
	display: inline-block;
	padding: 2px 10px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.5px;
	color: #fff;
	background-color: #2e7d32;
	border-radius: 10px;
}

.wtly-license-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #2e7d32;
}

.wtly-license-status::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	background-color: #2e7d32;
	border-radius: 50%;
}

.wtly-welcome-pro {
	border-left: 4px solid #2e7d32;
}

.wtly-welcome-pro h3 {
	margin: 0;
	color: #2e7d32;
}

.wtly-nav-tabs {
	margin-bottom: 20px;
}

.wtly-tab-content {
	margin-top: 0;
}

/* ─── Cards ──────────────────────────────────────────────────── */

.wtly-card {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 20px;
}

.wtly-card h2 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 16px;
	font-weight: 600;
}

.wtly-card h3 {
	margin-top: 0;
}

/* ─── Stats Grid ─────────────────────────────────────────────── */

.wtly-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 20px;
}

.wtly-stat-card {
	text-align: center;
	padding: 20px 15px;
}

.wtly-stat-card h3 {
	font-size: 13px;
	font-weight: 400;
	color: #666;
	margin: 0 0 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.wtly-stat-number {
	font-size: 32px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.2;
}

.wtly-stat-sub {
	font-size: 12px;
	color: #888;
	margin-top: 4px;
}

/* ─── Status Badges ──────────────────────────────────────────── */

.wtly-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 500;
}

.wtly-status-active {
	background: #d4edda;
	color: #155724;
}

.wtly-status-notified {
	background: #d1ecf1;
	color: #0c5460;
}

.wtly-status-unsubscribed {
	background: #e2e3e5;
	color: #383d41;
}

.wtly-status-bounced {
	background: #f8d7da;
	color: #721c24;
}

.wtly-status-oos {
	color: #b32d2e;
	font-weight: 600;
}

.wtly-status-instock {
	color: #2e7d32;
}

/* ─── Table Adjustments ──────────────────────────────────────── */

.wtly-col-rank {
	width: 40px;
	text-align: center;
}

.wtly-col-actions {
	width: 80px;
	text-align: center;
}

.wtly-col-status {
	width: 120px;
}

.wtly-col-date {
	width: 120px;
}

.wtly-subscriber-table .wtly-col-email {
	width: 30%;
}

.wtly-subscriber-table .wtly-col-product {
	width: 30%;
}

.wtly-row-urgent {
	background-color: #fff3cd !important;
}

/* ─── Activity List ──────────────────────────────────────────── */

.wtly-activity-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wtly-activity-item {
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wtly-activity-item:last-child {
	border-bottom: none;
}

.wtly-activity-message {
	font-size: 13px;
	color: #1d2327;
}

.wtly-activity-time {
	font-size: 12px;
	color: #888;
	white-space: nowrap;
	margin-left: 10px;
}

/* ─── PRO Badge ──────────────────────────────────────────────── */

.wtly-pro-badge {
	display: inline-block;
	background: #0073aa;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 5px;
	border-radius: 2px;
	vertical-align: middle;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* ─── Filter Bar ─────────────────────────────────────────────── */

.wtly-filter-bar form {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.wtly-filter-bar label {
	font-weight: 500;
}

.wtly-filter-bar select,
.wtly-filter-bar input[type="search"] {
	height: 32px;
}

.wtly-filter-bar input[type="search"] {
	min-width: 200px;
}

/* ─── Settings ───────────────────────────────────────────────── */

.wtly-settings {
	display: flex;
	gap: 20px;
}

.wtly-settings-nav {
	flex: 0 0 200px;
}

.wtly-settings-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
}

.wtly-settings-nav li {
	border-bottom: 1px solid #f0f0f0;
}

.wtly-settings-nav li:last-child {
	border-bottom: none;
}

.wtly-settings-nav li a {
	display: block;
	padding: 10px 15px;
	text-decoration: none;
	color: #1d2327;
	font-size: 13px;
}

.wtly-settings-nav li a:hover {
	background: #f6f7f7;
}

.wtly-settings-nav li.active a {
	background: #0073aa;
	color: #fff;
	font-weight: 600;
}

.wtly-settings-content {
	flex: 1;
	min-width: 0;
}

.wtly-settings-content .form-table th {
	width: 200px;
	padding-top: 15px;
}

.wtly-test-result {
	margin-left: 10px;
	font-weight: 500;
}

.wtly-test-result.success {
	color: #2e7d32;
}

.wtly-test-result.error {
	color: #b32d2e;
}

/* ─── Pagination ─────────────────────────────────────────────── */

.wtly-pagination {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #f0f0f0;
}

/* ─── Forecast Controls ──────────────────────────────────────── */

.wtly-forecast-controls {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.wtly-forecast-meta {
	font-size: 13px;
	color: #666;
}

.wtly-forecast-alert {
	background: #fff3cd;
	border-color: #ffc107;
}

.wtly-forecast-alert p {
	margin: 5px 0;
	font-weight: 500;
}

.wtly-ai-summary {
	background: #f6f7f7;
	padding: 15px 20px;
	border-radius: 4px;
	line-height: 1.6;
}

/* ─── Chart Container ────────────────────────────────────────── */

.wtly-chart-container {
	position: relative;
	width: 100%;
	min-height: 300px;
}

/* ─── Empty State ────────────────────────────────────────────── */

.wtly-empty-state {
	text-align: center;
	color: #888;
	font-style: italic;
	padding: 20px 0;
}

/* ─── Product Data Panel ─────────────────────────────────────── */

.wtly-product-stats {
	display: inline-block;
	line-height: 1.8;
}

/* ─── Responsive ─────────────────────────────────────────────── */

@media screen and (max-width: 782px) {
	.wtly-stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.wtly-settings {
		flex-direction: column;
	}

	.wtly-settings-nav {
		flex: none;
	}

	.wtly-settings-nav ul {
		display: flex;
		flex-wrap: wrap;
	}

	.wtly-settings-nav li {
		border-bottom: none;
		border-right: 1px solid #f0f0f0;
	}

	.wtly-settings-nav li a {
		padding: 8px 12px;
		font-size: 12px;
	}

	.wtly-filter-bar form {
		flex-direction: column;
		align-items: stretch;
	}

	.wtly-activity-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
}

@media screen and (max-width: 480px) {
	.wtly-stats-grid {
		grid-template-columns: 1fr;
	}
}
