/* Nihehe: "Finish your listing" cards on My listings.
   Tokens are namespaced (--un-*) so they cannot clash with the page theme. */
:root {
  --un-navy: #1b2a49;
  --un-blue: #4da6e0;
  --un-tint: #e8f3fb;
  --un-line: #e3ecf5;
  --un-muted: #5b6678;
  --un-ease: cubic-bezier(.2, .8, .2, 1);
}

.unf { margin: 0 0 36px; }
.unf[hidden], .unf-grid[hidden], .unf-more[hidden] { display: none; }
.unf-head { margin: 0 0 16px; }
.unf-head h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.3; color: var(--un-navy); }
.unf-head p { margin: 0; font-size: 14px; color: var(--un-muted); }

.unf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.unf-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--un-line);
  border-radius: 28px;
  box-shadow: 0 8px 28px rgba(27, 42, 73, .07);
  animation: unf-rise .4s var(--un-ease) both;
}
.unf-card-muted { box-shadow: 0 4px 16px rgba(27, 42, 73, .05); }
.unf-card-muted .unf-media { filter: grayscale(.6); opacity: .8; }

.unf-media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #e8f3fb, #d6e7f5); }
.unf-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.unf-media-empty {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%234da6e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22 24 8l18 14'/%3E%3Cpath d='M10 20v20h28V20'/%3E%3Cpath d='M20 40V28h8v12'/%3E%3C/svg%3E")
    center / 56px no-repeat,
    linear-gradient(135deg, #e8f3fb, #d6e7f5);
}

.unf-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 22px 24px; }
.unf-title { margin: 6px 0 0; font-size: 18px; line-height: 1.3; color: var(--un-navy); overflow-wrap: anywhere; }
.unf-meta { margin: 0; font-size: 14px; color: var(--un-muted); }
.unf-note { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--un-navy); }
.unf-when { margin: 0; font-size: 12px; color: var(--un-muted); }

.unf-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.unf-pill-blue { background: #e8f3fb; color: #1b2a49; }
.unf-pill-amber { background: #fdf3e1; color: #7a4d00; }
.unf-pill-green { background: #e3f5ea; color: #17623a; }
.unf-pill-red { background: #fbeaea; color: #9a2a2a; }
.unf-pill-grey { background: #eef1f5; color: #46505f; }

.unf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 46px;
  margin-top: 12px;
  padding: 0 22px;
  border: 1.5px solid var(--un-navy);
  border-radius: 9999px;
  background: var(--un-navy);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s var(--un-ease), background-color .2s var(--un-ease);
}
.unf-btn:hover { background: #26395f; }
.unf-btn:active { transform: scale(.98); }
.unf-btn-ghost { background: #fff; color: var(--un-navy); border-color: var(--un-line); }
.unf-btn-ghost:hover { background: var(--un-tint); }
.unf-btn:focus-visible, .unf-more summary:focus-visible { outline: 3px solid var(--un-blue); outline-offset: 2px; }

.unf-more { margin-top: 24px; }
.unf-more summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid var(--un-line);
  border-radius: 9999px;
  background: var(--un-tint);
  color: var(--un-navy);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.unf-more summary::-webkit-details-marker { display: none; }
.unf-more summary::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s var(--un-ease);
}
.unf-more[open] summary::after { transform: rotate(-135deg); }
.unf-more .unf-grid { margin-top: 16px; }

@keyframes unf-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 560px) {
  .unf-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .unf-card { animation: none; }
  .unf-btn, .unf-more summary::after { transition: none; }
}
