/* =============================================
   Wishlist System v2 — wishlist.css
   All colors/sizes driven by CSS variables set
   dynamically from plugin settings.
   ============================================= */

:root {
  --wl-sidebar-bg: #ffffff;
  --wl-sidebar-title-color: #111111;
  --wl-sidebar-title-size: 16px;
  --wl-sidebar-width: 360px;
  --wl-sidebar-shadow: 4px 0 32px rgba(0,0,0,0.12);
  --wl-sidebar-translate-in: translateX(-110%);
  --wl-sidebar-side: left:0;right:auto;
  --wl-overlay-opacity: 0.7;
  --wl-btn-bg: #111111;
  --wl-btn-color: #ffffff;
  --wl-btn-radius: 8px;
  --wl-badge-color: #0336e4;
  --wl-header-icon-size: 24px;
  --wl-toggle-icon-size: 22px;
  --wl-toast-bg: #ffffff;
  --wl-toast-color: #111111;
  --wl-toast-border: #111111;
}

/* ── Toggle Button ── */
.wl-btn-wrap {
  display: inline-block;
}

.wl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.18s ease, color 0.18s;
  position: relative;
  color: #111;
  outline: none;
  line-height: 1;
}
.wl-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* SVG heart */
.wl-heart {
  width: var(--wl-toggle-icon-size);
  height: var(--wl-toggle-icon-size);
  display: block;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s;
  color: inherit;
  flex-shrink: 0;
}
.wl-btn:hover .wl-heart--empty {
  color: #666;
}
.wl-heart--filled {
  color: inherit;
}
.wl-btn--active .wl-heart {
  transform: scale(1.15);
}

/* Elementor icon fallback sizing */
.wl-btn i,
.wl-btn svg.el-icon,
.wl-btn .wl-icon-empty,
.wl-btn .wl-icon-filled {
  font-size: var(--wl-toggle-icon-size);
  width: var(--wl-toggle-icon-size);
  height: var(--wl-toggle-icon-size);
  display: block;
  flex-shrink: 0;
}

/* Label */
.wl-btn-label {
  font-size: 13px;
  white-space: nowrap;
  color: inherit;
}

/* Pop animation */
@keyframes wl-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.35);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}
.wl-btn--pop .wl-heart,
.wl-btn--pop i,
.wl-btn--pop .wl-icon-filled {
  animation: wl-pop 0.35s ease forwards;
}

/* Spinner */
.wl-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-top-color: #111;
  border-radius: 50%;
  animation: wl-spin 0.6s linear infinite;
  flex-shrink: 0;
}
@keyframes wl-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Header Button ── */
.wl-header-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #000;
  border-radius: 50%;
  transition: background 0.18s;
}
.wl-header-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.wl-header-btn .wl-heart,
.wl-header-btn i,
.wl-header-btn svg.el-icon,
.wl-header-btn .wl-icon-empty,
.wl-header-btn .wl-icon-filled {
  width: var(--wl-header-icon-size);
  height: var(--wl-header-icon-size);
  font-size: var(--wl-header-icon-size);
  display: block;
}

/* Badge / dot */
.wl-header-count {
  position: absolute;
  bottom: 2px;
  right: 0;
  min-width: 7px;
  height: 7px;
  background: var(--wl-badge-color);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  line-height: 1;
  pointer-events: none;
}
/* Number badge mode: auto-size */
.wl-header-count:not(:empty) {
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  bottom: -2px;
  right: -4px;
}

/* ── Sidebar ── */
.wl-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, var(--wl-overlay-opacity));
  z-index: 9998;
}
.wl-sidebar-overlay.wl-open {
  display: block;
}

/* Admin bar offset */
body.admin-bar .wl-sidebar {
  top: 32px;
  height: calc(100% - 32px);
}
@media screen and (max-width: 782px) {
  body.admin-bar .wl-sidebar {
    top: 46px;
    height: calc(100% - 46px);
  }
}

.wl-sidebar {
  position: fixed;
  top: 0;
  width: var(--wl-sidebar-width);
  max-width: 95vw;
  height: 100%;
  background: var(--wl-sidebar-bg);
  z-index: 9999;
  transform: var(--wl-sidebar-translate-in);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--wl-sidebar-shadow);
  font-family: inherit;
  /* side set via inline style from PHP dynamic CSS */
  left: 0;
}
.wl-sidebar.wl-open {
  transform: translateX(0);
}

.wl-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}
.wl-sidebar-title {
  font-size: var(--wl-sidebar-title-size);
  font-weight: 700;
  color: var(--wl-sidebar-title-color);
}
.wl-sidebar-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #555;
  display: flex;
  border-radius: 4px;
  transition: background 0.15s;
}
.wl-sidebar-close:hover {
  background: #f0f0f0;
}

.wl-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.wl-sidebar-loading {
  text-align: center;
  color: #aaa;
  font-size: 12px;
  padding: 20px 0;
}

.wl-sidebar-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #888;
  gap: 12px;
  padding: 40px 20px;
}
.wl-sidebar-empty svg {
  color: #ccc;
}
.wl-sidebar-empty p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.wl-sidebar-empty strong {
  display: block;
  font-size: 15px;
  color: #444;
  margin-bottom: 2px;
}

/* Sidebar items */
.wl-sidebar-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f2;
}
.wl-sidebar-item:last-child {
  border-bottom: none;
}

.wl-sidebar-item-img-wrap {
  flex-shrink: 0;
  display: block;
}
.wl-sidebar-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  background: #f5f5f5;
  display: block;
}

.wl-sidebar-item-info {
  flex: 1;
  min-width: 0;
}
.wl-sidebar-item-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 5px;
}
.wl-sidebar-item-title a {
  color: inherit;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wl-sidebar-item-title a:hover {
  text-decoration: underline;
}
.wl-sidebar-item-price {
  font-size: 12px;
  color: #555;
}
.wl-sidebar-item-price * {
  font-size: inherit !important;
}

.wl-sidebar-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  padding: 4px;
  display: flex;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.wl-sidebar-item-remove:hover {
  color: #111;
  background: #f5f5f5;
}

.wl-sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
}
.wl-view-all-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--wl-btn-bg);
  color: var(--wl-btn-color);
  padding: 12px;
  border-radius: var(--wl-btn-radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.18s;
}
.wl-view-all-btn:hover {
  opacity: 0.85;
  color: var(--wl-btn-color);
}

/* ── Wishlist Page Counter ── */
.wl-page-counter {
  font-size: 18px;
  line-height: 29px;
  color: #212121;
  font-weight: 500;
}

/* ── Toast Notifications ── */
.wl-toasts {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: 95vw;
}

.wl-toast {
  background: var(--wl-toast-bg);
  border-radius: 0px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--wl-toast-color);
  direction: rtl;
  pointer-events: all;
  min-width: min(80vw,412px);
  max-width: 412px;
  animation: wl-toast-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  border-right: 3px solid var(--wl-toast-border);
}
.wl-toast.wl-toast--out {
  animation: wl-toast-out 0.22s ease forwards;
}

.wl-toast-text {
  flex: 1;
  font-size: 12px;
  line-height: 19px;
	font-weight:500;
}
.wl-toast-close {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  line-height: 19px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.15s, background 0.15s;
}
.wl-toast-close:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.05);
}

@keyframes wl-toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes wl-toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .wl-sidebar {
    width: 100% !important;
    max-width: 100%;
  }
  .wl-toast {
    min-width: 200px;
    font-size: 12px;
  }
}
