/**
 * Coins System Styles
 *
 * @package Coursee
 * @since 1.0.0
 */

/* ============================================
   USER COINS DISPLAY
   ============================================ */

.coursee-user-coins {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 1.5rem;
	border: 2px solid #000000;
	background: #ffffff;
}

.coins-balance {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.5rem;
	background: #000000;
	color: #ffffff;
	border-radius: 0;
}

.coins-icon {
	font-size: 3rem;
	line-height: 1;
	animation: coinSpin 3s linear infinite;
}

@keyframes coinSpin {
	0% {
		transform: rotateY(0deg);
	}
	100% {
		transform: rotateY(360deg);
	}
}

.coins-amount {
	font-size: 2.5rem;
	font-weight: 900;
	line-height: 1;
	color: #ffffff;
}

.coins-label {
	font-size: 1rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #ffffff;
	opacity: 0.9;
}

.coins-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

.coins-stats .stat-item {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
	border: 2px solid #000000;
	background: #ffffff;
}

.coins-stats .stat-label {
	font-size: 0.875rem;
	color: #6b7280;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.coins-stats .stat-value {
	font-size: 1.5rem;
	font-weight: 700;
	color: #000000;
}

/* ============================================
   COINS HISTORY
   ============================================ */

.coursee-coins-history {
	padding: 2rem 0;
}

.history-title {
	font-size: 2rem;
	font-weight: 700;
	color: #000000;
	margin: 0 0 2rem 0;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding-bottom: 1rem;
	border-bottom: 2px solid #000000;
}

.transactions-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.transaction-item {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 1.5rem;
	align-items: center;
	padding: 1.5rem;
	border: 2px solid #000000;
	background: #ffffff;
	transition: all 0.2s ease;
}

.transaction-item:hover {
	transform: translateX(4px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.transaction-item.earned {
	border-left: 4px solid #10b981;
}

.transaction-item.spent {
	border-left: 4px solid #ef4444;
}

.transaction-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	font-size: 1.5rem;
	font-weight: 700;
	flex-shrink: 0;
}

.transaction-item.earned .transaction-icon {
	background: #10b981;
	color: #ffffff;
}

.transaction-item.spent .transaction-icon {
	background: #ef4444;
	color: #ffffff;
}

.transaction-details {
	flex: 1;
	min-width: 0;
}

.transaction-description {
	font-size: 1rem;
	font-weight: 600;
	color: #000000;
	margin-bottom: 0.5rem;
}

.transaction-date {
	font-size: 0.875rem;
	color: #6b7280;
}

.transaction-amount {
	font-size: 1.5rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.transaction-amount.positive {
	color: #10b981;
}

.transaction-amount.negative {
	color: #ef4444;
}

.coins-symbol {
	font-size: 1.25rem;
}

.no-transactions {
	padding: 3rem 2rem;
	text-align: center;
	border: 2px solid #000000;
	background: #ffffff;
}

.no-transactions p {
	font-size: 1.125rem;
	color: #6b7280;
	margin: 0 0 1rem 0;
}

.no-transactions .hint {
	font-size: 0.9375rem;
	color: #9ca3af;
	font-style: italic;
}

/* ============================================
   COINS SHOP
   ============================================ */

.coursee-coins-shop {
	padding: 2rem 0;
}

.shop-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 2px solid #000000;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.shop-title {
	font-size: 2rem;
	font-weight: 700;
	color: #000000;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.user-balance-display {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
	background: #000000;
	color: #ffffff;
	border-radius: 0;
}

.balance-label {
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.balance-amount {
	font-size: 1.5rem;
	font-weight: 700;
}

.shop-items-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

.shop-item {
	border: 2px solid #000000;
	padding: 2rem;
	background: #ffffff;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	transition: all 0.2s ease;
}

.shop-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.shop-item.out-of-stock {
	opacity: 0.6;
	pointer-events: none;
}

.shop-item.cannot-afford {
	opacity: 0.8;
}

.item-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
}

.item-name {
	font-size: 1.25rem;
	font-weight: 700;
	color: #000000;
	margin: 0;
	flex: 1;
}

.item-type-badge {
	padding: 0.25rem 0.75rem;
	border: 1px solid #000000;
	background: #ffffff;
	color: #000000;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	flex-shrink: 0;
}

.item-description {
	font-size: 0.9375rem;
	color: #6b7280;
	line-height: 1.6;
	flex: 1;
}

.item-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 1rem;
	border-top: 1px solid #e5e7eb;
	flex-wrap: wrap;
	gap: 1rem;
}

.item-cost {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: #000000;
}

.cost-amount {
	font-weight: 900;
}

.item-stock {
	font-size: 0.875rem;
	color: #6b7280;
	font-weight: 600;
}

.purchase-btn.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.no-items {
	padding: 3rem 2rem;
	text-align: center;
	border: 2px solid #000000;
	background: #ffffff;
}

.no-items p {
	font-size: 1.125rem;
	color: #6b7280;
	margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
	.shop-header {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.user-balance-display {
		width: 100%;
		justify-content: center;
	}
	
	.shop-items-grid {
		grid-template-columns: 1fr;
	}
	
	.item-footer {
		flex-direction: column;
		align-items: stretch;
	}
	
	.purchase-btn {
		width: 100%;
	}
}

