/* extensions/dropshipt-bundler-block/assets/carousel.css */
/* 
--upsell_products_section_bg_color: ${config?.upsell_products_section_bg_color || "#FFFFFF"};
: ${config?.upsell_products_carousel_card_bg_color || "#a7a7a7"};
--upsell_products_add_button_bg_color: ${config?.upsell_products_add_button_bg_color || #000000};
--upsell_products_add_button_text_color: ${config?.upsell_products_add_button_text_color || "#FFFFFF"};
*/

/* Swiper Carousel Styles */
.atlas-upsell-cart-carousel-container {
  /* border-bottom: 1px solid rgba(0, 0, 0, 0.1); */
  padding-top: 16px;
  padding-bottom: 16px;
  background-color: var(--upsell_products_section_bg_color);
}

/* This rule needs to be specific enough to override the general one if needed, 
   or the general one needs to be adjusted. For now, keeping as is. */
.atlas-upsell-cart-items-container .atlas-upsell-cart-carousel-container {
  /* border-bottom: none; */
  /* border-top: 1px solid #e1e3e5;
  margin-top: 16px; */
}

.atlas-upsell-cart-carousel-title {
  font-size: 16px;
  font-weight: 600;
  /* color: var(--cart_drawer_text_color); Should be inherited or set in JS if dynamic */
  margin-bottom: 12px;
  padding: 0 16px;
}

.atlas-upsell-cart-swiper {
  width: 100%;
  height: auto;
  padding: 0 16px; /* Ensures padding for slides and navigation */
  position: relative;
}

.atlas-upsell-cart-swiper .swiper-slide {
  background: var(--upsell_products_carousel_card_bg_color);
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  padding: 15px;
  box-sizing: border-box;
}

/* 
.atlas-upsell-cart-swiper .swiper-slide:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
 */

.atlas-upsell-cart-slide-image {
  width: 80px; /* Fixed size for consistency */
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.atlas-upsell-cart-slide-title {
  font-size: 14px;
  font-weight: 500;
  /* color: var(--cart_drawer_text_color); */
  margin-bottom: 4px;
  line-height: 1.2;
  /* Basic text overflow handling */
  max-height: 2.4em; /* Limits to two lines based on line-height */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.atlas-upsell-cart-slide-price {
  font-size: 14px;
  /* color: var(--cart_drawer_text_color); */
  font-weight: 600;
}

/* Styling for Swiper navigation buttons and pagination */
.atlas-upsell-cart-swiper .swiper-button-next,
.atlas-upsell-cart-swiper .swiper-button-prev {
  position: absolute;
  color: #000000;
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 0 !important;

  /* display: flex; */
  /* align-items: center; */
  /* justify-content: center; */
}

.atlas-upsell-cart-swiper .swiper-button-next:hover,
.atlas-upsell-cart-swiper .swiper-button-prev:hover {
  background-color: #f0f0f0;
}

.atlas-upsell-cart-swiper .swiper-button-next:after,
.atlas-upsell-cart-swiper .swiper-button-prev:after {
  font-size: 14px;
  font-weight: bold;
  /* line-height: 1;
  position: relative; */
  position: absolute;
  top: 50%;
  left: 50%;
  color: #000000;
}
.atlas-upsell-cart-swiper .swiper-button-next:after {
  transform: translate(-25%, -50%);
}
.atlas-upsell-cart-swiper .swiper-button-prev:after {
  transform: translate(-63%, -50%);
}

.atlas-upsell-cart-swiper .swiper-pagination-bullet {
  background: var(--cart_drawer_button_color, #000); /* Fallback color */
  opacity: 0.3;
}

.atlas-upsell-cart-swiper .swiper-pagination-bullet-active {
  opacity: 1;
}

/* New styles for the two-column layout */
.atlas-upsell-cart-slide-content-wrapper {
  display: flex;
  width: 100%;
  align-items: center; /* Align items to the top */
  text-align: left; /* Align text to the left for the right column */
}

.atlas-upsell-cart-slide-left {
  flex: 0 0 80px; /* Fixed width for the image container */
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.atlas-upsell-cart-slide-right {
  flex: 1; /* Takes remaining space */
  display: flex;
  flex-direction: column;
}

.atlas-upsell-cart-slide-actions {
  display: flex;
  align-items: stretch; /* Vertically align select and button */
  margin-top: 8px; /* Space above actions */
}

.atlas-cart-upsell-product-variant-selector {
  flex-grow: 1; /* Allows selector to take available space */
  margin-right: 8px; /* Space between selector and button */
  /* Add other select styling as needed */
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #ccc;
  min-width: 0; /* Prevent selector from pushing button */
  width: 0; /* Force selector to shrink and respect flex container */
}

.atlas-upsell-cart-slide-add-button {
  position: relative;
  /* Add other button styling as needed */
  padding: 5px 10px;
  border-radius: 4px;
  /* background-color: #000; */ /* Example background */
  background-color: var(--upsell_products_add_button_bg_color);
  color: var(--upsell_products_add_button_text_color); /* Example text color */
  border: none;
  cursor: pointer;
  flex-shrink: 0; /* Prevent button from shrinking */
  min-width: 70px;
  position: relative;
}

.atlas-upsell-cart-slide-add-button:hover {
  opacity: 0.88;
  box-shadow: 0 0px 4px rgba(0, 0, 0, 0.2);
}

.atlas-upsell-cart-slide-add-button .atlas-upsell-product-add-spinner {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  z-index: 2;
  pointer-events: none;
}

.atlas-upsell-cart-slide-add-button.loading .atlas-upsell-product-add-spinner {
  display: block;
}

.atlas-upsell-cart-slide-add-button.loading .button-text {
  visibility: hidden;
}

/* Simple spinner animation */
.atlas-upsell-cart-slide-add-button .atlas-upsell-product-add-spinner:after {
  content: " ";
  display: block;
  width: 18px;
  height: 18px;
  margin: 1px;
  border-radius: 50%;
  border: 2px solid #888888; /* Changed from #fff to a gray color */
  border-color: #888888 #888888 #888888 transparent; /* Adjusted for visibility */
  animation: add-btn-spinner-anim 1s linear infinite;
}

@keyframes add-btn-spinner-anim {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* End of new styles */
