@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Open+Sans:wght@400;700&display=swap');

:root {
  --background-color: #121212;
  --background-color-light: #262626;
  --primary-text-color: #E0E0E0;
  --secondary-text-color: #BDBDBD;
  --accent-color: #e8dec1;

  --success-color: #72b35f;

  --font-family-headings: 'Lora', serif;
  --font-family-body: 'Open Sans', sans-serif;

  --base-font-size: 16px;
  --line-height-body: 1.6;
  --line-height-headings: 1.3;

  --letter-spacing-headings: 0.025em;
  --letter-spacing-body: 0.01em;
  --rounding: 10px;
  --page-max-width: 65ch;
}

* {
  box-sizing: border-box;
}

button {
  cursor: pointer;
}

body {
  scroll-behavior: smooth;
  background-color: var(--background-color);
  color: var(--primary-text-color);
  font-family: var(--font-family-body);
  font-size: var(--base-font-size);
  line-height: var(--line-height-body);
  letter-spacing: var(--letter-spacing-body);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-family-headings);
  line-height: var(--line-height-headings);
  letter-spacing: var(--letter-spacing-headings);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 700;
  color: var(--primary-text-color);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.375rem;
}

p {
  margin-bottom: 1.25em;
  max-width: var(--page-max-width);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

a.clickover:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1000;
}

a:hover,
a:visited,
a:focus {
  color: var(--accent-color);
}

.post {
  margin: 0 auto;
}

.post__body {
  width: fit-content;
  margin: 0 auto;
  padding: 1rem;
}

.post__title {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 170px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100%;
  margin: 1rem;
  border-radius: 10px;
  text-align: center;
}

.post__title--subtitle {
  font-size: .8rem;
  margin: 0;
  text-align: center;
  color: gray;
  display: inline-flex;
  align-items: top;
  margin-right: 2rem;
}

.post__title--subtitle:last-child {
  margin-right: 0;
}

.post__title--subtitle .material-symbols-outlined {
  margin-right: .5rem;
}

.post__img-container {
  transition: all .5s ease-in-out;
  position: relative;
}

.post__img-container .placeholder {
  width: 100%;
  transform: scale(1);
  border-radius: 10px;
}

.post__img-container .picture {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 1;
  width: 100%;
  height: 100%;
  transition: opacity .5s linear;
  border-radius: 10px;
}

.lazy{
  filter: blur(5px);
}

.lazy .picture {
  opacity: 0;
}

.post__title h1 {
  max-width: 30ch;
  color: var(--accent-color);
  margin: 0 auto;
  text-shadow: var(--background-color) 0px 0 50px;
  background-color: var(--background-color);
  padding: 0 1rem;
}

.post__tags {
  display: flex;
  gap: 1rem;
}

.post__tags p {
  padding: .10rem 0.5rem;
  font-size: .8rem;
  border-radius: 100px;
  background-color: var(--secondary-text-color);
  color: var(--background-color);
}

.posts-list {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 1rem;
}

.posts-list__item {
  position: relative;
}

.posts-list__item img {
  max-width: 100%;
}

.posts-list__item a:hover {
  display: inline-block;
}

.menu {
  padding: 1rem 0;
}

.menu-item {
  padding: .3rem;
  background-color: var(--accent-color);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item span {
  color: var(--background-color);
}

.menu-item:hover {
  color: var(--background-color);
  border-radius: 10px;
}

.menu-home {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 2rem;
  margin: 1rem;
  z-index: 10;
}

@keyframes fade-in {
from { opacity: 0; }
}

@keyframes fade-out {
to { opacity: 0; }
}

@keyframes slide-from-right {
  from { transform: translateX(40px); }
}

@keyframes slide-to-left {
  to { transform: translateX(-40px); }
}

.slide-it {
  view-transition-name: slide-it;
}

::view-transition-old(slide-it) {
  animation: 180ms cubic-bezier(0.4, 0, 1, 1) both fade-out,
    600ms cubic-bezier(0.4, 0, 0.2, 1) both slide-to-left;
}
::view-transition-new(slide-it) {
  animation: 420ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in,
    600ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}

@media (min-width: 768px) {
  :root {
    --base-font-size: 17px;
  }

  .menu-home {
    position: sticky;
    bottom: 2.25rem;
    padding-bottom: 0;
  }

  h1 {
    text-align: center;
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  .post__title {
    min-height: 400px;
    margin-top: 0;
  }
}

@media (min-width: 1024px) {
  :root {
    --base-font-size: 18px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }
}

.post {
  max-width: var(--page-max-width);
  margin: 0 auto;
  max-height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.chrono-header {
  padding: 1em;
}

.chrono-header h1 {
  margin-top: 0;
  color: var(--accent-color);
  text-align: center;
  margin: 4rem 0;
}

#current_event_datetime {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background-color: var(--background-color);
  z-index: 15;
  color: var(--secondary-text-color);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-flow: row wrap;
}

#current_event_datetime p {
  margin: 0;
}

#current_event_datetime span {
  color: var(--accent-color);
}

