@font-face {
  font-family: "PP Neue Montreal";
  src: url("/assets/PPNeueMontreal-Regular-C0RgVexg.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Lektorat;
  src: url("/assets/Lektorat-CondensedExtrabold-DSk2XJWP.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --about-orange: #f05235;
  --about-dark: #1b1a18;
  --about-light: #efede7;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--about-dark);
}

.about-chat-page {
  color: #fff;
  font-family: "PP Neue Montreal", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.about-chat {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 28px 54px;
  background:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    var(--about-dark);
  background-size: 100% 70px;
}

.about-chat__shell {
  width: min(940px, 100%);
  height: min(820px, calc(100dvh - 86px));
  min-height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 8px;
  background: rgba(8, 8, 7, .32);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
  transition: opacity 520ms ease, transform 720ms cubic-bezier(.2, .8, .2, 1);
}

.about-chat__head {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  background: rgba(27, 26, 24, .94);
}

.about-chat__eyebrow {
  margin: 0 0 5px;
  color: var(--about-orange);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
}

.about-chat__head h1 {
  margin: 0;
  color: #fff;
  font-family: Lektorat, Impact, sans-serif;
  font-size: 34px;
  line-height: .9;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.about-chat__online {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.about-chat__online::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: #39d77d;
  box-shadow: 0 0 0 5px rgba(57, 215, 125, .15);
}

.about-chat__thread {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 22px 22px 36px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-color: var(--about-orange) rgba(255, 255, 255, .06);
  scrollbar-width: thin;
}

.about-chat__thread::-webkit-scrollbar {
  width: 7px;
}

.about-chat__thread::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .06);
}

.about-chat__thread::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: var(--about-orange);
}

.about-chat__message {
  width: min(82%, 710px);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  flex: none;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity 260ms ease, transform 360ms cubic-bezier(.2, .8, .2, 1);
}

.about-chat__message.is-ruslan {
  align-self: flex-end;
  grid-template-columns: minmax(0, 1fr) 46px;
}

.about-chat__message.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.about-chat__avatar {
  grid-column: 1;
  width: 46px;
  height: 46px;
  border: 2px solid var(--about-orange);
  border-radius: 50%;
  object-fit: cover;
  background: #000;
}

.about-chat__message.is-ruslan .about-chat__avatar {
  grid-column: 2;
}

.about-chat__content {
  min-width: 0;
}

.about-chat__message.is-ruslan .about-chat__content {
  grid-column: 1;
  grid-row: 1;
}

.about-chat__name {
  margin: 0 0 5px;
  color: var(--about-orange);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

.about-chat__message.is-ruslan .about-chat__name {
  text-align: right;
}

.about-chat__bubble {
  margin: 0;
  padding: 13px 16px 14px;
  border-radius: 22px 22px 22px 7px;
  background: var(--about-light);
  color: #111;
  font-size: 17px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.about-chat__message.is-ruslan .about-chat__bubble {
  border-radius: 22px 22px 7px 22px;
  background: var(--about-orange);
  color: #fff;
}

.about-chat__message.is-typing {
  width: auto;
  max-width: 250px;
}

.about-chat__message.is-typing .about-chat__bubble {
  width: fit-content;
  min-width: 106px;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.about-chat__typing-label {
  margin-right: 5px;
  font-size: 13px;
  opacity: .68;
}

.about-chat__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .35;
  animation: about-chat-dot 900ms infinite ease-in-out;
}

.about-chat__dot:nth-child(3) {
  animation-delay: 120ms;
}

.about-chat__dot:nth-child(4) {
  animation-delay: 240ms;
}

.about-chat-page.is-leaving .about-chat__shell {
  opacity: 0;
  transform: translateY(-26px) scale(.985);
}

.about-chat__noscript {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(90%, 500px);
  margin: 0;
  transform: translate(-50%, -50%);
  text-align: center;
}

.about-chat__noscript a {
  color: var(--about-orange);
}

@keyframes about-chat-dot {
  0%, 60%, 100% {
    opacity: .3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (max-width: 767px) {
  .about-chat {
    align-items: stretch;
    padding: max(10px, env(safe-area-inset-top)) 10px calc(56px + env(safe-area-inset-bottom));
  }

  .about-chat__shell {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .about-chat__head {
    gap: 12px;
    padding: 15px 14px 13px;
  }

  .about-chat__eyebrow {
    margin-bottom: 4px;
    font-size: 9px;
  }

  .about-chat__head h1 {
    font-size: 25px;
  }

  .about-chat__online {
    gap: 7px;
    font-size: 10px;
  }

  .about-chat__online::before {
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 4px rgba(57, 215, 125, .15);
  }

  .about-chat__thread {
    gap: 11px;
    padding: 15px 10px 26px;
  }

  .about-chat__message {
    width: 93%;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }

  .about-chat__message.is-ruslan {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .about-chat__avatar {
    width: 38px;
    height: 38px;
  }

  .about-chat__name {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .about-chat__bubble {
    padding: 10px 12px 11px;
    border-radius: 18px 18px 18px 6px;
    font-size: 14px;
    line-height: 1.28;
  }

  .about-chat__message.is-ruslan .about-chat__bubble {
    border-radius: 18px 18px 6px 18px;
  }

  .about-chat__message.is-typing .about-chat__bubble {
    min-width: 96px;
    min-height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-chat__message,
  .about-chat__shell {
    transition-duration: 1ms;
  }

  .about-chat__dot {
    animation: none;
  }
}
