/**
 * Member Dashboard Styles
 *
 * TPGEO branded styles for member dashboard widgets.
 * Uses dark + gold theme matching /join page color scheme.
 *
 * @package TPGEO\Modules\MemberDashboard
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

.tpgeo-dashboard-widget {
	/* Colors - matching /join page dark + gold theme */
	--tpgeo-bg-deep: #1a1a1ad9;
	--tpgeo-bg: #1A1A1A;
	--tpgeo-bg-elevated: #242424;
	--tpgeo-bg-card: #242424;
	--tpgeo-border: #333333;
	--tpgeo-border-light: #444444;
	--tpgeo-text: #F2EADC;
	--tpgeo-text-muted: #A0A0A0;
	--tpgeo-text-dim: #6b6b6b;

	/* Gold palette */
	--tpgeo-gold: #C5A059;
	--tpgeo-gold-light: #E2C68E;
	--tpgeo-gold-dark: #A8864A;
	--tpgeo-gold-bg: rgba(197, 160, 89, 0.1);
	--tpgeo-gold-border: rgba(197, 160, 89, 0.3);

	/* Accents */
	--tpgeo-accent: #C5A059;
	--tpgeo-accent-green: #76B852;
	--tpgeo-accent-red: #f87171;

	/* Legacy aliases for compatibility */
	--tpgeo-dark: #1A1A1A;
	--tpgeo-dark-card: #242424;
	--tpgeo-dark-elevated: #2a2a2a;
	--tpgeo-accent-light: #E2C68E;
	--tpgeo-success: #76B852;
	--tpgeo-warning: #E2C68E;
	--tpgeo-error: #f87171;

	/* Gradients */
	--tpgeo-gradient-gold: linear-gradient(135deg, #C5A059 0%, #E2C68E 50%, #C5A059 100%);
	--tpgeo-gradient-gold-glow: radial-gradient(circle, rgba(197, 160, 89, 0.15) 0%, rgba(26, 26, 26, 0) 70%);
	--tpgeo-gradient-divider: linear-gradient(90deg, transparent 0%, #333333 50%, transparent 100%);

	/* Fonts */
	--tpgeo-font-display: 'IMFellEnglishSC', serif;
	--tpgeo-font-body: 'CrimsonPro', serif;
	--tpgeo-font-ui: 'Inter', sans-serif;

	/* Spacing */
	--tpgeo-spacing-xs: 4px;
	--tpgeo-spacing-sm: 8px;
	--tpgeo-spacing-md: 16px;
	--tpgeo-spacing-lg: 24px;
	--tpgeo-spacing-xl: 32px;

	/* Typography */
	--tpgeo-font-size-xs: 0.75rem;
	--tpgeo-font-size-sm: 0.875rem;
	--tpgeo-font-size-base: 1rem;
	--tpgeo-font-size-lg: 1.25rem;
	--tpgeo-font-size-xl: 1.5rem;
	--tpgeo-font-size-2xl: 2rem;

	/* Effects */
	--tpgeo-radius: 8px;
	--tpgeo-radius-lg: 12px;
	--tpgeo-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	--tpgeo-transition: 0.2s ease;
}

/* ==========================================================================
   Widget Base
   ========================================================================== */

.tpgeo-dashboard-widget {
	background: var(--tpgeo-dark-card);
	border: 1px solid var(--tpgeo-gold-border);
	border-radius: var(--tpgeo-radius-lg);
	padding: var(--tpgeo-spacing-lg);
	color: var(--tpgeo-text);
	font-family: inherit;
	margin-bottom: var(--tpgeo-spacing-lg);
}

.tpgeo-widget__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--tpgeo-spacing-md);
	padding-bottom: var(--tpgeo-spacing-md);
	border-bottom: 1px solid var(--tpgeo-gold-border);
	gap: var(--tpgeo-spacing-sm);
}

.tpgeo-widget__header h3 {
	margin: 0;
	font-size: var(--tpgeo-font-size-lg);
	font-weight: 600;
	color: var(--tpgeo-gold);
}

.tpgeo-widget__body {
	margin-bottom: var(--tpgeo-spacing-md);
}

.tpgeo-widget__footer {
	padding-top: var(--tpgeo-spacing-md);
	border-top: 1px solid var(--tpgeo-gold-border);
}

.tpgeo-widget__link {
	color: var(--tpgeo-gold);
	text-decoration: none;
	font-size: var(--tpgeo-font-size-sm);
	transition: color var(--tpgeo-transition);
}

.tpgeo-widget__link:hover {
	color: var(--tpgeo-gold-light);
}

/* ==========================================================================
   Login Required
   ========================================================================== */

.tpgeo-login-required {
	text-align: center;
	padding: var(--tpgeo-spacing-xl);
}

.tpgeo-login-required p {
	color: var(--tpgeo-text-muted);
	margin-bottom: var(--tpgeo-spacing-md);
}