#current_event_datetime > div {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

#event-list {
  position: relative;
  scroll-snap-align: top;
  padding: 0 1em;
  max-height: 100vh;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  max-width: var(--page-max-width);
  margin: 0 auto;
  scrollbar-width: none;
}

#event-list.block-scroll {
  overflow: hidden;
}

#event-list:after {
  content: "";
  position: sticky;
  display: block;
  bottom: 0;
  left: 0;
  right: 0;
  margin-left: -1rem;
  margin-right: -1rem;
  z-index: 10;
  height: 100px;
  background: linear-gradient(transparent, var(--background-color));
}

#event-list:before {
  content: "";
  position: sticky;
  display: block;
  top: 0;
  left: 0;
  right: 0;
  margin-left: -1rem;
  margin-right: -1rem;
  z-index: 10;
  height: 140px;
  background: linear-gradient(var(--background-color), transparent);
}

.event-item {
  position: relative;
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex: none;
  margin-left: 1rem;
}

.event-item:before {
  content: "";
  display: block;
  width: 0.75rem;
  height: 0.75rem;
  position: absolute;
  left: calc(-1.375rem - 1.5px);
  top: calc(50% - 0.375rem);
  background-color: var(--background-color);
  border: 2px solid var(--accent-color);
  border-radius: 100px;
  z-index: 4;
}

.event-item__time {
  position: absolute;
  font-size: 0.8em;
  right: 1rem;
  top: -0.9em;
  border-radius: calc(var(--rounding) / 2);
  border: 1px solid var(--accent-color);
  padding: 0 0.4em;
  background-color: var(--background-color);
}

.event-item__source-button {
  background-color: transparent;
  color: var(--accent-color);
  border: none;
  font-weight: bold;
  font-size: 1rem;
  padding: 0;
  display: flex;
  gap: .5rem;
  align-items: center;
}

.event-item__anchor {
  position: absolute;
  bottom: 40%;
  height: 5px;
}

.event-item__inner {
  position: relative;
  border: 1px solid var(--accent-color);
  padding: 1rem;
  border-radius: var(--rounding);
  animation: fade-in forwards 1s;
  opacity: 0;
}

.event-item__title {
  margin: 0;
}

