/**
 * Community Dashboard Styles
 * Beautiful personalized member dashboard
 *
 * @package WP_Community_Core
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
.bk-dashboard {
	--bk-primary: #2271b1;
	--bk-primary-hover: #135e96;
	--bk-secondary: #64748b;
	--bk-success: #10b981;
	--bk-warning: #f59e0b;
	--bk-danger: #ef4444;
	--bk-info: #06b6d4;

	--bk-bg-primary: #ffffff;
	--bk-bg-secondary: #f8fafc;
	--bk-bg-tertiary: #f1f5f9;

	--bk-text-primary: #0f172a;
	--bk-text-secondary: #475569;
	--bk-text-muted: #94a3b8;

	--bk-border-color: #e2e8f0;
	--bk-border-radius: 12px;
	--bk-border-radius-sm: 8px;
	--bk-border-radius-lg: 16px;

	--bk-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--bk-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	--bk-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--bk-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

	--bk-gradient-primary: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
	--bk-gradient-warm: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
	--bk-gradient-cool: linear-gradient(135deg, #2271b1 0%, #135e96 100%);

	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color: var(--bk-text-primary);
	line-height: 1.6;
}

/* ==========================================================================
   Login Prompt
   ========================================================================== */
.bk-dashboard-login-prompt {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 400px;
	padding: 40px 20px;
}

.bk-login-prompt-card {
	text-align: center;
	background: var(--bk-bg-primary);
	border-radius: var(--bk-border-radius-lg);
	padding: 60px 40px;
	box-shadow: var(--bk-shadow-lg);
	max-width: 400px;
}

.bk-login-prompt-card .dashicons {
	font-size: 64px;
	width: 64px;
	height: 64px;
	color: var(--bk-primary);
	margin-bottom: 20px;
}

.bk-login-prompt-card h2 {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 16px 0;
	color: var(--bk-text-primary);
}

.bk-login-prompt-card p {
	color: var(--bk-text-secondary);
	margin: 0 0 24px 0;
}

.bk-login-prompt-register {
	margin-top: 16px !important;
	font-size: 0.875rem;
}

.bk-login-prompt-register a {
	color: var(--bk-primary);
	font-weight: 600;
	text-decoration: none;
}

.bk-login-prompt-register a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.bk-dashboard-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border-radius: var(--bk-border-radius-sm);
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	border: none;
}

.bk-dashboard-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.bk-dashboard-btn-primary {
	background: var(--bk-primary);
	color: #ffffff;
}

.bk-dashboard-btn-primary:hover {
	background: var(--bk-primary-hover);
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: var(--bk-shadow-md);
}

.bk-dashboard-btn-outline {
	background: transparent;
	color: var(--bk-primary);
	border: 2px solid var(--bk-primary);
}

.bk-dashboard-btn-outline:hover {
	background: var(--bk-primary);
	color: #ffffff;
}

/* ==========================================================================
   Welcome Section
   ========================================================================== */
.bk-dashboard-welcome {
	background: var(--bk-gradient-primary);
	border-radius: var(--bk-border-radius-lg);
	padding: 32px;
	margin-bottom: 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
	color: #ffffff;
}

.bk-welcome-content {
	display: flex;
	align-items: center;
	gap: 20px;
}

.bk-dashboard-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.3);
	box-shadow: var(--bk-shadow-md);
}

.bk-welcome-text h1 {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 8px 0;
	color: #ffffff;
}

.bk-welcome-text p {
	margin: 0;
	opacity: 0.9;
	font-size: 1rem;
}

.bk-welcome-date {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.2);
	padding: 10px 16px;
	border-radius: var(--bk-border-radius-sm);
	font-weight: 500;
}

.bk-welcome-date .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ==========================================================================
   Stats Section
   ========================================================================== */
.bk-dashboard-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

.bk-stat-card {
	background: var(--bk-bg-primary);
	border-radius: var(--bk-border-radius);
	padding: 24px;
	display: flex;
	align-items: center;
	gap: 16px;
	box-shadow: var(--bk-shadow);
	border: 1px solid var(--bk-border-color);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bk-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--bk-shadow-md);
}

