/* ==========================================================================
   Draftzenn — Content History
   ========================================================================== */

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color 160ms var(--ease);
}

.history-row:hover {
  border-color: var(--line-strong);
}

.history-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.history-row-topic {
  font-family: var(--font-display);
  font-size: 16.5px;
  color: var(--ink);
  margin-bottom: 6px;
  overflow-wrap: break-word;
}

.history-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.history-row-date {
  font-size: 12.5px;
  color: var(--ink-faint);
}

.history-row-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  flex: 0 0 auto;
}

.history-stat {
  text-align: right;
  min-width: 56px;
}

.history-stat .value {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
}

.history-stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin-top: 2px;
}

.history-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.history-label {
  font-weight: 500;
  white-space: nowrap;
}

.history-label.label-strong {
  color: var(--pine-dark);
  border-color: var(--pine-tint);
  background: var(--pine-tint);
}

.history-label.label-average {
  color: var(--ochre);
  border-color: #F3E9D6;
  background: #F3E9D6;
}

.history-label.label-low {
  color: var(--ink-soft);
  border-color: var(--line);
  background: var(--paper);
}

.history-label.label-unrated {
  color: var(--ink-faint);
  border-color: var(--line);
  background: var(--paper);
}

.history-row-remove {
  font-size: 12.5px;
  color: var(--ink-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
}

.history-row-remove:hover {
  color: var(--error);
  text-decoration: underline;
}

@media (max-width: 860px) {
  .history-row {
    flex-wrap: wrap;
  }

  .history-row-stats {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
  }

  .history-stat {
    text-align: left;
  }

  .history-row-side {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .history-row {
    padding: 16px;
  }

  .history-row-stats {
    gap: 14px;
  }
}

/* Prompt 20: distinguishes YouTube-imported rows from hand-entered ones. */
.tag-imported {
  background: var(--accent-soft, #eef4ff);
  border-color: var(--accent, #3b5bfd);
  color: var(--accent, #3b5bfd);
}
