/*
Theme Name: ysto

Mini Cart Notification Drawer Styles
*/

/* Mini Cart Overlay */
#cart-notification-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 40;
	display: none;
}

#cart-notification-overlay.show {
	display: block;
}

/* Mini Cart Drawer */
#cart-notification-drawer {
	position: fixed;
	right: 0;
	top: 0;
	height: 100vh;
	width: 0;
	background-color: white;
	box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.1);
	z-index: 50;
	overflow: hidden;
	transition: width 0.3s ease;
}

#cart-notification-drawer.open {
	width: 100%;
}

@media (min-width: 768px) {
	#cart-notification-drawer.open {
		width: 400px;
	}
}

/* Drawer Content */
.cart-drawer-content {
 padding-top:24px;
	width: 100%;
	max-width: 100%;
	height: 100%;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

@media (min-width: 768px) {
	.cart-drawer-content {
		width: 400px;
	}
}

/* Drawer Header */
.cart-drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
	flex-shrink: 0;
}

.cart-drawer-title {
	font-size: 1.5rem;
	font-weight: 400;
	margin: 0;
	color: #171717;
}

.close-cart-notification {
	

}

.close-cart-notification:hover {
	opacity: 0.7;
}

.close-cart-notification svg {
	width: 1.5rem;
	height: 1.5rem;
}

/* Cart Content */
#cart-notification-content {
	margin-bottom: 1.5rem;
	height: 100%;
	overflow: hidden;
}

.cart-item-message {
	color: #171717;
	margin-bottom: 1rem;
}

/* Mini Cart Content Container */
.minicart-content {
	height: 100%;
	display: flex;
	flex-direction: column;
}

/* Mini Cart Items */
.minicart-items {
	padding-bottom: 1rem;
	padding-left:16px;
	padding-right:16px;
}

.minicart-item {
	padding: 1rem 0;
	border-bottom: 1px solid #f5f5f5;
}

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

.minicart-item-image img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 0.375rem;
}

/* Product Name and Links */
.minicart-item a {
	text-decoration: none;
}

.minicart-item a:hover {
	text-decoration: underline;
}

/* Price Display */
.pricing-display .text-neutral-400 {
	color: #a3a3a3;
}

.pricing-display .text-neutral-900 {
	color: #171717;
}

/* Save Badge */
.minicart-item .bg-green-100 {
	background-color: #dcfce7;
	color: #166534;
	font-size: 0.75rem;
	padding: 0.25rem 0.5rem;
	border-radius: 0.25rem;
	font-weight: 500;
}

/* Quantity Controls */
.quantity-controls {
	display: flex;
	align-items: center;
	border: 1px solid #d4d4d4;
	border-radius: 0.375rem;
	overflow: hidden;
}

.quantity-decrease,
.quantity-increase {
	background-color: #fafafa;
	border: none;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.125rem;
	font-weight: 500;
	color: #525252;
	cursor: pointer;
	transition: background-color 0.2s;
}

.quantity-decrease:hover,
.quantity-increase:hover {
	background-color: #f5f5f5;
}

.quantity-input {
	width: 3rem;
	height: 2rem;
	text-align: center;
	border: none;
	font-size: 0.875rem;
	background-color: white;
}

.quantity-input:focus {
	outline: none;
}

/* Remove Button */
.remove-item {
	color: #a3a3a3;
	cursor: pointer;
	padding: 0.25rem;
	transition: color 0.2s;
}

.remove-item:hover {
	color: #ef4444;
}

/* Sticky Bottom Section */
.minicart-bottom {
	flex-shrink: 0;
	margin-top: auto;
	background-color: #fafafa;
	border-top: 1px solid #e5e5e5;
	margin-left: -1.5rem;
	margin-right: -1.5rem;
	margin-bottom: -1.5rem;
	padding: 1rem 1.5rem 1.5rem 1.5rem;
}

/* Cart Summary */
.minicart-summary {
	padding-bottom: 1rem;
}

.minicart-summary .text-neutral-600 {
	color: #525252;
}

.minicart-summary .text-neutral-900 {
	color: #171717;
}

/* Ensure summary text isn't truncated */
.minicart-summary span {
	max-width: none;
	white-space: nowrap;
}

/* Actions */
.cart-drawer-actions,
.minicart-actions {
	margin-top: 0;
}

.cart-action-btn {
	display: block;
	width: 100%;
	padding: 0.875rem 1.5rem;
	text-align: center;
	text-decoration: none;
	border-radius: 0.375rem;
	font-weight: 500;
	transition: all 0.2s;
	border: none;
	cursor: pointer;
	font-size: 0.875rem;
}

.cart-action-primary {
	background-color: #171717;
	color: white;
}

.cart-action-primary:hover {
	background-color: #262626;
	color: white;
}

.cart-action-secondary {
	background-color: transparent;
	color: #525252;
	border: 1px solid #d4d4d4;
}

.cart-action-secondary:hover {
	background-color: #fafafa;
	color: #171717;
}

/* Empty Cart */
.minicart-empty {
	text-align: center;
	padding: 2rem 2rem;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.minicart-empty svg {
	width: 4rem;
	height: 4rem;
	margin: 0 auto 1rem;
	color: #d4d4d4;
}

.minicart-empty p {
	color: #737373;
	margin-bottom: 1rem;
}

/* Loading Animation */
.animate-spin {
	animation: spin 1s linear infinite;
}

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

/* Drawer Animations */
.cart-drawer-enter {
	width: 0;
}

.cart-drawer-enter-active {
	width: 400px;
	transition: width 0.3s ease;
}

.cart-drawer-exit {
	width: 400px;
}

.cart-drawer-exit-active {
	width: 0;
	transition: width 0.3s ease;
}

/* Hide WooCommerce notices in mini cart context */
.woocommerce-notices-wrapper {
	display: none !important;
}

/* Removal Message */
.removal-message {
	position: fixed;
	top: 1.5rem;
	left: 50%;
	transform: translateX(-50%);
	background-color: #1f2937;
	color: white;
	padding: 1rem 1.5rem;
	border-radius: 0.5rem;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	z-index: 50;
	transition: all 0.3s ease-out;
	opacity: 0;
	transform: translateX(-50%) translateY(0.5rem);
	min-width: 18rem;
	max-width: 28rem;
}

.removal-message.fade-out {
	opacity: 0;
	transform: translateX(-50%) translateY(0.5rem);
}

/* Mobile Responsive */
@media (max-width: 767px) {
	.minicart-item {
		padding: 0.75rem 0;
	}

	.minicart-item-image img {
		width: 60px;
		height: 60px;
	}

	.quantity-controls {
		scale: 0.9;
	}

	.removal-message {
		left: 1rem;
		right: 1rem;
		transform: none;
		min-width: auto;
		max-width: none;
	}
} 