/**
 * Frontend styles for Some Plus Content Reactions
 *
 * @package SomePlusContentReactions
 */

/* Base container styles */
.spcr-reactions {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 2rem 0;
	padding: 1.5rem;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-radius: 16px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.spcr-reactions-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

/* Reaction button styles */
.spcr-reaction-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1rem 1.25rem;
	min-width: 70px;
	border: 2px solid transparent;
	border-radius: 12px;
	background: #ffffff;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	position: relative;
	overflow: hidden;
}

.spcr-reaction-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.spcr-reaction-btn:hover {
	transform: translateY(-4px) scale(1.05);
	box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
	border-color: #6366f1;
}

.spcr-reaction-btn:hover::before {
	opacity: 1;
}

.spcr-reaction-btn:active {
	transform: translateY(-2px) scale(1.02);
}

.spcr-reaction-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.spcr-reaction-btn:disabled:hover {
	transform: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	border-color: transparent;
}

/* Active state */
.spcr-reaction-btn.spcr-active {
	border-color: #6366f1;
	background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
	box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.spcr-reaction-btn.spcr-active .spcr-emoji {
	animation: spcr-bounce 0.5s ease;
}

/* Emoji styles */
.spcr-emoji {
	font-size: 2rem;
	line-height: 1;
	transition: transform 0.2s ease;
	position: relative;
	z-index: 1;
}

.spcr-reaction-btn:hover .spcr-emoji {
	transform: scale(1.2);
}

/* Count styles */
.spcr-count {
	font-size: 0.875rem;
	font-weight: 600;
	color: #4b5563;
	margin-top: 0.5rem;
	position: relative;
	z-index: 1;
	transition: color 0.2s ease;
}

.spcr-reaction-btn.spcr-active .spcr-count {
	color: #4f46e5;
}

/* Login message */
.spcr-login-message {
	margin-top: 1rem;
	font-size: 0.875rem;
	color: #6b7280;
}

.spcr-login-message a {
	color: #6366f1;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.spcr-login-message a:hover {
	color: #4f46e5;
	text-decoration: underline;
}

/* Disabled state */
.spcr-reactions.spcr-disabled {
	opacity: 0.7;
}

/* Display styles */

/* Inline style */
.spcr-reactions.spcr-style-inline {
	background: transparent;
	box-shadow: none;
	padding: 1rem 0;
}

.spcr-style-inline .spcr-reaction-btn {
	padding: 0.5rem 0.75rem;
	min-width: auto;
	flex-direction: row;
	gap: 0.5rem;
}

.spcr-style-inline .spcr-emoji {
	font-size: 1.5rem;
}

.spcr-style-inline .spcr-count {
	margin-top: 0;
}

/* Floating style */
.spcr-reactions.spcr-style-floating {
	position: fixed;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	padding: 1rem;
	z-index: 9999;
	flex-direction: column;
}

.spcr-style-floating .spcr-reactions-inner {
	flex-direction: column;
}

.spcr-style-floating .spcr-reaction-btn {
	padding: 0.75rem;
	min-width: auto;
}

.spcr-style-floating .spcr-emoji {
	font-size: 1.5rem;
}

.spcr-style-floating .spcr-count {
	font-size: 0.75rem;
}

/* Animations */
@keyframes spcr-bounce {
	0%, 100% {
		transform: scale(1);
	}
	25% {
		transform: scale(1.3);
	}
	50% {
		transform: scale(0.9);
	}
	75% {
		transform: scale(1.1);
	}
}

@keyframes spcr-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
	}
}

.spcr-reaction-btn.spcr-animating {
	animation: spcr-pulse 0.5s ease-out;
}

/* Loading state */
.spcr-reaction-btn.spcr-loading {
	pointer-events: none;
}

.spcr-reaction-btn.spcr-loading .spcr-emoji {
	animation: spcr-spin 1s linear infinite;
}

@keyframes spcr-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Responsive */
@media (max-width: 768px) {
	.spcr-reactions {
		padding: 1rem;
	}

	.spcr-reaction-btn {
		padding: 0.75rem 1rem;
		min-width: 60px;
	}

	.spcr-emoji {
		font-size: 1.75rem;
	}

	.spcr-reactions.spcr-style-floating {
		position: relative;
		left: auto;
		top: auto;
		transform: none;
	}

	.spcr-style-floating .spcr-reactions-inner {
		flex-direction: row;
	}
}

@media (max-width: 480px) {
	.spcr-reactions-inner {
		gap: 0.5rem;
	}

	.spcr-reaction-btn {
		padding: 0.5rem 0.75rem;
		min-width: 50px;
	}

	.spcr-emoji {
		font-size: 1.5rem;
	}

	.spcr-count {
		font-size: 0.75rem;
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.spcr-reactions {
		background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
	}

	.spcr-reaction-btn {
		background: #374151;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	}

	.spcr-reaction-btn:hover {
		box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
	}

	.spcr-reaction-btn.spcr-active {
		background: linear-gradient(135deg, #312e81 0%, #3730a3 100%);
	}

	.spcr-count {
		color: #d1d5db;
	}

	.spcr-reaction-btn.spcr-active .spcr-count {
		color: #c7d2fe;
	}

	.spcr-login-message {
		color: #9ca3af;
	}
}
