﻿/* Reel News - Public Story History Page */

html.history-page,
.history-page body.detail-page {
  background: #132b42;
}

.story-history {
  width: calc(100% - 16px);
  max-width: 768px;
  margin: 4px auto 12px;
  padding: 18px 20px 20px;
  border-radius: 12px;
  color: #e7e9ec;
  font-family: Arial, sans-serif;
  letter-spacing: normal;
}

.story-history::before {
  content: none;
}

.story-history .back-link {
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.story-history .back-link:hover {
  text-decoration: underline;
}

.story-history h1 {
  margin: 18px 0 14px;
  color: inherit;
  font-size: 24px;
}

.history-header {
  padding-bottom: 24px;
  border-bottom: 1px solid #405467;
}

.history-description {
  margin: 0 0 16px;
  color: #c8d4e1;
  font-size: 14px;
}

.history-headline {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.history-section-heading,
.revision-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.history-section-heading {
  margin: 24px 0 16px;
}

.history-section-heading h2,
.revision-header h3 {
  margin: 0;
  color: inherit;
  font-size: 16px;
}

.history-section-heading > span {
  color: #c8d4e1;
  font-size: 14px;
}

.revision-list {
  display: grid;
  gap: 16px;
}

.revision-card {
  position: relative;
  min-width: 0;
  margin-inline-start: 32px;
  padding: 16px;
  border: 1px solid #405467;
  border-radius: 12px;
  background: #162435;
}

.revision-card-current {
  border-color: #5da9ff;
}

.revision-marker {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: -30px;
  display: flex;
  color: #a9bfd2;
}

.revision-card-current .revision-marker {
  color: #5da9ff;
}

.revision-card:not(:last-child)::before {
  position: absolute;
  inset-block: 27px -15px;
  inset-inline-start: -22px;
  width: 1px;
  background: #405467;
  content: "";
}

.revision-current {
  padding: 2px 8px;
  border-radius: 999px;
  background: #163452;
  color: #5da9ff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.story-history .revision-headline {
  margin: 12px 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.story-history .revision-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 10px 0;
  color: #c8d4e1;
  font-size: 14px;
}

.revision-meta svg {
  flex-shrink: 0;
}

.story-history .revision-link {
  display: inline-block;
  padding: 6px 8px;
  border: 1px solid #405467;
  border-radius: 6px;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.revision-card-current .revision-link {
  border-color: #0866c6;
  background: #0866c6;
  color: #fff;
}

.story-history .revision-link:hover {
  text-decoration: underline;
}

.story-history a:focus-visible {
  outline: 2px solid #5da9ff;
  outline-offset: 3px;
}

@media (max-width: 420px) {
  .story-history {
    padding-inline: 12px;
  }

  .revision-card {
    padding: 12px;
  }
}
