/**
 * AutoCoin Affiliate Ranks - Frontend Styles
 * Styled to match AUTOCOIN dark theme with gold accents (#FFB704)
 */

.autocoin-ranks-dashboard {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	background: transparent;
	color: #ffffff;
}

/* SliceWP Integration Styles */
.autocoin-ranks-slicewp-integration {
	max-width: 100%;
	padding: 0;
}

.autocoin-ranks-slicewp-integration .autocoin-ranks-section {
	margin-bottom: 30px;
}

/* Trophy Icon for Ranks Tab - Use Trophy Emoji */
.autocoin-ranks-icon,
.slicewp-icon.autocoin-ranks-icon {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	height: auto !important;
	position: relative !important;
	vertical-align: middle !important;
	margin-right: 12px !important;
	font-size: 18px !important;
	line-height: 1 !important;
}

.autocoin-ranks-icon::before,
.slicewp-icon.autocoin-ranks-icon::before {
	content: '🏆' !important;
	display: inline-block !important;
	font-style: normal !important;
	font-variant: normal !important;
	text-rendering: auto !important;
	line-height: 1 !important;
	font-size: 18px !important;
}

/* Ensure icon shows even if element is empty */
.autocoin-ranks-icon:empty,
.slicewp-icon.autocoin-ranks-icon:empty {
	display: inline-flex !important;
	width: 20px !important;
	height: 20px !important;
}

.autocoin-ranks-icon:empty::before,
.slicewp-icon.autocoin-ranks-icon:empty::before {
	content: '🏆' !important;
	display: inline-block !important;
	font-size: 18px !important;
	line-height: 1 !important;
}

.autocoin-ranks-header {
	margin-bottom: 30px;
	text-align: center;
}

.autocoin-ranks-header h2 {
	font-size: 32px;
	font-weight: 700;
	color: #ffffff;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.autocoin-ranks-section {
	background: rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 183, 4, 0.3);
	border-radius: 12px;
	padding: 30px;
	margin-bottom: 25px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(10px);
}

.autocoin-ranks-section h3 {
	font-size: 24px;
	font-weight: 700;
	color: #FFB704;
	margin: 0 0 20px 0;
	padding-bottom: 15px;
	border-bottom: 2px solid rgba(255, 183, 4, 0.3);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.autocoin-ranks-section h4 {
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
	margin: 0 0 10px 0;
}

/* Current Rank Section */
.autocoin-ranks-current-rank {
	text-align: center;
	background: linear-gradient(135deg, rgba(255, 183, 4, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
	border: 2px solid #FFB704;
}

.rank-badge {
	display: inline-block;
	padding: 25px 50px;
	background: linear-gradient(135deg, rgba(255, 183, 4, 0.2) 0%, rgba(255, 183, 4, 0.05) 100%);
	border-radius: 12px;
	color: #ffffff;
	box-shadow: 0 4px 20px rgba(255, 183, 4, 0.3);
	border: 2px solid #FFB704;
}

.rank-title {
	display: block;
	font-size: 36px;
	font-weight: 700;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: #FFB704;
	text-shadow: 0 2px 10px rgba(255, 183, 4, 0.5);
}

.rank-boost {
	display: block;
	font-size: 18px;
	font-weight: 600;
	color: #FFB704;
	margin-top: 12px;
}

/* Progress Section */
.autocoin-ranks-progress {
	text-align: center;
}

.next-rank-name {
	font-size: 20px;
	font-weight: 600;
	color: #FFB704;
	margin-bottom: 20px;
}

.progress-bar-container {
	width: 100%;
	height: 45px;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 25px;
	overflow: hidden;
	position: relative;
	margin-bottom: 15px;
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 183, 4, 0.2);
}

.progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #FFB704 0%, #ffd54f 100%);
	border-radius: 25px;
	transition: width 0.5s ease;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 20px rgba(255, 183, 4, 0.5);
}

.progress-text {
	color: #000000;
	font-weight: 700;
	font-size: 16px;
	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.progress-details {
	font-size: 16px;
	color: #ffffff;
	margin: 0;
}

/* Stats Section */
.autocoin-ranks-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
}

.stat-item {
	text-align: center;
	padding: 25px;
	background: rgba(0, 0, 0, 0.4);
	border-radius: 10px;
	border: 1px solid rgba(255, 183, 4, 0.2);
	transition: all 0.3s ease;
}

.stat-item:hover {
	background: rgba(255, 183, 4, 0.1);
	border-color: #FFB704;
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(255, 183, 4, 0.2);
}

.stat-item h4 {
	font-size: 14px;
	font-weight: 500;
	color: #ffffff;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 12px;
	opacity: 0.8;
}

.stat-value {
	font-size: 32px;
	font-weight: 700;
	color: #FFB704;
	margin: 0;
	text-shadow: 0 2px 10px rgba(255, 183, 4, 0.3);
}

/* Bonuses Section */
.autocoin-ranks-bonus-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 15px;
}

.autocoin-ranks-bonus-table thead {
	background: rgba(255, 183, 4, 0.1);
}

