/**
 * Dexter Wager UI Styles
 * 
 * Styles for wager popups, pending challenges widget, and related components.
 */

/* ==========================================
   PENDING CHALLENGES WIDGET
   ========================================== */

#pending-wagers-widget {
	background: linear-gradient(145deg, rgba(168,85,247,0.15), rgba(139,92,246,0.08));
	border: 1px solid rgba(168,85,247,0.3);
	border-radius: 16px;
	padding: 16px;
	margin-bottom: 20px;
	animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
	0%, 100% { border-color: rgba(168,85,247,0.3); }
	50% { border-color: rgba(168,85,247,0.6); }
}

.pending-wagers-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pending-icon {
	font-size: 24px;
}

.pending-title {
	flex: 1;
	font-size: 16px;
	font-weight: 600;
	color: #e9d5ff;
}

.pending-count {
	background: #a855f7;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 12px;
	min-width: 24px;
	text-align: center;
}

.pending-wagers-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pending-wager-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: rgba(0,0,0,0.2);
	border-radius: 12px;
	padding: 12px 14px;
	transition: background 0.2s;
}

.pending-wager-item:hover {
	background: rgba(0,0,0,0.3);
}

.pending-wager-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.pending-challenger {
	font-size: 15px;
	font-weight: 600;
	color: #fff;
}

.pending-details {
	font-size: 12px;
	color: #a78bfa;
}

.pending-wager-actions {
	display: flex;
	gap: 8px;
}

.pending-accept {
	padding: 8px 16px;
	background: linear-gradient(135deg, #22c55e, #16a34a);
	border: none;
	border-radius: 8px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
}

.pending-accept:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(34,197,94,0.4);
}

.pending-decline {
	padding: 8px 12px;
	background: rgba(239,68,68,0.2);
	border: 1px solid rgba(239,68,68,0.3);
	border-radius: 8px;
	color: #f87171;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s;
}

.pending-decline:hover {
	background: rgba(239,68,68,0.3);
}

/* ==========================================
   ACCEPT WAGER POPUP
   ========================================== */

.accept-wager-popup {
	min-width: 340px;
	max-width: 400px;
	text-align: center;
}

.awp-header {
	margin-bottom: 20px;
}

.awp-icon {
	font-size: 48px;
	margin-bottom: 8px;
	display: inline-block;
	animation: bounce-icon 1s ease-in-out infinite;
}

@keyframes bounce-icon {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-8px); }
}

.awp-header h2 {
	margin: 0;
	font-size: 24px;
	color: #f59e0b;
	font-weight: 700;
}

.awp-card {
	background: linear-gradient(145deg, rgba(168,85,247,0.2), rgba(139,92,246,0.1));
	border: 1px solid rgba(168,85,247,0.3);
	border-radius: 16px;
	padding: 20px;
	margin-bottom: 16px;
}

.awp-challenger {
	margin-bottom: 16px;
}

.awp-label {
	display: block;
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 4px;
}

.awp-name {
	font-size: 26px;
	font-weight: 700;
	color: #c084fc;
}

.awp-stats {
	display: flex;
	justify-content: space-around;
}

.awp-stat {
	text-align: center;
}

