/* Updates Timeline Styles */

.site-updates {
  padding: 2rem 0 4rem;
}

/* ── Filter Bar (Product - Level 1) ── */
.updates-filter {
  margin: 0 0 0.5rem;
  display: flex;
  justify-content: center;
}

.updates-filter-container {
  width: 100%;
  max-width: 900px;
  padding: 0 2rem;
}

.updates-filter-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 0;
}

.updates-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #000;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-transform: uppercase;
  font-family: inherit;
}

.updates-filter-chip:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.updates-filter-chip:focus {
  outline: none;
}

.updates-filter-chip:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.updates-filter-chip--active {
  background-color: #fff;
  border-color: #000;
  color: #000;
}

.updates-filter-chip--active:hover {
  background-color: #f3f4f6;
  border-color: #000;
  color: #000;
  transform: none;
  box-shadow: none;
}

/* ── Variant Filter (Level 2) ── */
.updates-variant-filter {
  margin: 0 0 2rem;
  display: flex;
  justify-content: center;
}

.updates-variant-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #fff;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-family: inherit;
}

.updates-variant-chip:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.updates-variant-chip:focus {
  outline: none;
}

.updates-variant-chip:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.updates-variant-chip--active {
  background-color: #111827;
  border-color: #111827;
  color: #fff;
}

.updates-variant-chip--active:hover {
  background-color: #000;
  border-color: #000;
  color: #fff;
}

/* ── Timeline ── */
.updates-timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
}

/* ── Entry ── */
.updates-entry {
  display: flex;
  gap: 1.25rem;
  padding-bottom: 2rem;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  overflow: hidden;
}

.updates-entry.is-hidden {
  opacity: 0;
  max-height: 0;
  padding-bottom: 0;
  pointer-events: none;
}

/* ── Marker (icon + line) ── */
.updates-entry-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 40px;
  padding-top: 1.1rem;
}

.updates-entry-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.updates-entry-icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.updates-entry-line {
  display: block;
  width: 2px;
  flex-grow: 1;
  background-color: #e5e7eb;
  margin-top: 0.5rem;
}

.updates-entry:last-child .updates-entry-line {
  display: none;
}

/* ── Card ── */
.updates-entry-card {
  flex: 1;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.updates-entry-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ── Header ── */
.updates-entry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.updates-entry-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.02em;
}

.updates-entry-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.updates-entry-app {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background-color: #000;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

a.updates-entry-app:hover {
  background-color: #374151;
  color: #fff;
  text-decoration: none;
}

a.updates-entry-app:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}

.updates-entry-app .fa-external-link-alt {
  font-size: 0.5rem;
  margin-left: 0.2rem;
  opacity: 0.7;
  vertical-align: middle;
}

a.updates-entry-app:hover .fa-external-link-alt {
  opacity: 1;
}

.updates-entry-variant {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #374151;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.updates-entry-version {
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  font-family: monospace;
}

/* ── Title ── */
.updates-entry-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin: 0.4rem 0 0.6rem;
  line-height: 1.35;
}

/* ── Bullet Items ── */
.updates-entry-items {
  margin: 0;
  padding-left: 1.2rem;
  list-style-type: disc;
}

.updates-entry-items li {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 0.15rem;
}

.updates-entry-items li::marker {
  color: #9ca3af;
}

/* ── Truncated (beyond page limit) ── */
.updates-entry.is-truncated {
  display: none;
}

/* ── View More ── */
.updates-view-more {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1rem 2.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.updates-view-more-btn {
  cursor: pointer;
}

.updates-view-more-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ── Empty State ── */
.updates-empty {
  text-align: center;
  padding: 3rem 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.updates-empty p {
  font-size: 1rem;
  color: #6b7280;
  font-style: italic;
}

/* ── Responsive: tablet ── */
@media (max-width: 992px) {
  .updates-filter-container {
    max-width: 750px;
    padding: 0 1.5rem;
  }

  .updates-filter-list {
    gap: 0.65rem;
  }
}

/* ── Responsive: mobile ── */
@media (max-width: 768px) {
  .site-updates {
    padding: 1.5rem 0 3rem;
  }

  .updates-filter-container {
    max-width: 100%;
    padding: 0 1rem;
  }

  .updates-filter-list {
    gap: 0.5rem;
    padding: 0.75rem 0;
  }

  .updates-filter-chip {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .updates-variant-chip {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }

  .updates-timeline {
    max-width: 100%;
  }

  .updates-entry {
    gap: 0.75rem;
  }

  .updates-entry-marker {
    width: 34px;
  }

  .updates-entry-icon {
    width: 32px;
    height: 32px;
  }

  .updates-entry-card {
    padding: 1rem 1.1rem;
  }

  .updates-entry-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .updates-entry-title {
    font-size: 0.95rem;
  }

  .updates-entry-items li {
    font-size: 0.85rem;
  }
}

/* ── Responsive: small mobile ── */
@media (max-width: 576px) {
  .updates-filter-container {
    padding: 0 0.5rem;
  }

  .updates-filter-list {
    gap: 0.4rem;
    padding: 0.5rem 0;
  }

  .updates-filter-chip {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }

  .updates-variant-chip {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }

  .updates-entry-marker {
    width: 30px;
  }

  .updates-entry-icon {
    width: 28px;
    height: 28px;
  }

  .updates-entry-card {
    padding: 0.85rem 0.9rem;
    border-radius: 8px;
  }

  .updates-entry-title {
    font-size: 0.9rem;
  }

  .updates-entry-items {
    padding-left: 1rem;
  }

  .updates-entry-items li {
    font-size: 0.8rem;
  }
}

/* ── Extra small screens ── */
@media (max-width: 375px) {
  .updates-filter-list {
    gap: 0.3rem;
  }

  .updates-filter-chip {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }

  .updates-variant-chip {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
  }
}

/* ── Accessibility ── */

@media (prefers-contrast: high) {
  .updates-filter-chip,
  .updates-variant-chip {
    border-width: 2px;
  }

  .updates-entry-card {
    border-width: 2px;
    border-color: #000;
  }

  .updates-entry-variant {
    border-width: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .updates-filter-chip,
  .updates-variant-chip,
  .updates-entry,
  .updates-entry-card {
    transition: none;
  }

  .updates-filter-chip:hover,
  .updates-variant-chip:hover {
    transform: none;
  }

  .updates-entry.is-hidden {
    transition: none;
  }
}

/* ── Box sizing ── */
.site-updates *,
.site-updates *::before,
.site-updates *::after {
  box-sizing: border-box;
}
