/**
 * Wishlist Drawer — storefront dark skin (mirrors cart-sidebar).
 * Consumes the site --one-* tokens from sites/{APP_ID}/{APP_ID}.live.layout.css.
 */

#onesite-wishlist-drawer * {
  box-sizing: border-box;
}

.onesite-scroll-locked {
  overflow: hidden !important;
}

.onesite-wl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1090;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.onesite-wl-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 390px;
  max-width: 92vw;
  background: var(--one-bg-card, #1c1d21);
  color: var(--one-text-primary, #f0f0f0);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.45);
}
.onesite-wl-panel.is-open {
  transform: none;
}

.onesite-wl-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--one-border, #2c2e33);
}
.onesite-wl-heading {
  font-family: var(--one-font-heading, "Nunito", sans-serif);
  font-weight: 800;
  font-size: 17px;
}
.onesite-wl-heading span {
  color: var(--one-text-secondary, #a0a0a0);
  font-weight: 600;
}
.onesite-wl-close {
  background: none;
  border: none;
  color: var(--one-text-secondary, #a0a0a0);
  cursor: pointer;
  padding: 4px;
  line-height: 0;
}
.onesite-wl-close:hover {
  color: var(--one-text-primary, #fff);
}

/* Column wrapper: list scrolls, capture panel stays pinned to the bottom */
.onesite-wl-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Empty state */
.onesite-wl-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 48px 24px;
  color: var(--one-text-secondary, #a0a0a0);
}
.onesite-wl-empty svg {
  color: var(--one-text-muted, #5c6370);
}
.onesite-wl-empty p {
  margin: 6px 0 0;
  font-weight: 700;
  color: var(--one-text-primary, #f0f0f0);
}
.onesite-wl-empty span {
  font-size: 13px;
}

/* Items (the scrollable region; capture panel below stays pinned) */
.onesite-wl-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 0;
}
.onesite-wl-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 32px;
  gap: 12px;
  align-items: start;
  padding: 14px 20px;
  border-bottom: 1px solid var(--one-border-subtle, #232428);
}
.onesite-wl-item-img img {
  width: 64px;
  height: auto;
  border-radius: var(--one-radius-sm, 6px);
  background: var(--one-bg-void, #0d0e10);
  display: block;
}
.onesite-wl-item-info {
  min-width: 0;
}
.onesite-wl-item-title {
  display: block;
  color: var(--one-text-primary, #f0f0f0);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.onesite-wl-item-title:hover {
  color: var(--one-link, #7a9bb5);
}
.onesite-wl-item-sku {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--one-text-muted, #5c6370);
}
.onesite-wl-item-price {
  margin-top: 6px;
  font-weight: 800;
  font-size: 15px;
  color: var(--one-text-primary, #f0f0f0);
}
.onesite-wl-item-sale {
  color: var(--one-red, #c8322d);
}
.onesite-wl-item-price del {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--one-text-muted, #5c6370);
}
.onesite-wl-item-remove {
  background: none;
  border: none;
  color: var(--one-text-muted, #5c6370);
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  border-radius: 4px;
}
.onesite-wl-item-remove:hover {
  color: var(--one-red, #c8322d);
  background: var(--one-bg-elevated, #242528);
}

/* Email capture / status panel */
.onesite-wl-capture {
  flex-shrink: 0;
  padding: 18px 20px 30px;
  border-top: 1px solid var(--one-border, #2c2e33);
  background: var(--one-bg-hero, #121315);
}
.onesite-wl-flash {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--one-radius-sm, 6px);
  background: rgba(43, 138, 74, 0.15);
  color: #6fd897;
  font-size: 13px;
  font-weight: 600;
}
.onesite-wl-saved {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--one-text-secondary, #a0a0a0);
  line-height: 1.4;
}
.onesite-wl-saved svg {
  flex-shrink: 0;
  color: var(--one-success, #2b8a4a);
}
.onesite-wl-saved-text {
  flex: 1 1 auto;
  min-width: 0;
}
.onesite-wl-saved strong {
  color: var(--one-text-primary, #f0f0f0);
}
.onesite-wl-forget {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--one-border, #2c2e33);
  border-radius: var(--one-radius-sm, 6px);
  padding: 6px 12px;
  color: var(--one-text-secondary, #a0a0a0);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.onesite-wl-forget:hover {
  border-color: var(--one-red, #c8322d);
  color: var(--one-red, #c8322d);
}
.onesite-wl-form-title {
  margin: 0;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.15;
  color: var(--one-text-primary, #f0f0f0);
}
.onesite-wl-form-sub {
  margin: 3px 0 12px;
  font-size: 12px;
  color: var(--one-text-secondary, #a0a0a0);
}
.onesite-wl-form-row {
  display: flex;
  gap: 8px;
}
.onesite-wl-form-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 13px;
  background: var(--one-bg-void, #0d0e10);
  border: 1px solid var(--one-border, #2c2e33);
  border-radius: var(--one-radius-sm, 6px);
  color: var(--one-text-primary, #f0f0f0);
  font-size: 14px;
}
.onesite-wl-form-row input:focus {
  outline: none;
  border-color: var(--one-link, #7a9bb5);
}
.onesite-wl-form-row button {
  flex-shrink: 0;
  padding: 11px 20px;
  background: var(--one-red, #c8322d);
  color: #fff;
  border: none;
  border-radius: var(--one-radius-sm, 6px);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.onesite-wl-form-row button:hover {
  background: var(--one-red-hover, #a8281f);
}
.onesite-wl-form-err {
  margin-top: 8px;
  font-size: 12px;
  color: var(--one-red, #c8322d);
}
.onesite-wl-recall {
  display: block;
  margin-top: 12px;
  background: none;
  border: none;
  padding: 0;
  color: var(--one-link, #7a9bb5);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.onesite-wl-recall:hover {
  text-decoration: underline;
}