.bk-stat-card.bk-stat-highlight {
	border-color: var(--bk-warning);
	background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
}

.bk-stat-icon {
	width: 56px;
	height: 56px;
	border-radius: var(--bk-border-radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.bk-stat-icon .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #ffffff;
}

.bk-stat-groups {
	background: var(--bk-primary);
}

.bk-stat-members {
	background: var(--bk-success);
}

.bk-stat-pending {
	background: var(--bk-warning);
}

.bk-stat-events {
	background: var(--bk-info);
}

.bk-stat-content {
	display: flex;
	flex-direction: column;
}

.bk-stat-value {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--bk-text-primary);
	line-height: 1.2;
}

.bk-stat-label {
	font-size: 0.875rem;
	color: var(--bk-text-secondary);
	font-weight: 500;
}

/* ==========================================================================
   Dashboard Grid Layout
   ========================================================================== */
.bk-dashboard-grid {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 32px;
}

.bk-dashboard-main {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.bk-dashboard-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.bk-dashboard-section {
	background: var(--bk-bg-primary);
	border-radius: var(--bk-border-radius);
	padding: 24px;
	box-shadow: var(--bk-shadow);
	border: 1px solid var(--bk-border-color);
}

.bk-section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--bk-border-color);
}

.bk-section-header h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0;
	color: var(--bk-text-primary);
}

.bk-section-header h2 .dashicons {
	color: var(--bk-primary);
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.bk-view-all {
	color: var(--bk-primary);
	font-weight: 600;
	font-size: 0.875rem;
	text-decoration: none;
}

.bk-view-all:hover {
	text-decoration: underline;
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.bk-empty-state {
	text-align: center;
	padding: 48px 24px;
}

.bk-empty-state .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: var(--bk-text-muted);
	margin-bottom: 16px;
}

.bk-empty-state h3 {
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0 0 8px 0;
	color: var(--bk-text-primary);
}

.bk-empty-state p {
	color: var(--bk-text-secondary);
	margin: 0 0 20px 0;
}

.bk-empty-state-small {
	padding: 24px 16px;
}

.bk-empty-state-small .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
	margin-bottom: 12px;
}

/* ==========================================================================
   Groups Grid
   ========================================================================== */
.bk-groups-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}

.bk-group-card {
	display: block;
	background: var(--bk-bg-primary);
	border-radius: var(--bk-border-radius);
	overflow: hidden;
	text-decoration: none;
	border: 1px solid var(--bk-border-color);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bk-group-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--bk-shadow-lg);
}

.bk-group-card-image {
	height: 120px;
	background: var(--bk-gradient-cool);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.bk-group-card-image .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
	color: rgba(255, 255, 255, 0.6);
}

.bk-role-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: var(--bk-primary);
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.bk-group-card-content {
	padding: 16px;
}

.bk-group-card-content h3 {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 6px 0;
	color: var(--bk-text-primary);
}

.bk-group-type {
	display: inline-block;
	font-size: 0.75rem;
	color: var(--bk-text-muted);
	background: var(--bk-bg-tertiary);
	padding: 4px 10px;
	border-radius: 4px;
	margin-bottom: 10px;
}

.bk-group-meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.bk-member-count {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 0.875rem;
	color: var(--bk-text-secondary);
}

.bk-member-count .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* ==========================================================================
   Activity Feed
   ========================================================================== */
.bk-activity-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.bk-activity-item {
	display: flex;
	gap: 14px;
	padding: 14px;
	background: var(--bk-bg-secondary);
	border-radius: var(--bk-border-radius-sm);
	transition: background 0.2s ease;
}

.bk-activity-item:hover {
	background: var(--bk-bg-tertiary);
}

.bk-activity-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.bk-activity-icon .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: #ffffff;
}

.bk-activity-member {
	background: var(--bk-success);
}

.bk-activity-update {
	background: var(--bk-info);
}

.bk-activity-event {
	background: var(--bk-warning);
}

