/* ========================================
   Wishlist Button
   ======================================== */
:root {
  --color-primary: #629D23;
  --color-white-quick-view: #ffffff;
  --color-body: #6E777D;
}

.easyel-wishlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.easyel-wishlist-btn:hover {
  color: #475569;
}

.easyel-wishlist-btn.added {
  color: #475569;
}

.easyel-wishlist-btn .easyel-wishlist-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Button Loading State */
.easyel-wishlist-btn.easyel-wishlist-loading {
  pointer-events: none;
  opacity: 0.7;
}

.easyel-wishlist-btn.easyel-wishlist-loading .easyel-wishlist-icon {
  display: none;
}

.easyel-wishlist-btn.easyel-wishlist-loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: easyel-wishlist-spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Display Mode: Text Only */
.easyel-wishlist-btn.easyel-wishlist-mode-text_only .easyel-wishlist-icon {
  display: none;
}

/* Display Mode: Icon Only */
.easyel-wishlist-btn.easyel-wishlist-mode-icon_only .easyel-wishlist-btn-text {
  display: none;
}

.easyel-wishlist-btn.easyel-wishlist-mode-icon_only {
  position: relative;
  padding: 6px;
}

.easyel-wishlist-btn.easyel-wishlist-mode-icon_only::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
}