.awp-stat-label {
	display: block;
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.awp-stat-value {
	font-size: 18px;
	font-weight: 600;
	color: #fff;
}

.awp-stat-value.awp-amount {
	color: #4ade80;
}

.awp-winnings {
	background: rgba(34,197,94,0.15);
	border: 1px solid rgba(34,197,94,0.3);
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 12px;
}

.awp-win-label {
	display: block;
	font-size: 12px;
	color: #86efac;
	margin-bottom: 6px;
}

.awp-win-amount {
	font-size: 32px;
	font-weight: 700;
	color: #4ade80;
}

.awp-info {
	background: rgba(245,158,11,0.1);
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 12px;
	font-size: 12px;
	color: #fbbf24;
}

.awp-timer {
	color: #888;
	font-size: 13px;
	margin-bottom: 16px;
}

.awp-countdown {
	color: #f59e0b;
	font-weight: 600;
	font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.awp-actions {
	display: flex;
	gap: 12px;
}

.awp-accept {
	flex: 1;
	padding: 16px 24px;
	background: linear-gradient(135deg, #22c55e, #16a34a);
	border: none;
	border-radius: 12px;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s;
}

.awp-accept:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(34,197,94,0.4);
}

.awp-decline {
	padding: 16px 24px;
	background: rgba(239,68,68,0.2);
	border: 1px solid rgba(239,68,68,0.3);
	border-radius: 12px;
	color: #f87171;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
}

.awp-decline:hover {
	background: rgba(239,68,68,0.3);
}

/* ==========================================
   WAGER POPUP (SEND CHALLENGE)
   ========================================== */

.wager-popup-form {
	min-width: 340px;
}

.wager-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.wager-icon {
	font-size: 40px;
	filter: drop-shadow(0 4px 8px rgba(245,158,11,0.4));
}

.wager-title-group h2 {
	margin: 0;
	font-size: 22px;
	color: #f59e0b;
	font-weight: 700;
}

.wager-subtitle {
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.wallet-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(34,197,94,0.15);
	border: 1px solid rgba(34,197,94,0.3);
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	color: #4ade80;
	margin-bottom: 16px;
}

.wallet-dot {
	width: 8px;
	height: 8px;
	background: #22c55e;
	border-radius: 50%;
	animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

.wager-error-msg {
	display: none;
	background: rgba(239,68,68,0.15);
	border: 1px solid rgba(239,68,68,0.3);
	color: #fca5a5;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 12px;
}

.wager-error-msg.show {
	display: block;
}

.wager-form-grid {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 16px;
}

.wager-field label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #aaa;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
}

.wager-input,
.wager-select {
	width: 100%;
	padding: 12px 14px;
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 10px;
	color: #fff;
	font-size: 15px;
	transition: all 0.2s;
	box-sizing: border-box;
}

.wager-input:focus,
.wager-select:focus {
	outline: none;
	border-color: #f59e0b;
	box-shadow: 0 0 0 3px rgba(245,158,11,0.2);
}

.wager-select {
	cursor: pointer;
}

.amount-input-group {
	display: flex;
	gap: 8px;
}

.amount-quick {
	padding: 8px 12px;
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 8px;
	color: #aaa;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
}

.amount-quick:hover,
.amount-quick.active {
	background: rgba(245,158,11,0.2);
	border-color: #f59e0b;
	color: #f59e0b;
}

.amount-input {
	width: 80px !important;
	text-align: center;
	font-weight: 700;
}

.payout-preview {
	background: rgba(0,0,0,0.3);
	border-radius: 12px;
	padding: 14px;
	margin-bottom: 16px;
}

.payout-row {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	font-size: 14px;
	color: #aaa;
}

.payout-row.highlight {
	border-top: 1px solid rgba(255,255,255,0.1);
	padding-top: 10px;
	margin-top: 4px;
	color: #fff;
	font-weight: 600;
}

.payout-value {
	font-weight: 600;
	color: #fff;
}

.payout-row.highlight .payout-value {
	color: #4ade80;
	font-size: 18px;
}

.payout-fee {
	text-align: center;
	font-size: 11px;
	color: #666;
	margin-top: 8px;
}

.wager-actions {
	display: flex;
	gap: 10px;
}

.wager-submit-btn {
	flex: 1;
	padding: 14px 20px;
	background: linear-gradient(135deg, #f59e0b, #d97706);
	border: none;
	border-radius: 12px;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s;
}

.wager-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(245,158,11,0.4);
}

.wager-cancel-btn {
	padding: 14px 20px;
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 12px;
	color: #888;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s;
}

.wager-cancel-btn:hover {
	background: rgba(255,255,255,0.1);
	color: #fff;
}

/* ==========================================
   WALLET BALANCE DISPLAY
   ========================================== */

.wallet-balance-widget {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(20,184,166,0.15);
	border: 1px solid rgba(20,184,166,0.3);
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 13px;
	color: #5eead4;
}

.wallet-balance-icon {
	font-size: 16px;
}

.wallet-balance-amount {
	font-weight: 600;
	color: #2dd4bf;
}

.wallet-balance-label {
	color: #99f6e4;
	font-size: 11px;
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */

@media (max-width: 480px) {
	.accept-wager-popup,
	.wager-popup-form {
		min-width: auto;
		width: 100%;
	}
	
	.awp-name {
		font-size: 22px;
	}
	
	.awp-win-amount {
		font-size: 26px;
	}
	
	.awp-actions,
	.wager-actions {
		flex-direction: column;
	}
	
	.awp-decline,
	.wager-cancel-btn {
		order: 1;
	}
	
	.amount-input-group {
		flex-wrap: wrap;
	}
	
	.amount-input {
		flex: 1;
		min-width: 60px;
	}
}
