@keyframes pop-in {
  0% {
    opacity: 0;
    transform: translateX(32px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
html {
  background: #0f1117;
  color: #ebeced;
  min-height: 100%;
}

html, input, button {
  font-size: medium;
  font-family: "PT Sans Caption", "PT Sans", sans-serif;
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
}

::-webkit-scrollbar {
  width: 1ch;
  background-color: #0f1117;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  background-clip: padding-box;
  background-color: #3a526e;
  border-radius: 3px;
}

body {
  margin: 0;
  min-height: 100vh;
}
body #coggers {
  min-height: 100vh;
}
body #coggers .chat-list {
  flex-grow: 1;
}
body #roof {
  position: -webkit-sticky;
  position: sticky;
  z-index: 1;
  top: 0;
}
body #floor {
  position: -webkit-sticky;
  position: sticky;
  z-index: 1;
  bottom: 0;
}

a:link, a:visited, a:hover {
  color: inherit;
  text-decoration: none;
}

button:enabled:hover,
input[type=checkbox]:enabled:hover,
label.show-concealed {
  cursor: pointer;
}

p {
  margin: 0;
}

.smol {
  font-size: small;
}

.muted {
  color: #4b6788;
}

.flex-spacer {
  flex-grow: 1;
}

.icon {
  display: inline-flex;
  align-items: baseline;
}
.icon::before {
  flex-grow: 1;
}

#error-hint {
  position: fixed;
  left: 16px;
  bottom: 16px;
  max-width: 21em;
  background: #8c2531;
  color: #ebeced;
}
#error-hint p {
  margin: 6px;
}

/* expand/collapse buttons */
.chat.link input[type=checkbox].icon {
  border-radius: 3px;
  color: #95b0d4;
  background-color: #0f1117;
}
.chat.link input[type=checkbox].icon:enabled:hover {
  color: #ebeced;
  background-color: #3a526e;
}

#connection-state, #credit, #home {
  font-size: small;
  color: #4b6788;
  background: #0f1117;
  padding: 2px 5px;
  border-radius: 3px;
}

#credit a, a#home {
  color: #95b0d4;
}
#credit a:hover, a#home:hover {
  color: #ebeced;
}

.row {
  margin: 5px 0;
  grid-gap: 3px;
  display: flex;
  align-items: end;
  justify-content: end;
}

#controls > *:not(.flex-spacer) {
  color: #95b0d4;
  background-color: #0f1117;
  border-radius: 3px;
  line-height: 1;
  min-width: 1.6rem;
  padding: 6px 4px;
}

#controls .icon + * {
  padding-left: 2px;
}

@media (pointer: fine) {
  #controls button:hover, #controls a:hover, #controls input:hover {
    color: #ebeced;
    background-color: #3a526e;
  }
}
#controls button.active, #controls button:checked, #controls a.active, #controls a:checked, #controls input.active, #controls input:checked {
  color: #ebeced;
  background-color: #111f2f;
}

#coggers[data-load=loaded] .loading {
  display: none;
}
.loading .icon {
  animation: 987ms spin linear infinite;
}

#coggers #settings {
  display: none;
}

#coggers[data-show-filters] #settings {
  display: block;
}
#coggers[data-show-filters] #floor {
  background: #0f1117;
  border-top: 2px dashed #0f1117;
  background-clip: padding-box;
}

#coggers[data-content=all] #settings .search {
  display: none;
}

button.page-more {
  background: transparent;
  appearance: none;
  height: 2rem;
  color: #95b0d4;
  border-radius: 3px;
  border: 1px solid transparent;
}
button.page-more:enabled {
  border-color: #3a526e;
}

#floor {
  padding: 0 5px;
}

#settings input[type=text] {
  color: #ebeced;
  appearance: none;
  background: transparent;
  padding: 3px;
  border-bottom: 1px solid #111f2f;
}
#settings input[type=text]:focus {
  border-color: #3a526e;
}
#settings a[href^="/nsfw"].active {
  background-color: #f89ea5;
  color: #490e15;
}
#settings label {
  color: #95b0d4;
  display: flex;
  grid-gap: 3px;
  align-items: center;
}
#settings input[type=text] {
  color: #95b0d4;
}
#settings input[type=text]::placeholder {
  font-size: small;
  color: #4b6788;
  opacity: 1;
}
#settings {
  /* literally just custom checkboxes? */
}
#settings label.for-checkbox input[type=checkbox] {
  position: relative;
  display: flex;
  border-radius: 0.5rem;
  content: "";
  width: 2em;
  height: 1rem;
  background: #111f2f;
  transition: background 123ms cubic-bezier(0.77, 0, 0.18, 1);
}
#settings label.for-checkbox input[type=checkbox]::after {
  border-radius: 0.5em;
  content: "";
  width: 1rem;
  height: 1rem;
  background: #3a526e;
  transition: all 123ms cubic-bezier(0.77, 0, 0.18, 1);
}
#settings label.for-checkbox input[type=checkbox]:checked::after {
  margin-left: 1em;
}
@media (pointer: fine) {
  #settings label.for-checkbox input[type=checkbox]:hover::after {
    margin-left: 0.25em;
  }
  #settings label.for-checkbox input[type=checkbox]:hover:checked::after {
    margin-left: 0.75em;
  }
}
#settings label.for-checkbox.expand-nsfw input[type=checkbox]:checked::after {
  background: #f89ea5;
}

#coggers {
  display: flex;
  flex-direction: column;
  max-width: 669px;
  grid-gap: 9px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/*  */
#coggers > * {
  margin: 0 3px;
}

#coggers[data-is-tailing] #controls .tail {
  display: none;
}