.easyel-wishlist-btn.easyel-wishlist-mode-icon_only:not(.easyel-wishlist-loading)::before {
  content: "";
  position: absolute;
  bottom: calc(100% - 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1e293b;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
}

.easyel-wishlist-btn.easyel-wishlist-mode-icon_only:hover::after,
.easyel-wishlist-btn.easyel-wishlist-mode-icon_only:not(.easyel-wishlist-loading):hover::before {
  opacity: 1;
  visibility: visible;
}

.easyel-wishlist-btn.easyel-wishlist-mode-icon_only.easyel-wishlist-loading::after {
  content: none;
}

.easyel-wishlist-btn.easyel-wishlist-mode-icon_only.easyel-wishlist-loading::before {
  content: "";
  position: static;
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: easyel-wishlist-spin 0.7s linear infinite;
  flex-shrink: 0;
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* On Image Position */
.easyel-wishlist-on-image {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
}

.easyel-wishlist-on-image .easyel-wishlist-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.easyel-wishlist-on-image .easyel-wishlist-btn span {
  display: none;
}

/* ========================================
   Toast Notification
   ======================================== */
.easyel-wishlist-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  transform: translateX(calc(100% + 20px));
  z-index: 999999;
  background: #ffffff;
  color: #1e293b;
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  width: auto;
  min-width: 280px;
  max-width: 380px;
  border: 1px solid #e2e8f0;
}

.easyel-wishlist-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.easyel-wishlist-toast-top {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #fef2f2, #accf86);
  border-radius: 50%;
}

.easyel-wishlist-toast-check {
  width: 20px;
  height: 20px;
  color: #629D23;
  flex-shrink: 0;
}

.easyel-wishlist-toast-text {
  font-weight: 600;
  font-size: 13px;
  color: #1e293b;
  line-height: 1.3;
}

.easyel-wishlist-toast-middle {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.easyel-wishlist-toast-link {
  display: inline-block;
  color: #ffffff;
  background: #629D23;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 5px;
  transition: background 0.2s ease;
  text-align: center;
  box-sizing: border-box;
  width: -moz-fit-content;
  width: fit-content;
}

.easyel-wishlist-toast-link:hover {
  background: #629D23;
  color: #ffffff;
  text-decoration: none;
}

.easyel-wishlist-toast-close {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #f8fafc;
  cursor: pointer;
  padding: 0;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.easyel-wishlist-toast-close:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

.easyel-wishlist-toast-close svg {
  width: 12px;
  height: 12px;
}

/* ========================================
   Wishlist Table (Page) - Div Layout
   ======================================== */
.easyel-wishlist-page-wrapper {
  font-size: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.easyel-wishlist-list {
  width: -moz-max-content;
  width: max-content;
  min-width: 100%;
  border-radius: 6px;
  border: 1px solid #E2E2E2;
  background: #fff;
}

/* ---- Header row ---- */
.easyel-wishlist-header {
  display: flex;
  align-items: center;
  padding: 18px 30px;
  border-bottom: 1px solid #E2E2E2;
  gap: 20px;
}

.easyel-wishlist-hcol {
  font-weight: 600;
  font-size: 14px;
  color: #000;
  white-space: nowrap;
  margin: 0;
}

/* ---- Column sizing ---- */
.easyel-wishlist-hcol-products,
.easyel-wishlist-col-products {
  flex: 1 1 0;
  min-width: 250px;
}

.easyel-wishlist-col-products {
  display: flex;
  align-items: center;
  gap: 16px;
}

.easyel-wishlist-product-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

/* Remove button is inside products column, no separate column needed */
.easyel-wishlist-hcol-price,
.easyel-wishlist-col-price {
  flex: 0 0 100px;
}

.easyel-wishlist-hcol-quantity,
.easyel-wishlist-col-quantity {
  flex: 0 0 120px;
}

.easyel-wishlist-hcol-sub_total,
.easyel-wishlist-col-sub_total {
  flex: 0 0 100px;
}

.easyel-wishlist-hcol-availability,
.easyel-wishlist-col-availability {
  flex: 0 0 100px;
}

.easyel-wishlist-hcol-add_to_cart,
.easyel-wishlist-col-add_to_cart {
  flex: 0 0 160px;
}

.woocommerce .easyel-wishlist-col-add_to_cart .added_to_cart {
  padding-top: 12px;
}

.easyel-wishlist-hcol-description,
.easyel-wishlist-col-description {
  flex: 0 0 180px;
  min-width: 0;
  overflow: hidden;
}

.easyel-wishlist-hcol-weight,
.easyel-wishlist-col-weight,
.easyel-wishlist-hcol-dimensions,
.easyel-wishlist-col-dimensions,
.easyel-wishlist-hcol-color,
.easyel-wishlist-col-color,
.easyel-wishlist-hcol-size,
.easyel-wishlist-col-size {
  flex: 0 0 90px;
}

/* ---- Item row ---- */
.easyel-wishlist-row {
  display: flex;
  align-items: center;
  padding: 24px 30px;
  border-bottom: 1px solid #E2E2E2;
  gap: 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.easyel-wishlist-row:last-child {
  border-bottom: none;
}

.easyel-wishlist-col {
  color: #475569;
}

/* Remove Animation */
.easyel-wishlist-removing {
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
}

/* ---- Image ---- */
.easyel-wishlist-img-link {
  display: block;
  flex-shrink: 0;
  width: 65px;
  height: 65px;
}

.easyel-wishlist-product-img {
  width: 65px;
  height: 65px;
  -o-object-fit: contain;
     object-fit: contain;
  border-radius: 4px;
}

/* ---- Title ---- */
.easyel-wishlist-product-title {
  color: #000;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none !important;
  transition: color 0.2s ease;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.easyel-wishlist-product-title:hover {
  color: var(--color-primary, #629D23);
}

.easyel-wishlist-product-sku {
  font-size: 13px;
  color: #6E777D;
}

/* ---- Price ---- */
.easyel-wishlist-price {
  font-size: 15px;
  font-weight: 600;
  color: #000;
  margin: 0;
  white-space: nowrap;
}

.easyel-wishlist-price del {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 400;
}

.easyel-wishlist-price ins {
  text-decoration: none;
}

/* ---- Stock Status ---- */
.easyel-wishlist-stock {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 2px;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
}

.easyel-wishlist-stock.in-stock {
  background: #DEF9EC;
  color: #3BB77E;
}

.easyel-wishlist-stock.out-of-stock {
  color: #fff;
  background: var(--color-danger, #dc2626);
}

.easyel-wishlist-stock.on-backorder {
  color: #d97706;
}

/* ---- Add to Cart ---- */
.easyel-wishlist-add-to-cart {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--color-primary, #629D23);
  color: #fff !important;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: 0.3s;
  white-space: nowrap;
}

.easyel-wishlist-add-to-cart:hover {
  opacity: 0.85;
}

/* Hide Add to Cart when added, show View Cart with same style */
.easyel-wishlist-add-to-cart.added {
  display: none !important;
}

.easyel-wishlist-col-add_to_cart .added_to_cart {
  display: flex;
  align-items: center;
  padding-top: 12px;
  gap: 10px;
  padding: 12px 22px;
  background: var(--color-primary, #629D23);
  color: #fff !important;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: 0.3s;
  white-space: nowrap;
}

.easyel-wishlist-add-to-cart .arrow-icon {
  display: flex;
}

.easyel-wishlist-col-add_to_cart .added_to_cart:hover {
  opacity: 0.85;
}

/* ---- Remove Button ---- */
.easyel-wishlist-remove-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #DC2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
  padding: 0;
  flex-shrink: 0;
}

.easyel-wishlist-remove-btn:hover {
  background: #dc2626;
}

.easyel-wishlist-remove-btn svg {
  width: 16px;
  height: 16px;
}

/* ---- Quantity Input ---- */
.easyel-wishlist-quantity-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(43, 66, 38, 0.12);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0px 4px 17px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  overflow: hidden;
  width: 100px;
}

.easyel-wishlist-page-wrapper .easyel-wishlist-qty {
  width: 36px;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 600;
  border: none !important;
  text-align: center;
  color: #1e293b;
  background: transparent;
  outline: none;
  -moz-appearance: textfield;
  -webkit-appearance: textfield;
          appearance: textfield;
}

.easyel-wishlist-qty::-webkit-outer-spin-button,
.easyel-wishlist-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.easyel-wishlist-qty-btns {
  border: 1px solid rgba(43, 66, 38, 0.12);
  border-radius: 2px;
  background: #fff;
  display: flex;
}

.easyel-wishlist-page-wrapper .easyel-wishlist-qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: none !important;
  background: transparent !important;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  font-size: 0;
  border-radius: 0;
}

.easyel-wishlist-page-wrapper .easyel-wishlist-qty-btn svg {
  width: 14px;
  height: 14px;
}

.easyel-wishlist-qty-btn + .easyel-wishlist-qty-btn {
  border-top: 1px solid rgba(43, 66, 38, 0.12);
}

/* ---- SubTotal ---- */
.easyel-wishlist-subtotal {
  font-size: 15px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
}

/* ---- Description ---- */
.easyel-wishlist-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---- N/A ---- */
.easyel-wishlist-na {
  color: #cbd5e1;
  font-style: italic;
}

/* ---- Empty ---- */
.easyel-wishlist-empty-wrap {
  text-align: center;
  padding: 60px 30px;
  border: 1px solid #E2E2E2;
  border-radius: 8px;
  background: #fff;
}

.easyel-wishlist-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: #fef2f2;
  border-radius: 50%;
  color: #ef4444;
}

.easyel-wishlist-empty-icon svg {
  width: 32px;
  height: 32px;
}

.easyel-wishlist-empty-text {
  color: #1e293b;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.easyel-wishlist-empty-desc {
  color: #94a3b8;
  font-size: 14px;
  margin: 0 0 24px;
}

.easyel-wishlist-return-shop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--color-primary, #629D23);
  color: #fff !important;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: opacity 0.3s ease;
}

.easyel-wishlist-return-shop:hover {
  opacity: 0.85;
  color: #fff !important;
}

.easyel-wishlist-return-shop svg {
  width: 16px;
  height: 16px;
}

.easyel-wishlist-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 15px;
}

/* ---- Login Notice ---- */
.easyel-wishlist-login-notice {
  text-align: center;
  padding: 60px 30px;
  border: 1px solid #E2E2E2;
  border-radius: 8px;
  background: #fff;
}

.easyel-wishlist-login-notice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  background: #f1f5f9;
  border-radius: 50%;
  color: #94a3b8;
}
.easyel-wishlist-login-notice-icon svg {
  width: 32px;
  height: 32px;
}

.easyel-wishlist-login-notice-title {
  color: #1e293b;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.easyel-wishlist-login-notice-desc {
  color: #94a3b8;
  font-size: 14px;
  margin: 0 0 24px;
}

.easyel-wishlist-login-notice-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: #1e293b;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}
.easyel-wishlist-login-notice-btn:hover {
  background: #334155;
  color: #fff;
}
.easyel-wishlist-login-notice-btn svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   Loader / Spinner
   ======================================== */
.easyel-wishlist-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.easyel-wishlist-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--color-primary, #629D23);
  border-radius: 50%;
  animation: easyel-wishlist-spin 0.7s linear infinite;
}

.easyel-wishlist-qty-btn:hover,
.easyel-wishlist-qty-btn:focus {
  background: var(--color-primary, #629D23) !important;
}

.easyel-wishlist-qty-btn:hover svg,
.easyel-wishlist-qty-btn:focus svg {
  color: #fff !important;
}

.easyel-wishlist-qty-btns .easyel-wishlist-qty-btn:first-child {
  border-right: 1px solid rgba(43, 66, 38, 0.12) !important;
}

@keyframes easyel-wishlist-spin {
  to {
    transform: rotate(360deg);
  }
}
/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  /* Wrapper: no horizontal scroll on mobile */
  .easyel-wishlist-page-wrapper {
    overflow-x: hidden;
  }
  .easyel-wishlist-list {
    width: 100%;
    min-width: 0;
  }
  /* Hide desktop header */
  .easyel-wishlist-header {
    display: none;
  }
  /* Each row becomes a stacked card */
  .easyel-wishlist-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 0;
    position: relative;
  }
  /* Remove button: absolute top-right of the card */
  .easyel-wishlist-remove-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 26px;
    height: 26px;
  }
  .easyel-wishlist-remove-btn svg {
    width: 13px;
    height: 13px;
  }
  /* Product column: image on top, title+sku below */
  .easyel-wishlist-col-products {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px;
    width: 100%;
    padding-right: 44px;
    margin-bottom: 12px;
  }
  /* Image */
  .easyel-wishlist-img-link,
  .easyel-wishlist-product-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-bottom: 15px;
  }
  /* Title + SKU below the image */
  .easyel-wishlist-product-info {
    width: 100%;
    min-width: 0;
  }
  .easyel-wishlist-product-title {
    font-size: 14px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  /* All data columns: left-aligned row with label */
  .easyel-wishlist-col {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 5px 0;
    border-bottom: none;
    flex: none !important;
    margin-bottom: 10px;
  }
  .easyel-wishlist-col[data-label]::before {
    content: attr(data-label) ":";
    font-weight: 600;
    color: #1e293b;
    font-size: 12px;
    flex-shrink: 0;
    min-width: 85px;
  }
  /* No label prefix for product and add-to-cart columns */
  .easyel-wishlist-col-products::before,
  .easyel-wishlist-col-add_to_cart[data-label]::before {
    content: none;
  }
  /* Price: one line, no wrapping */
  .easyel-wishlist-col-price {
    order: 1;
    margin-bottom: 2px;
  }
  .easyel-wishlist-price,
  .easyel-wishlist-subtotal {
    font-size: 14px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
  }
  /* Quantity: directly below price */
  .easyel-wishlist-col-quantity {
    order: 2;
    margin-bottom: 10px;
    margin-top: 10px;
  }
  /* Sub-total, availability, other cols */
  .easyel-wishlist-col-sub_total {
    order: 3;
  }
  .easyel-wishlist-col-availability {
    order: 4;
  }
  /* Description, weight, dimensions, color, size: full row */
  .easyel-wishlist-col-description,
  .easyel-wishlist-col-weight,
  .easyel-wishlist-col-dimensions,
  .easyel-wishlist-col-color,
  .easyel-wishlist-col-size {
    order: 5;
    align-items: flex-start;
  }
  /* Add to cart: last, full-width button */
  .easyel-wishlist-col-add_to_cart {
    order: 6;
    margin-top: 25px;
  }
  .easyel-wishlist-add-to-cart,
  .easyel-wishlist-col-add_to_cart .added_to_cart {
    width: auto;
    justify-content: center;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 5px;
  }
  /* Toast */
  .easyel-wishlist-toast {
    top: 15px;
    right: 15px;
    padding: 12px 14px;
    font-size: 13px;
    border-radius: 8px;
    min-width: unset;
    max-width: calc(100% - 30px);
    gap: 10px;
  }
  .easyel-wishlist-toast-top {
    width: 32px;
    height: 32px;
  }
  .easyel-wishlist-toast-check {
    width: 16px;
    height: 16px;
  }
}