.event-item__content {
  overflow-x: scroll;
  width: 100%;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.event-item__content-scroll {
  display: flex;
  width: max-content;
}

.event-item__body {
  margin-bottom: 0;
  border-top: 1px dashed var(--accent-color);
  padding-top: 1rem;
  scroll-snap-align: top;
}

.has-context > .material-symbols-outlined {
  display: block;
  text-align: center;
}

.event-item__context {
  margin-bottom: 0;
  border-top: 1px dashed var(--accent-color);
  padding-top: 1rem;
  min-height: 100%;
  font-size: 0.9em;
  font-style: italic;
}

.event-item__line-bottom {
  position: absolute;
  bottom: 0;
  height: 50%;
  left: -1rem;
  border-left: 1px dashed var(--accent-color);
  margin: 0 auto;
}

.event-item__line-top {
  position: absolute;
  top: 0;
  height: 50%;
  left: -1rem;
  border-left: 1px dashed var(--accent-color);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .event-item {
    max-height: 50vh;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#chat-connection {
  color: var(--secondary-text-color);
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

#chat-connection > .material-symbols-outlined {
  color: var(--success-color);
}

.chat-disclaimer {
  font-size: .8rem;
  color: var(--secondary-text-color);
  text-align: center;
  display: block;
  margin: 0 auto;
  font-style: italic;
  margin-top: .5em;
}

.chat-room {
  margin: 2rem 0 5rem 0;
  padding: 0 1rem;
}

.chat-room label {
  font-size: .9rem;
}

.chat-room button {
  background: var(--accent-color);
  color: var(--background-color);
  border: none;
  border-radius: 100px;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-room button[disabled] {
  background: var(--secondary-text-color);
}

.chat-room textarea {
  outline: 0;
  border: none;
  width: 100%;
  background-color: var(--background-color);
  color: var(--primary-text-color);
  resize: none;
  border-top-left-radius: var(--rounding);
  border-top-right-radius: var(--rounding);
  background-color: var(--background-color-light);
  padding: 1rem;
  margin-top: .5rem;
}

.agent-answers {
  margin-bottom: 2rem;
}

.chat-box-label {
  display: flex;
  gap: 1rem;
}

.chat-box-label #questions_left{
  margin-left: auto;
  font-style: italic;
  color: var(--secondary-text-color);
}

.out-of-questions {
  text-align: center;
  font-size: .9rem;
  color: var(--secondary-text-color);
  padding: 3rem 1rem;
  border-radius: var(--rounding);
  background-color: var(--background-color-light);
}

hr {
  border: none;
  height: 1px;
  background-color: var(--background-color-light);
  display: block;
}

.chat-box {
  max-width: 80%;
  margin-top: .5rem;
}

.chat-byline {
  font-size: .9rem;
  display: flex;
  gap: .5rem;
}

.chat-byline--right {
  justify-content: flex-end;
}

.agent-answers__answer {
  margin-right: auto;
  border: 1px solid var(--accent-color);
  border-radius: var(--rounding);
  padding: 1rem;
  font-size: .9em;
  margin-bottom: 1rem;
  animation: 420ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in,
    600ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-left;
}

.agent-answers__message {
  margin-right: auto;
  border: 1px solid;
  border-radius: var(--rounding);
  padding: 1rem;
  font-size: .9em;
  margin-bottom: 1rem;
  animation: 420ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in,
    600ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-left;
}

.agent-answers__message .agent {
  border-color: var(--accent-color);
}

.agent-answers__message .person {
  border-color: var(--background-color-light);
}

.agent-answers__question {
  margin-left: auto;
  border-radius: var(--rounding);
  background-color: var(--background-color-light);
  padding: 1rem;
  font-size: .9em;
  margin-bottom: 1rem;
  align-self: flex-end;
  display: inline-block;
  margin-left: auto;
  animation: 420ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in,
    600ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}

.question-wrapper {
  display: flex;
  justify-content: flex-end;
}

.agent-answers__placeholder {
  display: block;
  border-radius: 100px;
  padding: 1rem .7rem;
  font-size: .9em;
  margin-bottom: 1rem;
  height: 1ch;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .5ch;
  background-color: var(--background-color-light);
  animation: 420ms cubic-bezier(0, 0, 0.2, 1) 200ms both fade-in;
}

.agent-answers__placeholder > div {
  height: 1ch;
  width: 1ch;
  border-radius: 100px;
  background-color: var(--secondary-text-color);
  animation: bounce infinite 1s ease-in-out;
}

.agent-answers__placeholder > div:nth-child(1) {
  animation-delay: .10s;
}

.agent-answers__placeholder > div:nth-child(2) {
  animation-delay: .20s;
}

.agent-answers__placeholder > div:nth-child(3) {
  animation-delay: .30s;
}

.agent-answers__send-container {
  margin-top: -.5rem;
  display: flex;
  justify-content: flex-end;
  background-color: var(--background-color-light);
  padding: 1rem;
  gap: 1rem;
  border-bottom-left-radius: var(--rounding);
  border-bottom-right-radius: var(--rounding);
}

@keyframes bounce {
  0% {
    transform: translateY(0px);
  }
  30% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(3px);
  }
  100% {
    transform: translateY(0px);
  }
}

.modal {
  position: fixed;
  inset: 1rem;
  background-color: var(--background-color);
  z-index: 20;
  max-width: 65ch;
  margin: 0 auto;
  border: 1px solid var(--accent-color);
  border-radius: var(--rounding);
  overflow-y: scroll;
  scrollbar-width: none;
  animation: 420ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in;
}

.modal__controls {
  padding: 1rem;
  border-top-right-radius: var(--rounding);
  border-top-right-radius: var(--rounding);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--background-color);
  border-bottom: 1px dashed var(--accent-color);
}

.modal__controls > button {
  cursor: pointer;
  border: none;
  background-color: var(--accent-color);
  border-radius: var(--rounding);
  padding: .5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal__inner {
  padding: 1rem;
}
