/* Floating WooCommerce Cart Styles */

/* Style for the floating WooCommerce cart container */
#floating-woocart {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 9999;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Hover effect for the cart */
#floating-woocart:hover {
    transform: scale(1.1);
}

/* Style for the cart icon inside the container */
#floating-woocart .cart-icon {
    width: 80%;
    height: 80%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Different cart icons *
.cart-icon.icon1 {
    margin-left: -10px;
}

.cart-icon.icon2 {
    margin-left: -10px;
}

.cart-icon.icon3 {
    margin-left: -10px;
}

.cart-icon.icon4 {
    margin-left: -10px;
}

.cart-icon.icon5 {
    margin-left: -10px;
}
.cart-icon.icon6 {
    margin-left: -10px;
}

.cart-icon {
    margin-left: -10px !important;
}

/* Style for the cart count */
#floating-woocart .cart-count {
    position: absolute;
    background-color: #ff3e3e;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Ensure no default styles from themes affect the cart */
#floating-woocart, #floating-woocart .cart-icon, #floating-woocart .cart-count {
    box-sizing: border-box;
}

/* Shapes for the cart container */
#floating-woocart.round {
    border-radius: 50%;
}

#floating-woocart.square {
    border-radius: 0%;
}

#floating-woocart.diamond {
    transform: rotate(45deg);
    border-radius: 10%;
}

/* Responsive positioning */
@media (max-width: 768px) {
    #floating-woocart {
        width: 50px;
        height: 50px;
    }

    #floating-woocart .cart-count {
        font-size: 12px;
        width: 20px;
        height: 20px;
    }
}

/* Animation for cart appearance */
#floating-woocart {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.settings-tab-content {
	display: none;
	padding: 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-top: none;
}

.settings-tab-content.active-tab {
	display: block;
}

.cart-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: none;
	z-index: 9999;
}

.cart-modal-content {
	width: 70%;
	height: auto; /* Set height dynamically */
	max-height: 85vh; /* Prevent it from being too tall */
	background: #fff;
	margin: 0 auto;
	padding: 0;
	position: absolute;
	top: 60%;
	left: 50%;
	transform: translate(-50%, -50%);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.cart-modal-close {
	position: absolute;
	top: 10px;
	right: 15px;
	font-size: 24px;
	cursor: pointer;
	z-index: 1000;
}

.cart-modal-content iframe {
	width: 100%;
	min-height: 500px; /* Prevent content from being too short */
	border: none;
	display: block;
	overflow: hidden;
}

.cart-modal-close {
	position: absolute;
	top: 10px;
	right: 15px;
	font-size: 24px;
	font-weight: bold;
	color: #333;
	cursor: pointer;
	z-index: 1000;
	background: white;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	text-align: center;
	line-height: 28px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cart-modal-close:hover {
	background: #f44336;
	color: white;
}

/* ===== Slide Cart Styles ===== */
.slide-cart {
	position: fixed;
	background: #fff;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	padding: 0; /* Remove extra padding */
	z-index: 10000;
	transition: transform 0.6s ease-in-out;
	overflow: hidden; /* Prevent double scrollbars */
	border-radius: 0; /* Default no rounded corners */
	display: flex;
	flex-direction: column;
}

/* === Left/Right Slide Cart Settings === */
.slide-cart.left,
.slide-cart.right {
	width: 40% !important;
	height: 80vh !important;
	top: 60px !important;
}

/* === Rounded Corners on the Correct Edges === */
.slide-cart.left {
	left: 0;
	transform: translateX(-100%);
}

.slide-cart.right {
	right: 0;
	transform: translateX(100%);
}

.slide-cart.bottom {
	width: 70% !important;
	height: 50vh !important;
	left: 15% !important;
	bottom: 0;
	transform: translateY(100%);
	border-top-left-radius: 15px;
	border-top-right-radius: 15px;
}

/* === Top Slide Cart Settings === */
.slide-cart.top {
	width: 60% !important;
	height: 50vh !important;
	left: 20% !important;
	top: 100px !important;
	transform: translateY(-100%);
}

/* === Slide-in Animation === */
.slide-cart.visible {
	transform: translate(0, 0);
	transition: transform 0.6s ease-out;
}

/* === Slide-out Animation === */
.slide-cart:not(.visible) {
	transition: transform 0.8s ease-in;
}

/* ===== Slide Cart Header ===== */
.slide-cart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #ddd;
	padding: 15px;
	margin-bottom: 0;
	position: relative;
	flex-shrink: 0;
}

/* Fix for Bottom Slide Cart - Ensures Content Doesn't Overflow Header */
.slide-cart.bottom .slide-cart-header {
	flex-shrink: 0; /* Prevents shrinking */
}

/* Align "Your Cart" to the Right for the Left Slide Cart */
.slide-cart.left .slide-cart-header {
	flex-direction: row-reverse; /* Swap the positions */
}

/* ===== Fixed "X" Close Button Styling ===== */
#slide-cart-close {
	position: absolute;
	top: 10px; /* individual side rules below will override as needed */
	right: 15px; /* individual side rules below will override as needed */
	font-size: 24px;
	font-weight: bold;
	color: #333;
	background: #fff;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	text-align: center;
	line-height: 28px; /* centers the × vertically */
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	z-index: 1000; /* same as modal close button */
}