/* ==========================================================================
   Tier Badge
   ========================================================================== */

.tpgeo-tier-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 9999px;
	font-size: var(--tpgeo-font-size-xs);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.tpgeo-tier-badge--combined {
	background: var(--tpgeo-accent-green);
	color: #fff;
}

.tpgeo-tier-badge--wargaming,
.tpgeo-tier-badge--rpg {
	background: var(--tpgeo-gold);
	color: var(--tpgeo-dark);
}

.tpgeo-tier-badge--none {
	background: var(--tpgeo-dark-elevated);
	color: var(--tpgeo-text-muted);
}

/* ==========================================================================
   Stats
   ========================================================================== */

.tpgeo-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: var(--tpgeo-spacing-md);
}

.tpgeo-stat {
	margin-bottom: var(--tpgeo-spacing-sm);
}

.tpgeo-stat--inline {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.tpgeo-stat__label {
	display: block;
	font-size: var(--tpgeo-font-size-xs);
	color: var(--tpgeo-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 4px;
}

.tpgeo-stat__value {
	font-size: var(--tpgeo-font-size-xl);
	font-weight: 700;
	color: var(--tpgeo-gold);
}

.tpgeo-stat__value--small {
	font-size: var(--tpgeo-font-size-lg);
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.tpgeo-progress {
	display: flex;
	align-items: center;
	gap: var(--tpgeo-spacing-sm);
	flex: 1;
}

.tpgeo-progress__bar {
	flex: 1;
	height: 8px;
	background: var(--tpgeo-dark-elevated);
	border-radius: 4px;
	overflow: hidden;
	position: relative;
}

.tpgeo-progress__bar::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: var(--progress, 0%);
	background: linear-gradient(90deg, var(--tpgeo-gold), var(--tpgeo-accent-green));
	border-radius: 4px;
	transition: width 0.3s ease;
}

.tpgeo-progress__label {
	font-size: var(--tpgeo-font-size-xs);
	color: var(--tpgeo-text-muted);
	white-space: nowrap;
}

/* ==========================================================================
   Badge
   ========================================================================== */

.tpgeo-badge {
	display: inline-block;
	padding: 2px 8px;
	background: var(--tpgeo-gold-bg);
	border: 1px solid var(--tpgeo-gold-border);
	border-radius: 9999px;
	font-size: var(--tpgeo-font-size-xs);
	color: var(--tpgeo-gold);
}

.tpgeo-badge--new {
	background: var(--tpgeo-accent-green);
	border-color: var(--tpgeo-accent-green);
	color: #fff;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.tpgeo-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--tpgeo-spacing-sm);
	padding: 10px 20px;
	border: none;
	border-radius: var(--tpgeo-radius);
	font-size: var(--tpgeo-font-size-sm);
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: all var(--tpgeo-transition);
}

.tpgeo-button--primary {
	background: var(--tpgeo-gold);
	color: var(--tpgeo-dark);
}

.tpgeo-button--primary:hover {
	background: var(--tpgeo-gold-light);
}

.tpgeo-button--secondary {
	background: transparent;
	border: 1px solid var(--tpgeo-gold-border);
	color: var(--tpgeo-gold);
}

.tpgeo-button--secondary:hover {
	background: var(--tpgeo-gold-bg);
}

.tpgeo-button--small {
	padding: 6px 12px;
	font-size: var(--tpgeo-font-size-xs);
}

/* ==========================================================================
   Checklist
   ========================================================================== */

.tpgeo-checklist {
	list-style: none;
	padding: 0;
	margin: 0;
}

.tpgeo-checklist-item {
	display: flex;
	align-items: flex-start;
	gap: var(--tpgeo-spacing-md);
	padding: var(--tpgeo-spacing-md) 0;
	border-bottom: 1px solid var(--tpgeo-gold-border);
}

.tpgeo-checklist-item:last-child {
	border-bottom: none;
}

.tpgeo-checklist-item__toggle {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	flex-shrink: 0;
}

.tpgeo-checklist-item__check {
	width: 24px;
	height: 24px;
	border: 2px solid var(--tpgeo-gold-border);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all var(--tpgeo-transition);
	color: transparent;
	font-size: 12px;
}

.tpgeo-checklist-item--complete .tpgeo-checklist-item__check {
	background: var(--tpgeo-accent-green);
	border-color: var(--tpgeo-accent-green);
	color: #fff;
}

.tpgeo-checklist-item__content {
	flex: 1;
	min-width: 0;
}

.tpgeo-checklist-item__label {
	display: block;
	font-weight: 500;
	color: var(--tpgeo-text);
	margin-bottom: 2px;
}

.tpgeo-checklist-item--complete .tpgeo-checklist-item__label {
	text-decoration: line-through;
	color: var(--tpgeo-text-muted);
}

.tpgeo-checklist-item__description {
	display: block;
	font-size: var(--tpgeo-font-size-sm);
	color: var(--tpgeo-text-muted);
}

.tpgeo-checklist-item__cta {
	display: inline-block;
	margin-top: var(--tpgeo-spacing-sm);
	padding: 6px 12px;
	background: var(--tpgeo-gold);
	color: var(--tpgeo-dark);
	border-radius: 4px;
	font-size: var(--tpgeo-font-size-sm);
	font-weight: 500;
	text-decoration: none;
	transition: background var(--tpgeo-transition);
}

.tpgeo-checklist-item__cta:hover {
	background: var(--tpgeo-gold-light);
	color: var(--tpgeo-dark);
}

.tpgeo-checklist-item--complete .tpgeo-checklist-item__cta {
	display: none;
}

.tpgeo-checklist__dismiss {
	background: none;
	border: none;
	color: var(--tpgeo-text-muted);
	cursor: pointer;
	padding: 4px 8px;
	font-size: 18px;
	line-height: 1;
	transition: color var(--tpgeo-transition);
}

.tpgeo-checklist__dismiss:hover {
	color: var(--tpgeo-text);
}

/* Locked checklist item styles */
.tpgeo-checklist-item--locked {
	opacity: 0.7;
}

.tpgeo-checklist-item--locked .tpgeo-checklist-item__check--locked {
	border-color: var(--tpgeo-text-dim);
	background: var(--tpgeo-dark-elevated);
	color: var(--tpgeo-text-dim);
}

.tpgeo-checklist-item--locked .tpgeo-checklist-item__check--locked .tpgeo-icon--lock {
	width: 12px;
	height: 12px;
}

.tpgeo-checklist-item--locked .tpgeo-checklist-item__label {
	color: var(--tpgeo-text-muted);
}

.tpgeo-checklist-item__locked-badge {
	display: inline-block;
	margin-left: var(--tpgeo-spacing-sm);
	padding: 2px 6px;
	background: var(--tpgeo-accent-green);
	color: #fff;
	border-radius: 4px;
	font-size: var(--tpgeo-font-size-xs);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	vertical-align: middle;
}

.tpgeo-checklist-item--locked .tpgeo-checklist-item__description {
	color: var(--tpgeo-text-dim);
	font-style: italic;
}

.tpgeo-checklist-item__cta--upgrade {
	background: transparent;
	border: 1px solid var(--tpgeo-accent-green);
	color: var(--tpgeo-accent-green);
}

.tpgeo-checklist-item__cta--upgrade:hover {
	background: var(--tpgeo-accent-green);
	color: #fff;
}

/* Checklist Mobile Responsive */
@media (max-width: 768px) {
	.tpgeo-checklist-item {
		gap: var(--tpgeo-spacing-sm);
		padding: var(--tpgeo-spacing-sm) 0;
	}

	.tpgeo-checklist-item__check {
		width: 20px;
		height: 20px;
		font-size: 10px;
	}

	.tpgeo-checklist-item__label {
		font-size: var(--tpgeo-font-size-sm);
	}

	.tpgeo-checklist-item__description {
		font-size: var(--tpgeo-font-size-xs);
	}

	.tpgeo-checklist-item__cta {
		padding: 5px 10px;
		font-size: var(--tpgeo-font-size-xs);
	}

	.tpgeo-checklist-item__locked-badge {
		padding: 1px 4px;
		font-size: 0.65rem;
	}
}

@media (max-width: 480px) {
	.tpgeo-onboarding-checklist .tpgeo-widget__header {
		flex-direction: column;
		align-items: stretch;
	}

	.tpgeo-onboarding-checklist .tpgeo-widget__header h3 {
		font-size: var(--tpgeo-font-size-base);
	}

	.tpgeo-onboarding-checklist .tpgeo-progress {
		flex-direction: column;
		align-items: stretch;
		gap: var(--tpgeo-spacing-xs);
	}

	.tpgeo-onboarding-checklist .tpgeo-progress__bar {
		height: 6px;
	}

	.tpgeo-onboarding-checklist .tpgeo-progress__label {
		text-align: center;
	}

	.tpgeo-checklist-item {
		flex-direction: row;
		align-items: flex-start;
		gap: var(--tpgeo-spacing-sm);
	}

	.tpgeo-checklist-item__check {
		width: 18px;
		height: 18px;
		font-size: 9px;
		border-width: 1.5px;
		margin-top: 2px;
	}

	.tpgeo-checklist-item__content {
		min-width: 0;
	}

	.tpgeo-checklist-item__label {
		font-size: var(--tpgeo-font-size-xs);
		line-height: 1.3;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--tpgeo-spacing-xs);
	}

	.tpgeo-checklist-item__locked-badge {
		font-size: 0.6rem;
		padding: 1px 3px;
		margin-left: 0;
	}

	.tpgeo-checklist-item__description {
		font-size: 0.7rem;
		line-height: 1.4;
	}

	.tpgeo-checklist-item__cta {
		display: block;
		width: 100%;
		text-align: center;
		padding: 8px 12px;
		margin-top: var(--tpgeo-spacing-sm);
	}

	.tpgeo-checklist__dismiss {
		position: absolute;
		top: var(--tpgeo-spacing-sm);
		right: var(--tpgeo-spacing-sm);
		padding: 2px 6px;
		font-size: 16px;
	}

	.tpgeo-onboarding-checklist {
		position: relative;
	}

	/* Locked item adjustments */
	.tpgeo-checklist-item--locked .tpgeo-checklist-item__check--locked .tpgeo-icon--lock {
		width: 10px;
		height: 10px;
	}
}

/* Touch-friendly tap targets */
@media (pointer: coarse) {
	.tpgeo-checklist-item__toggle {
		min-width: 44px;
		min-height: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: -10px;
		padding: 10px;
	}

	.tpgeo-checklist-item__cta {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
}

/* ==========================================================================
   Mobile Checklist Drawer
   ========================================================================== */

/* Collapsed drawer trigger (visible on mobile when collapsed) */
.tpgeo-checklist-drawer__trigger {
	display: none;
}

@media (max-width: 600px) {
	/* Fixed bottom drawer on mobile */
	.tpgeo-onboarding-checklist--mobile-drawer {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 1000;
		margin: 0;
		border-radius: var(--tpgeo-radius-lg) var(--tpgeo-radius-lg) 0 0;
		max-height: 85vh;
		transition: transform 0.3s ease-out;
		box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
	}

	/* Collapsed state - only show trigger bar */
	.tpgeo-onboarding-checklist--mobile-drawer.tpgeo-checklist--collapsed {
		transform: translateY(calc(100% - 56px));
	}

	/* Drawer trigger bar */
	.tpgeo-checklist-drawer__trigger {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: var(--tpgeo-spacing-sm) var(--tpgeo-spacing-md);
		background: var(--tpgeo-dark-elevated);
		border-bottom: 1px solid var(--tpgeo-gold-border);
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.tpgeo-checklist-drawer__trigger:active {
		background: var(--tpgeo-dark);
	}

	.tpgeo-checklist-drawer__summary {
		display: flex;
		align-items: center;
		gap: var(--tpgeo-spacing-sm);
	}

	.tpgeo-checklist-drawer__icon {
		width: 24px;
		height: 24px;
		background: var(--tpgeo-gold);
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		color: var(--tpgeo-dark);
		font-size: 12px;
		font-weight: 700;
	}

	.tpgeo-checklist-drawer__title {
		font-size: var(--tpgeo-font-size-sm);
		font-weight: 600;
		color: var(--tpgeo-text);
	}

	.tpgeo-checklist-drawer__progress-mini {
		display: flex;
		align-items: center;
		gap: var(--tpgeo-spacing-sm);
	}

	.tpgeo-checklist-drawer__progress-bar {
		width: 60px;
		height: 4px;
		background: var(--tpgeo-dark);
		border-radius: 2px;
		overflow: hidden;
	}

	.tpgeo-checklist-drawer__progress-bar::after {
		content: '';
		display: block;
		height: 100%;
		width: var(--progress, 0%);
		background: var(--tpgeo-gold);
		border-radius: 2px;
		transition: width 0.3s ease;
	}

	.tpgeo-checklist-drawer__progress-count {
		font-size: var(--tpgeo-font-size-xs);
		color: var(--tpgeo-text-muted);
		white-space: nowrap;
	}

	.tpgeo-checklist-drawer__chevron {
		width: 20px;
		height: 20px;
		color: var(--tpgeo-text-muted);
		transition: transform 0.3s ease;
	}

	.tpgeo-checklist--collapsed .tpgeo-checklist-drawer__chevron {
		transform: rotate(180deg);
	}

	/* Content area */
	.tpgeo-checklist-drawer__content {
		max-height: calc(85vh - 56px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	/* Hide regular header in drawer mode */
	.tpgeo-onboarding-checklist--mobile-drawer .tpgeo-widget__header {
		display: none;
	}

	/* Adjust padding in drawer mode */
	.tpgeo-onboarding-checklist--mobile-drawer {
		padding: 0;
	}

	.tpgeo-onboarding-checklist--mobile-drawer .tpgeo-checklist {
		padding: var(--tpgeo-spacing-md);
	}

	/* Add safe area padding for notched phones */
	.tpgeo-onboarding-checklist--mobile-drawer .tpgeo-checklist {
		padding-bottom: calc(var(--tpgeo-spacing-md) + env(safe-area-inset-bottom, 0px));
	}

	/* Backdrop when drawer is expanded */
	.tpgeo-checklist-backdrop {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 999;
		opacity: 0;
		transition: opacity 0.3s ease;
	}

	.tpgeo-checklist-backdrop--visible {
		display: block;
		opacity: 1;
	}

	/* Spacer to prevent content being hidden behind fixed drawer */
	.tpgeo-checklist-drawer__spacer {
		height: 70px;
	}
}

/* Desktop - ensure drawer styles don't apply */
@media (min-width: 601px) {
	.tpgeo-checklist-drawer__trigger,
	.tpgeo-checklist-drawer__spacer,
	.tpgeo-checklist-backdrop {
		display: none !important;
	}

	.tpgeo-onboarding-checklist--mobile-drawer {
		position: static;
		transform: none;
		max-height: none;
		box-shadow: none;
	}

	.tpgeo-onboarding-checklist--mobile-drawer .tpgeo-widget__header {
		display: flex;
	}

	.tpgeo-onboarding-checklist--mobile-drawer {
		padding: var(--tpgeo-spacing-lg);
	}

	.tpgeo-checklist-drawer__content {
		max-height: none;
		overflow: visible;
	}
}

/* ==========================================================================
   Download List
   ========================================================================== */

.tpgeo-download-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.tpgeo-download-item {
	display: flex;
	align-items: center;
	gap: var(--tpgeo-spacing-md);
	padding: var(--tpgeo-spacing-sm) 0;
	border-bottom: 1px solid var(--tpgeo-gold-border);
}

.tpgeo-download-item:last-child {
	border-bottom: none;
}

.tpgeo-download-item__thumb {
	width: 48px;
	height: 48px;
	border-radius: var(--tpgeo-radius);
	object-fit: cover;
	background: var(--tpgeo-dark-elevated);
	flex-shrink: 0;
}

.tpgeo-download-item__content {
	flex: 1;
	min-width: 0;
}

.tpgeo-download-item__name {
	display: block;
	color: var(--tpgeo-text);
	text-decoration: none;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tpgeo-download-item__name:hover {
	color: var(--tpgeo-gold);
}

.tpgeo-download-item__date {
	display: block;
	font-size: var(--tpgeo-font-size-xs);
	color: var(--tpgeo-text-muted);
}

/* ==========================================================================
   Savings Highlight
   ========================================================================== */

.tpgeo-savings__highlight {
	text-align: center;
	padding: var(--tpgeo-spacing-lg) 0;
}

.tpgeo-savings__amount {
	display: block;
	font-size: var(--tpgeo-font-size-2xl);
	font-weight: 700;
	color: var(--tpgeo-accent-green);
}

.tpgeo-savings__label {
	display: block;
	font-size: var(--tpgeo-font-size-sm);
	color: var(--tpgeo-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: var(--tpgeo-spacing-xs);
}

.tpgeo-savings__details {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--tpgeo-spacing-md);
	padding-top: var(--tpgeo-spacing-md);
	border-top: 1px solid var(--tpgeo-gold-border);
}

/* ==========================================================================
   Linked Accounts
   ========================================================================== */

.tpgeo-accounts-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.tpgeo-account {
	display: flex;
	align-items: center;
	gap: var(--tpgeo-spacing-md);
	padding: var(--tpgeo-spacing-md) 0;
	border-bottom: 1px solid var(--tpgeo-gold-border);
}

.tpgeo-account:last-child {
	border-bottom: none;
}

.tpgeo-account__icon {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tpgeo-dark-elevated);
	border-radius: var(--tpgeo-radius);
	flex-shrink: 0;
}

.tpgeo-account__icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.tpgeo-account__name {
	flex: 1;
	font-weight: 500;
}

.tpgeo-account__status {
	font-size: var(--tpgeo-font-size-sm);
	color: var(--tpgeo-accent-green);
}

.tpgeo-account--disconnected .tpgeo-account__status {
	color: var(--tpgeo-text-muted);
}

.tpgeo-account__action {
	font-size: var(--tpgeo-font-size-sm);
	color: var(--tpgeo-gold);
	text-decoration: none;
}

.tpgeo-account__action:hover {
	color: var(--tpgeo-gold-light);
}

/* ==========================================================================
   Product Grid (Recent Releases)
   ========================================================================== */

.tpgeo-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: var(--tpgeo-spacing-md);
}

.tpgeo-product-card {
	background: var(--tpgeo-dark-elevated);
	border-radius: var(--tpgeo-radius);
	overflow: hidden;
	transition: transform var(--tpgeo-transition), box-shadow var(--tpgeo-transition);
}

.tpgeo-product-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--tpgeo-shadow);
}

.tpgeo-product-card__thumb {
	position: relative;
	aspect-ratio: 1;
	background: var(--tpgeo-dark);
}

.tpgeo-product-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tpgeo-product-card__badge {
	position: absolute;
	top: var(--tpgeo-spacing-sm);
	right: var(--tpgeo-spacing-sm);
}

.tpgeo-product-card__content {
	padding: var(--tpgeo-spacing-sm);
}

.tpgeo-product-card__name {
	display: block;
	color: var(--tpgeo-text);
	text-decoration: none;
	font-size: var(--tpgeo-font-size-sm);
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tpgeo-product-card__name:hover {
	color: var(--tpgeo-gold);
}

.tpgeo-product-card__date {
	font-size: var(--tpgeo-font-size-xs);
	color: var(--tpgeo-text-muted);
}

/* ==========================================================================
   Announcements
   ========================================================================== */

.tpgeo-announcement-list {
	display: flex;
	flex-direction: column;
	gap: var(--tpgeo-spacing-md);
}

.tpgeo-announcement {
	display: flex;
	gap: var(--tpgeo-spacing-md);
	padding-bottom: var(--tpgeo-spacing-md);
	border-bottom: 1px solid var(--tpgeo-gold-border);
}

.tpgeo-announcement:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.tpgeo-announcement__thumb {
	width: 80px;
	height: 60px;
	border-radius: var(--tpgeo-radius);
	object-fit: cover;
	background: var(--tpgeo-dark-elevated);
	flex-shrink: 0;
}

.tpgeo-announcement__content {
	flex: 1;
	min-width: 0;
}

.tpgeo-announcement__title {
	display: block;
	color: var(--tpgeo-text);
	text-decoration: none;
	font-weight: 500;
	margin-bottom: var(--tpgeo-spacing-xs);
}

.tpgeo-announcement__title:hover {
	color: var(--tpgeo-gold);
}

.tpgeo-announcement__excerpt {
	font-size: var(--tpgeo-font-size-sm);
	color: var(--tpgeo-text-muted);
	margin-bottom: var(--tpgeo-spacing-xs);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tpgeo-announcement__meta {
	font-size: var(--tpgeo-font-size-xs);
	color: var(--tpgeo-text-muted);
}

/* ==========================================================================
   File Updates
   ========================================================================== */

.tpgeo-update-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.tpgeo-update-item {
	display: flex;
	align-items: center;
	gap: var(--tpgeo-spacing-md);
	padding: var(--tpgeo-spacing-sm) 0;
	border-bottom: 1px solid var(--tpgeo-gold-border);
}

.tpgeo-update-item:last-child {
	border-bottom: none;
}

.tpgeo-update-item__thumb {
	width: 40px;
	height: 40px;
	border-radius: var(--tpgeo-radius);
	object-fit: cover;
	background: var(--tpgeo-dark-elevated);
	flex-shrink: 0;
}

.tpgeo-update-item__content {
	flex: 1;
	min-width: 0;
}

.tpgeo-update-item__name {
	display: block;
	color: var(--tpgeo-text);
	text-decoration: none;
	font-weight: 500;
	font-size: var(--tpgeo-font-size-sm);
}

.tpgeo-update-item__name:hover {
	color: var(--tpgeo-gold);
}

.tpgeo-update-item__meta {
	font-size: var(--tpgeo-font-size-xs);
	color: var(--tpgeo-text-muted);
}

.tpgeo-update-item__type {
	background: var(--tpgeo-gold-bg);
	border: 1px solid var(--tpgeo-gold-border);
	padding: 2px 8px;
	border-radius: 4px;
	font-size: var(--tpgeo-font-size-xs);
	color: var(--tpgeo-gold);
	white-space: nowrap;
}

/* ==========================================================================
   Loyalty Roadmap
   ========================================================================== */

.tpgeo-loyalty-roadmap {
	padding: var(--tpgeo-spacing-md);
	background-color: var(--tpgeo-dark-elevated);
	border: 1px solid var(--tpgeo-gold-border);
	border-radius: var(--tpgeo-radius-lg);
	position: relative;
	overflow-x: auto;
}

/* Heading */
.tpgeo-loyalty-roadmap__heading {
	font-size: var(--tpgeo-font-size-lg);
	font-weight: 600;
	color: var(--tpgeo-text);
	margin: 0 0 var(--tpgeo-spacing-md) 0;
}

/* "Months until next" callout box */
.tpgeo-loyalty-roadmap__callout {
	display: inline-flex;
	align-items: center;
	gap: var(--tpgeo-spacing-sm);
	background-color: var(--tpgeo-dark-card);
	border: 1px solid var(--tpgeo-gold);
	border-radius: var(--tpgeo-radius);
	padding: var(--tpgeo-spacing-sm) var(--tpgeo-spacing-md);
	margin-bottom: var(--tpgeo-spacing-lg);
}

.tpgeo-loyalty-roadmap__callout-number {
	font-size: var(--tpgeo-font-size-2xl);
	font-weight: 700;
	color: var(--tpgeo-gold);
}

.tpgeo-loyalty-roadmap__callout-text {
	font-size: var(--tpgeo-font-size-sm);
	color: var(--tpgeo-text-muted);
}

/* Pulse animation for current milestone */
@keyframes tpgeo-pulse-glow {
	0%, 100% {
		box-shadow:
			0 0 0 4px rgba(198, 182, 113, 0.25),
			0 0 16px rgba(198, 182, 113, 0.4);
		transform: scale(1);
	}
	50% {
		box-shadow:
			0 0 0 8px rgba(198, 182, 113, 0.15),
			0 0 24px rgba(198, 182, 113, 0.5);
		transform: scale(1.05);
	}
}

/* ==========================================================================
   Milestone List (Horizontal on Desktop, Vertical on Mobile)
   ========================================================================== */

.tpgeo-loyalty-milestones {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	position: relative;
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	justify-content: space-between !important;
	align-items: flex-start !important;
	gap: var(--tpgeo-spacing-md);
}

/* Horizontal spine running through all milestones on desktop */
.tpgeo-loyalty-milestones::before {
	content: '';
	position: absolute;
	top: 16px;
	left: calc(100% / 14);
	right: calc(100% / 14);
	height: 3px;
	background: linear-gradient(
		to right,
		var(--tpgeo-gold) 0%,
		var(--tpgeo-gold) var(--progress-percent, 0%),
		var(--tpgeo-gold-border) var(--progress-percent, 0%),
		var(--tpgeo-gold-border) 100%
	);
	border-radius: 2px;
}

/* Individual milestone item */
.tpgeo-loyalty-milestone {
	position: relative;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	text-align: center;
	flex: 1 1 0 !important;
	min-width: 60px;
	padding: 0 !important;
	margin: 0 !important;
}

/* Desktop: Explicit horizontal layout */
@media (min-width: 901px) {
	.tpgeo-loyalty-milestones {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
	}

	.tpgeo-loyalty-milestone {
		flex-direction: column !important;
		align-items: center !important;
		text-align: center;
	}

	.tpgeo-loyalty-milestone__node {
		position: relative;
		left: auto;
	}

	.tpgeo-loyalty-milestone__content {
		margin-top: var(--tpgeo-spacing-sm);
	}
}

/* Milestone node (circle marker) */
.tpgeo-loyalty-milestone__node {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 3px solid var(--tpgeo-gold-border);
	background: var(--tpgeo-dark-card);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	flex-shrink: 0;
	transition: all 200ms ease-out;
}

/* Completed milestone (solid filled) */
.tpgeo-loyalty-milestone--complete .tpgeo-loyalty-milestone__node {
	border-color: var(--tpgeo-gold);
	background: linear-gradient(135deg, var(--tpgeo-gold-light) 0%, var(--tpgeo-gold) 100%);
	color: var(--tpgeo-dark);
	box-shadow: 0 0 8px rgba(198, 182, 113, 0.4);
}

.tpgeo-loyalty-milestone__check {
	width: 16px;
	height: 16px;
}

/* Current milestone (filled with pulse glow) */
.tpgeo-loyalty-milestone--current .tpgeo-loyalty-milestone__node {
	border-color: var(--tpgeo-gold);
	background: linear-gradient(135deg, var(--tpgeo-gold-light) 0%, var(--tpgeo-gold) 100%);
	color: var(--tpgeo-dark);
	box-shadow:
		0 0 0 4px rgba(198, 182, 113, 0.25),
		0 0 16px rgba(198, 182, 113, 0.4);
	animation: tpgeo-pulse-glow 2s ease-in-out infinite;
}

/* Pending milestone (hollow outlined) */
.tpgeo-loyalty-milestone--pending .tpgeo-loyalty-milestone__node {
	border-color: var(--tpgeo-gold-border);
	background: var(--tpgeo-dark-card);
	opacity: 0.7;
}

/* Milestone content (label + reward) */
.tpgeo-loyalty-milestone__content {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: var(--tpgeo-spacing-sm);
	max-width: 100%;
}

.tpgeo-loyalty-milestone__label {
	font-size: var(--tpgeo-font-size-sm);
	font-weight: 700;
	color: var(--tpgeo-text);
}

.tpgeo-loyalty-milestone--pending .tpgeo-loyalty-milestone__label {
	color: var(--tpgeo-text-muted);
}

.tpgeo-loyalty-milestone__reward {
	font-size: var(--tpgeo-font-size-xs);
	color: var(--tpgeo-text-muted);
	line-height: 1.3;
}

.tpgeo-loyalty-milestone--complete .tpgeo-loyalty-milestone__reward {
	color: var(--tpgeo-gold);
}

/* "You are here" badge */
.tpgeo-loyalty-milestone__badge {
	background: var(--tpgeo-gold);
	color: var(--tpgeo-dark);
	font-size: var(--tpgeo-font-size-xs);
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 4px;
	white-space: nowrap;
	margin-top: var(--tpgeo-spacing-xs);
}

/* Product thumbnail */
.tpgeo-loyalty-milestone__thumb {
	width: 48px;
	height: 48px;
	border-radius: var(--tpgeo-radius);
	overflow: hidden;
	flex-shrink: 0;
	margin-bottom: var(--tpgeo-spacing-xs);
	border: 2px solid var(--tpgeo-dark-elevated);
	transition: border-color var(--tpgeo-transition);
}

.tpgeo-loyalty-milestone__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tpgeo-loyalty-milestone__thumb a {
	display: block;
}

.tpgeo-loyalty-milestone__thumb:hover {
	border-color: var(--tpgeo-gold);
}

.tpgeo-loyalty-milestone--complete .tpgeo-loyalty-milestone__thumb {
	border-color: var(--tpgeo-gold);
}

.tpgeo-loyalty-milestone--pending .tpgeo-loyalty-milestone__thumb {
	opacity: 0.5;
	filter: grayscale(50%);
}

/* Reward name as link */
a.tpgeo-loyalty-milestone__reward {
	text-decoration: none;
	transition: color var(--tpgeo-transition);
}

a.tpgeo-loyalty-milestone__reward:hover {
	color: var(--tpgeo-gold-light);
}

.tpgeo-loyalty-milestone--complete a.tpgeo-loyalty-milestone__reward:hover {
	text-decoration: underline;
}

/* Tablet/Mobile: stack vertically */
@media (max-width: 900px) {
	.tpgeo-loyalty-milestones {
		flex-direction: column !important;
		align-items: stretch !important;
		padding-left: 48px !important;
		gap: 0 !important;
	}

	/* Vertical spine on mobile */
	.tpgeo-loyalty-milestones::before {
		top: 16px;
		bottom: 16px;
		left: 17px;
		right: auto;
		width: 3px;
		height: auto;
		background: linear-gradient(
			to bottom,
			var(--tpgeo-gold) 0%,
			var(--tpgeo-gold) var(--progress-percent, 0%),
			var(--tpgeo-gold-border) var(--progress-percent, 0%),
			var(--tpgeo-gold-border) 100%
		);
	}

	.tpgeo-loyalty-milestone {
		flex-direction: row !important;
		align-items: center !important;
		text-align: left;
		padding: var(--tpgeo-spacing-md) 0 !important;
		gap: var(--tpgeo-spacing-md);
	}

	.tpgeo-loyalty-milestone__node {
		position: absolute;
		left: -48px;
	}

	.tpgeo-loyalty-milestone__content {
		margin-top: 0;
		flex: 0 1 auto;
	}

	.tpgeo-loyalty-milestone__badge {
		margin-top: 0;
		margin-left: var(--tpgeo-spacing-sm);
	}

	.tpgeo-loyalty-milestone__thumb {
		width: 40px;
		height: 40px;
		margin-bottom: 0;
		order: 1;
	}

	.tpgeo-loyalty-milestone__content {
		order: 2;
	}
}

/* Screen-reader-only utility */
.tpgeo-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Zero-streak state */
.tpgeo-loyalty-roadmap--zero {
	text-align: center;
}

.tpgeo-loyalty-roadmap__zero-message {
	font-size: var(--tpgeo-font-size-base);
	color: var(--tpgeo-text-muted);
	margin: 0;
}

/* Smaller mobile adjustments */
@media (max-width: 480px) {
	.tpgeo-loyalty-milestones {
		padding-left: 40px !important;
	}

	.tpgeo-loyalty-milestones::before {
		left: 13px;
	}

	.tpgeo-loyalty-milestone__node {
		width: 28px;
		height: 28px;
		left: -40px;
	}

	.tpgeo-loyalty-milestone__check {
		width: 14px;
		height: 14px;
	}

	.tpgeo-loyalty-roadmap__callout {
		flex-direction: column;
		gap: var(--tpgeo-spacing-xs);
		text-align: center;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.tpgeo-loyalty-milestone__node {
		transition: none;
	}

	.tpgeo-loyalty-milestone--current .tpgeo-loyalty-milestone__node {
		animation: none;
	}
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.tpgeo-empty-state {
	text-align: center;
	padding: var(--tpgeo-spacing-xl);
	color: var(--tpgeo-text-muted);
}

.tpgeo-empty-state__icon {
	font-size: 48px;
	margin-bottom: var(--tpgeo-spacing-md);
	opacity: 0.5;
}

.tpgeo-empty-state__message {
	margin-bottom: var(--tpgeo-spacing-md);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.tpgeo-dashboard-widget {
		padding: var(--tpgeo-spacing-md);
	}

	.tpgeo-widget__header {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--tpgeo-spacing-sm);
	}

	.tpgeo-stats-grid {
		grid-template-columns: 1fr 1fr;
	}

	.tpgeo-savings__details {
		grid-template-columns: 1fr;
	}

	.tpgeo-product-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.tpgeo-announcement {
		flex-direction: column;
	}

	.tpgeo-announcement__thumb {
		width: 100%;
		height: 120px;
	}
}
