/* WooCommerce Floating Cart Popup Styles */

.wcfc-popup-content button { border: 0!important; }

/* Floating Button */
.wcfc-floating-button {
	position: fixed;
	width: 60px;
	height: 60px;
	background: #333;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
	z-index: 9998;
	color: #fff;
}

.wcfc-floating-button:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Position variations */
.wcfc-position-bottom-right {
	bottom: 30px;
	right: 30px;
}

.wcfc-position-bottom-left {
	top: 30px;
	left: 30px;
}

.wcfc-position-top-right {
	top: 30px;
	right: 30px;
}

.wcfc-position-top-left {
	top: 30px;
	left: 30px;
}

.wcfc-cart-icon {
	width: 28px;
	height: 28px;
	transition: transform 0.3s ease;
}

.wcfc-floating-button:hover .wcfc-cart-icon {
	transform: scale(1.1);
}

/* Cart Count Badge */
.wcfc-cart-count {
	position: absolute;
	top: -8px;
	right: -8px;
	background: #ff4444;
	color: white;
	font-size: 12px;
	font-weight: bold;
	min-width: 20px;
	height: 20px;
	line-height: 20px;
	text-align: center;
	border-radius: 10px;
	padding: 0 6px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	animation: wcfc-badge-pop 0.3s ease;
}

@keyframes wcfc-badge-pop {
	0% {
		transform: scale(0);
	}
	50% {
		transform: scale(1.2);
	}
	100% {
		transform: scale(1);
	}
}

/* Popup Overlay */
.wcfc-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	z-index: 9999;
}

.wcfc-popup-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Popup Container */
.wcfc-popup {
	position: fixed;
	right: -400px;
	top: 0;
	width: 400px;
	height: 100%;
	background: #fff;
	box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
	transition: right 0.3s ease;
	z-index: 10000;
	display: flex;
	flex-direction: column;
}

.wcfc-popup.active {
	right: 0;
}

/* Popup Header */
.wcfc-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid #e0e0e0;
	background: #f8f8f8;
}

.wcfc-popup-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #333;
}

.wcfc-close-popup {
	background: none;
	border: none;
	font-size: 28px;
	color: #666;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.wcfc-close-popup:hover {
	background: #f0f0f0;
	color: #333;
}

/* Popup Content */
.wcfc-popup-content {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
}

/* Empty Cart */
.wcfc-empty-cart {
	text-align: center;
	padding: 60px 20px;
}

.wcfc-empty-icon {
	color: #ddd;
	margin-bottom: 20px;
}

.wcfc-empty-cart p {
	color: #666;
	font-size: 16px;
	margin: 0 0 20px;
}

.wcfc-continue-shopping {
	display: inline-block;
	padding: 12px 24px;
	background: #333;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	transition: background 0.3s ease;
}

.wcfc-continue-shopping:hover {
	background: #555;
	color: #fff;
}

/* Cart Items */
.wcfc-cart-items {
	margin-bottom: 20px;
}

.wcfc-cart-item {
	display: flex;
	gap: 15px;
	padding: 15px 0;
	border-bottom: 1px solid #e0e0e0;
	position: relative;
}

.wcfc-cart-item:last-child {
	border-bottom: none;
}

.wcfc-product-image {
	flex: 0 0 80px;
}

.wcfc-product-image img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
}

.wcfc-product-details {
	flex: 1;
	min-width: 0;
}

.wcfc-product-name {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
}

.wcfc-product-name a {
	text-decoration: none;
}

.wcfc-product-name a:hover {
	color: #F16621;
}

.wcfc-product-meta {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-top: 8px;
}

.wcfc-product-price {
	color: #666;
	font-size: 14px;
}

