/**
 * lw-wishlist — list UI (wishlist page, account tab, share page).
 * Uses em units like the rest of the LW stack; no global tokens leaked.
 */

.lw-wl {
  margin: 0 0 2em;
}

/* ---- top bar: count + share controls ---- */

.lw-wl__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
  margin-bottom: 1.25em;
}

.lw-wl__count {
  font-weight: 600;
}

.lw-wl__bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  flex-wrap: wrap;
}

.lw-wl__share-reset {
  background: none;
  border: none;
  padding: 0;
  color: #6b7280;
  font-size: 0.85em;
  text-decoration: underline;
  cursor: pointer;
}

.lw-wl__share-status {
  font-size: 0.85em;
  color: #15803d;
}

.lw-wl__share-status.is-error {
  color: #b91c1c;
}

/* ---- rows ---- */

.lw-wl__items {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
}

.lw-wl-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9em;
  padding: 0.9em;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.lw-wl-row--ghost {
  opacity: 0.4;
}

.lw-wl-row__drag {
  flex: 0 0 auto;
  align-self: center;
  border: none;
  background: none;
  padding: 0.25em;
  color: #9ca3af;
  cursor: grab;
  touch-action: none; /* let SortableJS own touch gestures on the handle */
}

.lw-wl-row__drag:active {
  cursor: grabbing;
}

.lw-wl-row__media {
  flex: 0 0 84px;
}

.lw-wl-row__media img {
  display: block;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
}

.lw-wl-row__body {
  flex: 1 1 auto;
  min-width: 0;
}

.lw-wl-row__title {
  display: block;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.2em;
  overflow-wrap: anywhere;
}

.lw-wl-row__title:hover {
  text-decoration: underline;
}

.lw-wl-row__price {
  font-size: 0.95em;
  margin-bottom: 0.4em;
}

.lw-wl-row__price del {
  color: #9ca3af;
  margin-right: 0.4em;
}

.lw-wl-row__note-label {
  display: none; /* visually hidden — the placeholder carries the affordance */
}

.lw-wl-row__note {
  width: 100%;
  max-width: 32em;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.45em 0.6em;
  font-size: 0.9em;
  font-family: inherit;
  resize: none;
  overflow: hidden;
  background: #f9fafb;
}

.lw-wl-row__note:focus {
  background: #fff;
  outline: 2px solid #cbd5e1;
  outline-offset: 0;
}

.lw-wl-row__note-status {
  display: block;
  font-size: 0.8em;
  color: #15803d;
  min-height: 1.2em;
}

.lw-wl-row__note-status.is-error {
  color: #b91c1c;
}

.lw-wl-row__note-static {
  font-size: 0.9em;
  color: #4b5563;
  font-style: italic;
}

/* ---- row actions ---- */

.lw-wl-row__actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6em;
}

.lw-wl-row__atc.button {
  white-space: nowrap;
}

.lw-wl-row__remove {
  border: none;
  background: none;
  padding: 0.3em;
  color: #9ca3af;
  cursor: pointer;
}

.lw-wl-row__remove:hover {
  color: #b91c1c;
}

/* ---- empty / hints ---- */

.lw-wl__empty {
  padding: 2em 0;
  text-align: center;
  color: #4b5563;
}

.lw-wl__guest-hint {
  margin-top: 1.25em;
  font-size: 0.9em;
  color: #6b7280;
}

/* ---- share page wrapper ---- */

.lw-wl-share-page__inner {
  max-width: 56em;
  margin: 0 auto;
  padding: 2em 1em 3em;
}

.lw-wl-share-page__title {
  margin-bottom: 1em;
}

/* ---- mobile ---- */

@media (max-width: 600px) {
  .lw-wl-row {
    flex-wrap: wrap;
  }

  .lw-wl-row__media {
    flex-basis: 64px;
  }

  .lw-wl-row__media img {
    width: 64px;
    height: 64px;
  }

  .lw-wl-row__body {
    flex-basis: calc(100% - 64px - 3em);
  }

  .lw-wl-row__actions {
    flex-direction: row;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
  }
}