.chat-items .icon {
  font-size: 120%;
  height: 100%;
  align-self: center;
}
.chat-items .icon {
  width: 1.6em;
}

.chat-items {
  grid-gap: 3px;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

.chat .nick {
  font-weight: bold;
}
.chat .timestamp {
  font-size: small;
  color: #aaabac;
}
.chat .data {
  font-family: "PT Sans", sans-serif;
}
.chat:target {
  background: #111f2f;
}

.chat.msg .timestamp {
  color: #aaabac;
  font-size: small;
}
.chat.msg .nick {
  margin: 0 3px;
}
.chat.msg .data {
  font-size: small;
}

.chat.broadcast {
  font-size: small;
  color: #aaabac;
}
.chat.broadcast .data {
  margin-left: 3px;
}

.chat.link {
  animation: 234ms pop-in cubic-bezier(0.77, 0, 0.18, 1);
}

.chat.link {
  grid-gap: 2px;
  display: flex;
  flex-direction: column;
}
.chat.link .one-line {
  min-width: 0;
}
.chat.link [data-why-conceal=nsfw] {
  background-image: repeating-linear-gradient(-60deg, rgba(248, 158, 165, 0.3), rgba(248, 158, 165, 0.3) 2em, transparent 2em, transparent 4em), radial-gradient(circle at top left, #f89ea5, #f8465c);
}
.chat.link [data-why-conceal=nsfw] .show-concealed {
  color: #f89ea5;
  text-shadow: 1px 1px #490e15;
}
.chat.link [data-why-conceal=nsfl] {
  background-image: repeating-linear-gradient(-60deg, rgba(232, 193, 122, 0.1), rgba(232, 193, 122, 0.1) 2em, transparent 2em, transparent 4em), radial-gradient(circle at top left, #e8b530, #6f5618);
}
.chat.link [data-why-conceal=nsfl] .show-concealed {
  color: #e8c17a;
  text-shadow: 1px 1px #322400;
}
.chat.link [data-why-conceal=nsfw],
.chat.link [data-why-conceal=nsfl] {
  border-radius: 3px;
  width: fit-content;
  overflow: clip;
}
.chat.link [data-why-conceal=nsfw] .show-concealed,
.chat.link [data-why-conceal=nsfl] .show-concealed {
  font-weight: bold;
}
.chat.link [data-why-conceal=nsfw],
.chat.link [data-why-conceal=nsfl] {
  position: relative;
}
.chat.link [data-why-conceal=nsfw] .show-concealed,
.chat.link [data-why-conceal=nsfl] .show-concealed {
  position: absolute;
  height: 100%;
  width: 100%;
}
.chat.link [data-why-conceal=nsfw] .show-concealed:hover,
.chat.link [data-why-conceal=nsfl] .show-concealed:hover {
  background-color: rgba(235, 236, 237, 0.2);
}
.chat.link [data-why-conceal=nsfw] .show-concealed,
.chat.link [data-why-conceal=nsfl] .show-concealed {
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat.link .show-concealed {
  display: none;
}
.chat.link [data-why-conceal=nsfw] > *:not(.show-concealed),
.chat.link [data-why-conceal=nsfl] > *:not(.show-concealed) {
  visibility: hidden;
}
.chat.link {
  /* sizing? */
}
.chat.link .one-line {
  display: flex;
  grid-gap: 6px;
}
.chat.link .one-line > *:first-child {
  flex-grow: 1;
  flex-shrink: 0;
}
.chat.link .one-line > *:last-child {
  text-align: right;
}
.chat.link .one-line > * {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.chat.link {
  /* font shit? */
}
.chat.link .one-line {
  align-items: baseline;
}
.chat.link .one-line .url {
  color: #4b6788;
  font-size: small;
}
.chat.link .one-line .url .domain {
  color: #95b0d4;
}
.chat.link .one-line .url:visited {
  color: #876483;
}
.chat.link .one-line .url:visited .domain {
  color: #d4b9d0;
}
.chat.link .details .title {
  font-weight: bold;
  line-height: 1.2em;
  max-height: 2.4em;
  overflow: hidden;
}
.chat.link .details .description {
  font-family: "PT Sans", sans-serif;
  font-size: small;
  line-height: 1.2em;
  max-height: 2.4em;
  overflow: hidden;
}
.chat.link .attr {
  font-size: small;
  padding: 0 3px;
  border-radius: 3px;
  color: #95b0d4;
  background: #111f2f;
}
.chat.link .attr.nsfw {
  color: #490e15;
  background: #f89ea5;
}
.chat.link .attr.nsfl {
  color: #322400;
  background: #e8c17a;
}
.chat.link .attr.img {
  color: #292d02;
  background: #cad286;
}
.chat.link .attr.vid {
  color: #082729;
  background: #7ec1c7;
}
.chat.link.error .data-icon, .chat.link.pending .data-icon {
  color: #95b0d4;
}
.chat.link .details {
  display: flex;
  grid-gap: 6px;
}
.chat.link .details .where-text-goes {
  display: flex;
  grid-gap: 3px;
  flex-direction: column;
  align-items: start;
}
.chat.link.page .thumb {
  height: 72px;
  width: 72px;
}
.chat.link.page .thumb.wide {
  width: 144px;
}
.chat.link.page .thumb {
  flex-shrink: 0;
  flex-grow: 0;
}
.chat.link.page .thumb img {
  width: 100%;
}
.chat.link.image .thumb, .chat.link.video .thumb {
  max-height: 312px;
  max-width: 522px;
  overflow: hidden;
}
.chat.link .thumb img {
  border-radius: 3px;
  object-fit: cover;
  max-width: 100%;
  height: 100%;
}