/* Quantity Controls */
.wcfc-quantity-wrapper {
	display: flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.wcfc-quantity-btn {
	width: 30px;
	height: 30px;
	background: #f8f8f8;
	border: none;
	cursor: pointer;
	font-size: 16px;
	color: #666;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wcfc-quantity-btn:hover {
	background: #e0e0e0;
	color: #333;
}

.wcfc-quantity-input {
	width: 40px;
	height: 30px;
	border: none;
	text-align: center;
	font-size: 14px;
	margin-bottom: 0;
	-moz-appearance: textfield;
}

.wcfc-quantity-input::-webkit-inner-spin-button,
.wcfc-quantity-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.wcfc-product-subtotal {
	font-weight: 600;
	margin-top: 8px;
	font-size: 14px;
}

/* Remove Item Button */
.wcfc-remove-item {
	position: absolute;
	top: 15px;
	right: 0;
	background: none;
	border: none;
	color: #999;
	cursor: pointer;
	padding: 4px;
	transition: color 0.2s ease;
}

.wcfc-remove-item:hover {
	color: #ff4444;
}

/* Cart Footer */
.wcfc-cart-footer {
	border-top: 2px solid #e0e0e0;
	padding: 20px;
	background: #f8f8f8;
	position: sticky;
	bottom: 0;
}

.wcfc-cart-totals {
	margin-bottom: 20px;
}

.wcfc-cart-totals > div {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	font-size: 14px;
}

.wcfc-total {
	font-size: 18px;
	font-weight: 600;
	border-top: 1px solid #ddd;
	margin-top: 8px;
	padding-top: 12px;
}

/* Cart Actions */
.wcfc-cart-actions {
	display: flex;
	gap: 10px;
}

.wcfc-view-cart,
.wcfc-checkout {
	flex: 1;
	padding: 12px;
	text-align: center;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 500;
	transition: all 0.3s ease;
	font-size: 14px;
}

.wcfc-view-cart {
	background: #fff;
	color: #333;
	border: 2px solid #333;
}

.wcfc-view-cart:hover {
	background: #333;
	color: #fff;
}

.wcfc-checkout {
	background: #F16621;
	color: #fff;
	border: 2px solid #F16621;
}

.wcfc-checkout:hover {
	background: #F16621;
	border-color: #F16621;
}

/* Loading State */
.wcfc-loading {
	position: relative;
	opacity: 0.6;
	pointer-events: none;
}

.wcfc-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 30px;
	height: 30px;
	margin: -15px 0 0 -15px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #333;
	border-radius: 50%;
	animation: wcfc-spin 1s linear infinite;
}

@keyframes wcfc-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
	.wcfc-popup {
		width: 100%;
		right: -100%;
	}

	.wcfc-floating-button {
		width: 50px;
		height: 50px;
	}

	.wcfc-cart-icon {
		width: 24px;
		height: 24px;
	}

	.wcfc-position-bottom-right,
	.wcfc-position-bottom-left {
		bottom: 20px;
	}

	.wcfc-position-bottom-right,
	.wcfc-position-top-right {
		right: 20px;
	}

	.wcfc-position-bottom-left,
	.wcfc-position-top-left {
		left: 20px;
	}

	.wcfc-product-image {
		flex: 0 0 60px;
	}

	.wcfc-product-image img {
		width: 60px;
		height: 60px;
	}

	.wcfc-cart-actions {
		flex-direction: column;
	}
}

/* Animations */
.wcfc-item-removing {
	animation: wcfc-slide-out 0.3s ease forwards;
}

@keyframes wcfc-slide-out {
	to {
		transform: translateX(100%);
		opacity: 0;
	}
}

.wcfc-cart-updated {
	animation: wcfc-pulse 0.5s ease;
}

@keyframes wcfc-pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
}

/* Accessibility */
.wcfc-floating-button:focus,
.wcfc-close-popup:focus,
.wcfc-quantity-btn:focus,
.wcfc-remove-item:focus {
	outline: 2px solid #F16621;
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.wcfc-floating-button {
		border: 2px solid currentColor;
	}

	.wcfc-popup {
		border-left: 2px solid currentColor;
	}
}
