/**
 * Hot or Not Voting Component Styles
 * Designed to integrate seamlessly with BuddyX theme member cards
 */

/* Main voting component container */
.hon-voting-component {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 12px 0;
	margin: 12px 0;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	text-align: center;
}

/* Vote score section */
.hon-voting-score {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

/* Score badge (percentage) */
.hon-score-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 60px;
	padding: 8px 12px;
	background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
	border-radius: 8px;
	color: white;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hon-score-badge:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.hon-hot-percent {
	font-size: 24px;
	line-height: 1;
	display: block;
}

.hon-hot-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 4px;
	opacity: 0.95;
}

/* Vote counts display */
.hon-vote-counts {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #666;
	font-weight: 500;
}

.hon-count {
	display: inline-block;
	min-width: 28px;
	padding: 4px 8px;
	background: rgba(0, 0, 0, 0.04);
	border-radius: 4px;
	transition: background 0.2s ease;
}

.hon-count.hot-count {
	background: rgba(255, 107, 107, 0.08);
	color: #ff6b6b;
}

.hon-count.not-count {
	background: rgba(100, 100, 100, 0.08);
	color: #666;
}

.hon-count-divider {
	color: #ddd;
	font-weight: 300;
}

/* Voting buttons container */
.hon-voting-buttons {
	display: flex;
	gap: 8px;
	justify-content: center;
}

/* Individual vote button */
.hon-vote-button {
	flex: 1;
	max-width: 120px;
	padding: 10px 16px;
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	background: white;
	color: #333;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	outline: none;
	position: relative;
}

.hon-vote-button:hover {
	border-color: #ccc;
	background: #f9f9f9;
	transform: translateY(-1px);
}

.hon-vote-button:active {
	transform: translateY(0);
}

.hon-vote-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Hot button styling */
.hon-hot-button {
	border-color: #ff6b6b;
	color: #ff6b6b;
}

.hon-hot-button:hover:not(:disabled) {
	background: rgba(255, 107, 107, 0.05);
	border-color: #ff5252;
}

.hon-hot-button.voted {
	background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
	color: white;
	border-color: #ff5252;
	box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* Not button styling */
.hon-not-button {
	border-color: #999;
	color: #666;
}

.hon-not-button:hover:not(:disabled) {
	background: rgba(0, 0, 0, 0.04);
	border-color: #666;
}

.hon-not-button.voted {
	background: #f0f0f0;
	color: #333;
	border-color: #666;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Button icons and labels */
.hon-button-icon {
	display: inline-block;
	font-size: 16px;
	line-height: 1;
}

.hon-button-label {
	display: inline-block;
}

/* Loading indicator */
.hon-loading {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 40px;
	gap: 8px;
	font-size: 13px;
	color: #999;
}

.hon-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #e0e0e0;
	border-top-color: #ff6b6b;
	border-radius: 50%;
	animation: hon-spin 0.8s linear infinite;
}

@keyframes hon-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Error message */
.hon-error {
	padding: 10px 12px;
	background: #fee;
	border: 1px solid #fcc;
	border-radius: 4px;
	color: #c33;
	font-size: 12px;
	text-align: center;
}

/* Member card context */
.hon-voting-member-card {
	margin: 12px 0;
}

/* Profile header context */
.hon-voting-profile-header {
	margin-top: 8px;
}

.hon-voting-profile-header .hon-voting-component {
	border: none;
	padding: 16px;
	margin: 0;
	background: var(--color-theme-white-box, #fff);
	border-radius: var(--global-border-radius, 6px);
	border: 1px solid var(--global-border-color, rgba(0, 0, 0, 0.1));
}

/* Keep profile-header buttons side-by-side at all viewport widths */
.hon-voting-profile-header .hon-voting-buttons {
	flex-direction: row;
	justify-content: center;
	flex-wrap: nowrap;
}

.hon-voting-profile-header .hon-vote-button {
	flex: 0 1 auto;
	min-width: 80px;
	max-width: 140px;
	width: auto;
}

/* Always show labels in profile-header context */
.hon-voting-profile-header .hon-button-label {
	display: inline-block;
}

/* Mobile responsive */
@media (max-width: 768px) {
	.hon-voting-component {
		gap: 10px;
		padding: 10px 0;
		margin: 10px 0;
	}

	.hon-voting-score {
		gap: 12px;
	}

	.hon-score-badge {
		min-width: 50px;
		padding: 6px 10px;
	}

	.hon-hot-percent {
		font-size: 20px;
	}

	.hon-hot-label {
		font-size: 10px;
		margin-top: 3px;
	}

	.hon-vote-counts {
		font-size: 12px;
	}

	.hon-voting-buttons {
		gap: 6px;
	}

	/* Only remove max-width constraint on member card buttons at mobile, not profile-header */
	.hon-voting-member-card .hon-vote-button {
		max-width: none;
		padding: 8px 12px;
		font-size: 12px;
	}

	/* Profile header buttons keep their size constraints */
	.hon-voting-profile-header .hon-vote-button {
		padding: 8px 12px;
		font-size: 12px;
	}

	.hon-button-icon {
		font-size: 14px;
	}
}

/* Small screens */
@media (max-width: 480px) {
	/* Stack buttons only on member cards, not profile header */
	.hon-voting-member-card .hon-voting-buttons {
		flex-direction: column;
	}

	.hon-voting-member-card .hon-vote-button {
		max-width: none;
		width: 100%;
	}

	.hon-voting-score {
		flex-wrap: wrap;
	}

	.hon-button-label {
		display: none;
	}

	.hon-button-icon {
		font-size: 18px;
	}
}

/* Accessibility: High contrast mode */
@media (prefers-contrast: more) {
	.hon-vote-button {
		border-width: 3px;
	}

	.hon-score-badge {
		box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.5);
	}
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.hon-score-badge,
	.hon-vote-button,
	.hon-spinner {
		transition: none;
		animation: none;
	}
}

/* Theme override support (for dark mode, etc) */
.dark-mode .hon-voting-component,
[data-theme="dark"] .hon-voting-component {
	border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .hon-vote-button,
[data-theme="dark"] .hon-vote-button {
	background: #222;
	color: #eee;
	border-color: #444;
}

.dark-mode .hon-vote-button:hover:not(:disabled),
[data-theme="dark"] .hon-vote-button:hover:not(:disabled) {
	background: #2a2a2a;
	border-color: #555;
}

.dark-mode .hon-count,
[data-theme="dark"] .hon-count {
	background: rgba(255, 255, 255, 0.08);
	color: #aaa;
}

.dark-mode .hon-count.hot-count,
[data-theme="dark"] .hon-count.hot-count {
	background: rgba(255, 107, 107, 0.15);
	color: #ff8888;
}

.dark-mode .hon-error,
[data-theme="dark"] .hon-error {
	background: #3a1a1a;
	border-color: #6a3a3a;
	color: #ff9999;
}