.bk-activity-content {
	flex: 1;
	min-width: 0;
}

.bk-activity-text {
	margin: 0 0 6px 0;
	font-size: 0.9375rem;
	color: var(--bk-text-primary);
}

.bk-activity-text strong {
	font-weight: 600;
}

.bk-activity-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.8125rem;
	color: var(--bk-text-muted);
}

.bk-activity-group {
	font-weight: 500;
	color: var(--bk-text-secondary);
}

.bk-activity-time::before {
	content: '•';
	margin-right: 8px;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.bk-dashboard-widget {
	background: var(--bk-bg-primary);
	border-radius: var(--bk-border-radius);
	padding: 20px;
	box-shadow: var(--bk-shadow);
	border: 1px solid var(--bk-border-color);
}

.bk-widget-header {
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--bk-border-color);
}

.bk-widget-header h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	color: var(--bk-text-primary);
}

.bk-widget-header h3 .dashicons {
	color: var(--bk-primary);
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* ==========================================================================
   Events List
   ========================================================================== */
.bk-events-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bk-event-item {
	display: flex;
	gap: 14px;
	padding: 12px;
	background: var(--bk-bg-secondary);
	border-radius: var(--bk-border-radius-sm);
	text-decoration: none;
	transition: background 0.2s ease;
}

.bk-event-item:hover {
	background: var(--bk-bg-tertiary);
}

.bk-event-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: var(--bk-primary);
	border-radius: var(--bk-border-radius-sm);
	flex-shrink: 0;
}

.bk-event-month {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.8);
	letter-spacing: 0.5px;
}

.bk-event-day {
	font-size: 1.25rem;
	font-weight: 700;
	color: #ffffff;
	line-height: 1;
}

.bk-event-info {
	flex: 1;
	min-width: 0;
}

.bk-event-info h4 {
	font-size: 0.9375rem;
	font-weight: 600;
	margin: 0 0 4px 0;
	color: var(--bk-text-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bk-event-time {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 0.8125rem;
	color: var(--bk-text-muted);
}

.bk-event-time .dashicons {
	font-size: 12px;
	width: 12px;
	height: 12px;
}

/* ==========================================================================
   Quick Links
   ========================================================================== */
.bk-quick-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bk-quick-links li {
	margin: 0;
}

.bk-quick-links a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	color: var(--bk-text-primary);
	text-decoration: none;
	border-radius: var(--bk-border-radius-sm);
	transition: background 0.2s ease, color 0.2s ease;
	font-weight: 500;
}

.bk-quick-links a:hover {
	background: var(--bk-bg-secondary);
	color: var(--bk-primary);
}

.bk-quick-links a .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: var(--bk-text-muted);
	transition: color 0.2s ease;
}

.bk-quick-links a:hover .dashicons {
	color: var(--bk-primary);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
	.bk-dashboard-grid {
		grid-template-columns: 1fr;
	}

	.bk-dashboard-sidebar {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.bk-dashboard-widget {
		flex: 1;
		min-width: 280px;
	}
}

@media (max-width: 768px) {
	.bk-dashboard-welcome {
		flex-direction: column;
		text-align: center;
		padding: 24px 20px;
	}

	.bk-welcome-content {
		flex-direction: column;
	}

	.bk-welcome-text h1 {
		font-size: 1.5rem;
	}

	.bk-dashboard-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.bk-stat-card {
		padding: 16px;
	}

	.bk-stat-icon {
		width: 44px;
		height: 44px;
	}

	.bk-stat-icon .dashicons {
		font-size: 22px;
		width: 22px;
		height: 22px;
	}

	.bk-stat-value {
		font-size: 1.5rem;
	}

	.bk-groups-grid {
		grid-template-columns: 1fr;
	}

	.bk-dashboard-sidebar {
		flex-direction: column;
	}

	.bk-dashboard-widget {
		min-width: 100%;
	}
}

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

	.bk-section-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.bk-activity-item {
		flex-direction: column;
		align-items: flex-start;
	}

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

	.bk-activity-time::before {
		display: none;
	}
}
