/* Changelog page: release feed with channel filters and search.
   Dark is the default theme, light is opted into with html[data-theme="light"]. */

.cl-hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.cl-hero-cta .primary-buttom,
.cl-hero-cta .secondary-button {
  width: auto;
  max-width: none;
}

/* Toolbar */
.cl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 800px;
  margin-top: 48px;
}
.cl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cl-pill {
  border: 1px solid #333;
  border-radius: 999px;
  background: transparent;
  color: #999;
  padding: 8px 18px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.cl-pill:hover {
  color: #ededec;
  border-color: #4a4a4a;
}
.cl-pill.is-active {
  background: #ededec;
  border-color: #ededec;
  color: #121212;
}

.cl-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 0;
  max-width: 320px;
}
.cl-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: #777;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.cl-search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border: 1px solid #333;
  border-radius: 999px;
  background: #181818;
  color: #ededec;
  font-family: Inter, sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .18s ease;
  -webkit-appearance: none;
  appearance: none;
}
.cl-search-input::placeholder { color: #777; }
.cl-search-input:focus { border-color: #22c55f; }

/* Feed */
.cl-feed {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
}
.cl-entry {
  display: flex;
  flex-direction: column;
  padding: 44px 0;
  border-top: 1px solid #282828;
}
.cl-entry:first-child { border-top: 0; padding-top: 8px; }
.cl-entry[hidden] { display: none; }

.cl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cl-date {
  color: #777;
  font-family: Inter, sans-serif;
  font-size: 14px;
  line-height: 1.2;
}
.cl-channel,
.cl-chip {
  /* inline-block, not flex: a <mark> from the search must not turn the label
     into separate flex items, which would swallow the space before it */
  display: inline-block;
  border-radius: 999px;
  padding: 4px 12px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1.4;
}
.cl-channel.is-stable {
  background: rgba(34, 197, 95, .14);
  color: #22c55f;
}
.cl-channel.is-beta {
  background: #262626;
  color: #c9c9c7;
}
.cl-chip {
  border: 1px solid #333;
  color: #888;
  font-weight: 500;
}

.cl-title {
  color: #ededec;
  margin: 0;
  font-family: Sf Pro Display, Arial, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
}
.cl-version {
  color: #777;
  margin-top: 8px;
  font-family: Courierprime, Courier New, monospace;
  font-size: 14px;
  line-height: 1.3;
}
.cl-whats-new {
  color: #ededec;
  margin-top: 28px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.cl-group { margin-top: 22px; }
.cl-group-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #ededec;
  margin: 0 0 10px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.cl-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 7px;
  background: #1f1f1f;
}
.cl-group-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cl-group-icon.is-new { color: #22c55f; background: rgba(34, 197, 95, .14); }
.cl-group-icon.is-fixes { color: #e0a33c; background: rgba(224, 163, 60, .14); }
.cl-group-icon.is-improvements { color: #7f9cf5; background: rgba(127, 156, 245, .14); }

.cl-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.cl-list li {
  position: relative;
  color: #999;
  padding-left: 33px;
  margin-top: 8px;
  font-family: Inter, sans-serif;
  font-size: 16px;
  line-height: 25px;
}
.cl-list li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #5a5a5a;
}

/* Search matches */
mark.cl-mark {
  background: rgba(34, 197, 95, .28);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

.cl-empty {
  color: #999;
  margin: 0;
  padding: 48px 0;
  font-family: Inter, sans-serif;
  font-size: 16px;
  text-align: center;
}
.cl-empty[hidden] { display: none; }

/* Light theme */
html[data-theme="light"] .cl-pill { border-color: #dfdfdf; color: #4f4d4b; }
html[data-theme="light"] .cl-pill:hover { color: #181818; border-color: #c4c4c4; }
html[data-theme="light"] .cl-pill.is-active { background: #181818; border-color: #181818; color: #fff; }
html[data-theme="light"] .cl-search-input { background: #fff; border-color: #dfdfdf; color: #181818; }
html[data-theme="light"] .cl-entry { border-top-color: #e5e5e5; }
html[data-theme="light"] .cl-title { color: #181818; }
html[data-theme="light"] .cl-whats-new,
html[data-theme="light"] .cl-group-title { color: #181818; }
html[data-theme="light"] .cl-list li,
html[data-theme="light"] .cl-empty { color: #4f4d4b; }
html[data-theme="light"] .cl-date,
html[data-theme="light"] .cl-version { color: #767472; }
html[data-theme="light"] .cl-channel.is-beta { background: #f1f0ef; color: #4f4d4b; }
html[data-theme="light"] .cl-channel.is-stable { background: rgba(17, 138, 61, .12); color: #118a3d; }
html[data-theme="light"] .cl-chip { border-color: #dfdfdf; color: #767472; }
html[data-theme="light"] .cl-group-icon { background: #f1f0ef; }
html[data-theme="light"] .cl-group-icon.is-new { color: #118a3d; background: rgba(17, 138, 61, .12); }
html[data-theme="light"] .cl-list li::before { background: #bdbdbd; }
html[data-theme="light"] mark.cl-mark { background: rgba(17, 138, 61, .2); }

/* Wide screens: the release header sits in its own column and stays pinned
   until the next release scrolls up to it. --cl-sticky-top is set in js/changelog.js. */
@media screen and (min-width: 1024px) {
  .cl-toolbar,
  .cl-feed { max-width: 1060px; }

  .cl-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: 56px;
    align-items: start;
  }
  .cl-pin {
    position: sticky;
    top: var(--cl-sticky-top, 136px);
    padding-bottom: 8px;
  }
  .cl-body { min-width: 0; }
  .cl-whats-new { margin-top: 0; }
}

/* Narrow screens: the header pins as a bar over the body it belongs to. */
@media screen and (max-width: 1023px) {
  .cl-pin {
    position: sticky;
    /* the bar starts right under the navbar and carries the gap as its own
       padding, so nothing scrolls through above it */
    top: calc(var(--cl-sticky-top, 136px) - 16px);
    z-index: 3;
    background: #121212;
    box-shadow: 0 10px 12px -10px rgba(0, 0, 0, .75);
    padding-top: 16px;
    padding-bottom: 14px;
  }
  html[data-theme="light"] .cl-pin {
    background: var(--sb-light-bg, #fff);
    box-shadow: 0 10px 12px -10px rgba(0, 0, 0, .18);
  }
  .cl-pin .cl-title { font-size: 23px; }
  .cl-pin .cl-version { margin-top: 5px; }
  .cl-whats-new { margin-top: 14px; }
}

@media screen and (max-width: 767px) {
  .cl-toolbar { flex-direction: column; align-items: stretch; margin-top: 24px; }
  /* Column flex would read flex-basis as a height, so the field is pinned to its own size. */
  .cl-search { flex: 0 0 auto; max-width: none; }
  .cl-entry { padding: 32px 0; }
  .cl-title { font-size: 25px; }
  .cl-hero-cta .primary-buttom,
  .cl-hero-cta .secondary-button { width: 100%; }
}
