/* akong-note-card · Web 样式 · 用 var(--ak-*) 接 @akong/tokens */

.ak-note-card {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: var(--ak-radius-lg);
  font-family: var(--ak-font-sans);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  outline: none;
  transition: background-color var(--ak-duration-fast) var(--ak-ease-out);
}

.ak-note-card:hover {
  background: var(--ak-bg-subtle);
}

.ak-note-card:active {
  opacity: 0.7;
}

.ak-note-card:focus-visible {
  outline: 2px solid var(--ak-border-strong);
  outline-offset: 2px;
}

/* === Cover === */
.ak-note-card__cover {
  position: relative;
  width: 100%;
  background: var(--ak-bg-secondary, var(--ak-bg-subtle));
  overflow: hidden;
  border-radius: var(--ak-radius-lg);
  /* aspect-ratio 由 inline style 注入 (取决于 ratio prop) */
}

.ak-note-card__cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--ak-radius-lg);
}

/* === Body === */
.ak-note-card__body {
  padding: var(--ak-space-2) 0;
  display: flex;
  flex-direction: column;
  gap: var(--ak-space-2);
}

.ak-note-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--ak-text-base);
  font-weight: var(--ak-weight-regular);
  line-height: var(--ak-leading-snug);
  color: var(--ak-fg);
  word-break: break-word;
}

/* === Footer === */
.ak-note-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ak-space-2);
  font-size: var(--ak-text-xs);
  color: var(--ak-fg-muted);
}

.ak-note-card__author {
  display: flex;
  align-items: center;
  gap: var(--ak-space-1);
  min-width: 0;
  flex: 1;
}

.ak-note-card__avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ak-bg-subtle);
  flex-shrink: 0;
}

.ak-note-card__avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--ak-fg-muted);
}

.ak-note-card__author-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* === Like button === */
.ak-note-card__like {
  display: inline-flex;
  align-items: center;
  gap: var(--ak-space-1);
  background: transparent;
  border: 0;
  padding: 2px 4px;
  margin: 0;
  cursor: pointer;
  font-size: var(--ak-text-xs);
  color: var(--ak-fg-muted);
  font-family: inherit;
  border-radius: var(--ak-radius-sm);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.ak-note-card__like[aria-disabled="true"] {
  cursor: default;
}

.ak-note-card__like:active:not([aria-disabled="true"]) {
  opacity: 0.7;
}

.ak-note-card__like:focus-visible {
  outline: 2px solid var(--ak-border-strong);
  outline-offset: 2px;
}

.ak-note-card__like-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ak-note-card__like--liked .ak-note-card__like-icon {
  fill: var(--ak-accent);
  stroke: var(--ak-accent);
}

.ak-note-card__like--liked {
  color: var(--ak-accent);
}