.autocoin-ranks-bonus-table th {
	padding: 15px;
	text-align: left;
	font-weight: 600;
	font-size: 14px;
	color: #FFB704;
	border-bottom: 2px solid rgba(255, 183, 4, 0.3);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.autocoin-ranks-bonus-table td {
	padding: 15px;
	border-bottom: 1px solid rgba(255, 183, 4, 0.1);
	font-size: 15px;
	color: #ffffff;
}

.autocoin-ranks-bonus-table tbody tr:hover {
	background: rgba(255, 183, 4, 0.05);
}

.status-pending {
	display: inline-block;
	padding: 6px 14px;
	background: rgba(255, 183, 4, 0.2);
	color: #FFB704;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	border: 1px solid rgba(255, 183, 4, 0.4);
}

.status-paid {
	display: inline-block;
	padding: 6px 14px;
	background: rgba(76, 175, 80, 0.2);
	color: #4CAF50;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	border: 1px solid rgba(76, 175, 80, 0.4);
}

/* Milestone Section */
.milestone-info {
	background: rgba(255, 183, 4, 0.05);
	padding: 25px;
	border-radius: 10px;
	border-left: 4px solid #FFB704;
}

.milestone-info ul {
	list-style: none;
	padding: 0;
	margin: 15px 0 0 0;
}

.milestone-info li {
	padding: 10px 0;
	font-size: 16px;
	color: #ffffff;
	border-bottom: 1px solid rgba(255, 183, 4, 0.2);
}

.milestone-info li:last-child {
	border-bottom: none;
}

.milestone-info li:before {
	content: "✓ ";
	color: #FFB704;
	font-weight: 700;
	margin-right: 10px;
	font-size: 18px;
}

/* All Ranks Section */
.autocoin-ranks-all-ranks {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.rank-card {
	background: rgba(0, 0, 0, 0.5);
	border: 2px solid rgba(255, 183, 4, 0.3);
	border-radius: 12px;
	padding: 25px;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.rank-card:hover {
	border-color: #FFB704;
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(255, 183, 4, 0.3);
}

.rank-card.achieved {
	border-color: #FFB704;
	background: rgba(255, 183, 4, 0.1);
}

.rank-card.achieved::before {
	content: "✓";
	position: absolute;
	top: 15px;
	right: 15px;
	width: 30px;
	height: 30px;
	background: #FFB704;
	color: #000000;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 18px;
}

.rank-card h4 {
	font-size: 22px;
	font-weight: 700;
	color: #FFB704;
	margin: 0 0 15px 0;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.rank-card .rank-threshold {
	font-size: 14px;
	color: #ffffff;
	opacity: 0.8;
	margin-bottom: 15px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.rank-card .rank-rewards {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid rgba(255, 183, 4, 0.2);
}

.rank-card .rank-reward-item {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 10px 0;
	color: #ffffff;
	font-size: 15px;
	border-bottom: 1px solid rgba(255, 183, 4, 0.1);
}

.rank-card .rank-reward-item:last-child {
	border-bottom: none;
}

.rank-card .rank-reward-item.rank-perk {
	flex-direction: column;
	gap: 5px;
}

.rank-card .rank-reward-item.rank-perk .rank-reward-value {
	margin-top: 5px;
	font-size: 14px;
}

.rank-card .rank-reward-label {
	opacity: 0.8;
	font-weight: 500;
	min-width: 100px;
}

.rank-card .rank-reward-value {
	font-weight: 700;
	color: #FFB704;
	text-align: right;
	flex: 1;
}

/* Leaderboard Section */
.autocoin-ranks-leaderboard-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 15px;
}

.autocoin-ranks-leaderboard-table thead {
	background: rgba(255, 183, 4, 0.1);
}

.autocoin-ranks-leaderboard-table th {
	padding: 15px;
	text-align: left;
	font-weight: 600;
	font-size: 14px;
	color: #FFB704;
	border-bottom: 2px solid rgba(255, 183, 4, 0.3);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.autocoin-ranks-leaderboard-table td {
	padding: 15px;
	border-bottom: 1px solid rgba(255, 183, 4, 0.1);
	font-size: 15px;
	color: #ffffff;
}

.autocoin-ranks-leaderboard-table tbody tr:hover {
	background: rgba(255, 183, 4, 0.05);
}

.autocoin-ranks-leaderboard-table tbody tr.current-user {
	background: rgba(255, 183, 4, 0.15);
	font-weight: 600;
	border-left: 3px solid #FFB704;
}

.you-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 4px 10px;
	background: #FFB704;
	color: #000000;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.autocoin-ranks-dashboard {
		padding: 15px;
	}
	
	.autocoin-ranks-section {
		padding: 20px;
	}
	
	.autocoin-ranks-header h2 {
		font-size: 24px;
	}
	
	.rank-title {
		font-size: 28px;
	}
	
	.autocoin-ranks-stats {
		grid-template-columns: 1fr;
	}
	
	.autocoin-ranks-all-ranks {
		grid-template-columns: 1fr;
	}
	
	.autocoin-ranks-bonus-table,
	.autocoin-ranks-leaderboard-table {
		font-size: 12px;
	}
	
	.autocoin-ranks-bonus-table th,
	.autocoin-ranks-bonus-table td,
	.autocoin-ranks-leaderboard-table th,
	.autocoin-ranks-leaderboard-table td {
		padding: 10px;
	}
}