#slide-cart-close:hover {
	background: #f44336;
	color: #fff;
}

/* Positioning the "X" Higher on All Slide Carts */
.slide-cart.left #slide-cart-close {
	left: 10px;
	top: 5px;
}

.slide-cart.right #slide-cart-close {
	right: 10px;
	top: 5px;
}

.slide-cart.bottom #slide-cart-close {
	right: 10px;
	top: 5px;
}

/* ===== Slide Cart Content Styling ===== */
.slide-cart-content {
	font-size: 14px;
	line-height: 1.4;
	padding: 2px;
	overflow-y: auto;
	flex-grow: 1; /* Makes the content take up remaining space */
	max-height: calc(100% - 60px); /* Prevents it from affecting the header */
}

/* ===== Floating Cart Summary Badge ===== */
#cart-summary-arrow {
	position: fixed;
	bottom: 100px;
	width: 40px;
	height: 40px;
	background: #f44336;
	color: white;
	text-align: center;
	line-height: 40px;
	font-size: 18px;
	cursor: pointer;
	border-radius: 50%;
	transition: opacity 0.3s ease;
}

#cart-summary-arrow.left {
	left: 10px;
}

#cart-summary-arrow.right {
	right: 10px;
}

/* Floating Cart Summary Bubble */
#cart-summary-bubble {
	position: fixed;
	bottom: 150px;
	width: 250px;
	background: white;
	border: 1px solid #ddd;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	padding: 10px;
	display: none; /* Hide by default */
	border-radius: 10px;
	z-index: 9999;
}

#cart-summary-bubble.left {
	left: 10px;
}

#cart-summary-bubble.right {
	right: 10px;
}

/* Make bubble visible when toggled */
#cart-summary-bubble.visible {
	display: block;
}

.cart-summary-header {
	display: flex;
	justify-content: space-between;
	font-weight: bold;
	border-bottom: 1px solid #ddd;
	padding-bottom: 5px;
	margin-bottom: 10px;
}

#cart-summary-close {
	cursor: pointer;
	font-size: 18px;
}

.cart-summary-content ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.cart-summary-content li {
	font-size: 14px;
	padding: 3px 0;
	border-bottom: 1px solid #eee;
}

.go-to-checkout {
	display: block;
	text-align: center;
	background: #0073aa;
	color: white;
	padding: 8px;
	margin-top: 10px;
	text-decoration: none;
	border-radius: 5px;
}

.go-to-checkout:hover {
	background: #005177;
}

#cart-summary-arrow {
	position: fixed;
	font-size: 24px; /* Adjust size of arrow */
	color: white; /* White arrow */
	cursor: pointer;
	transition: opacity 0.3s ease;
	z-index: 9999; /* Ensure it's above other elements */
	background: none !important; /* Remove any background */
	border: none !important;
	width: auto;
	height: auto;
	line-height: normal;
	text-shadow: -1px -1px 0 black,
	1px -1px 0 black,
	-1px  1px 0 black,
	1px  1px 0 black; /* Black border effect */
}

/* Position the arrow based on floating cart position */
#cart-summary-arrow.left {
	left: 10px;
	bottom: 100px;
}

#cart-summary-arrow.right {
	right: 10px;
	bottom: 100px;
}

/* Make sure the arrow is fully visible */
#cart-summary-arrow span {
	display: inline-block;
}

.go-to-checkout {
	display: block;
	text-align: center;
	color: white;
	padding: 8px;
	margin-top: 10px;
	text-decoration: none;
	border-radius: 5px;
	transition: background 0.3s ease;
}

/* When the slide cart has no header, let content use full height */
.slide-cart.no-header .slide-cart-content {
    max-height: 100% !important;
    height: 100% !important;
    padding: 0 !important; /* avoid thin white line */
    overflow: hidden;      /* iframe will handle scrolling */
}
