@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

:root {
    --c-teal: #1f9d96;
    --c-teal-dark: #2c5d58;
    --c-brown: #402423;
    --c-gray: #d9d9d9;
    --c-red: #bc2525;
    --card-background: linear-gradient(
        255.38deg,
        #1f9d96 -80.18%,
        #f8f8f8 90.34%
    );
}
* {
    padding: 0;
    margin: 0;
    border: 0;
}

*,
*:before,
*:after {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

:focus,
:active {
    outline: none;
}

a:focus,
a:active {
    outline: none;
}

nav,
footer,
header,
aside {
    display: block;
}

html,
body {
    height: 100%;
    width: 100%;
    font-size: 100%;
    line-height: 1;
    font-size: 14px;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    font-family: 'Source Sans 3', sans-serif;
}

body::-webkit-scrollbar {
    width: 0;
}

body.lock {
    overflow: hidden;
}

input,
button,
textarea {
    font-family: inherit;
}

input::-ms-clear {
    display: none;
}

button {
    cursor: pointer;
}

button::-ms-focus-inner {
    padding: 0;
    border: 0;
}

a,
a:visited {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

ul li {
    list-style: none;
}

img {
    vertical-align: top;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: 400;
}

.main__container {
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-image: url('./images/back.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}
.main__wrapper {
    width: 100%;
    height: 100%;
    backdrop-filter: blur(50px);
    position: absolute;
    z-index: 100;
}
.main__wrapper-content {
    width: 100%;
    height: 100%;

    position: relative;
    z-index: 200;
    padding: 20px;
    padding-left: 30px;
}
.main__logo {
}
.main__block {
    width: 1120px;
    height: calc(100% - 40px);
    background-color: #fff;
    border-radius: 20px;
    position: absolute;
    left: calc(50% - 490.5px);
    top: 20px;
    border: 2px solid #9f9190;
    box-shadow: 6px 6px 9.6px 2px #00000040 inset;
}
.main__block-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 30px 50px;
}
.main__block-version {
    font-weight: 600;

    font-size: 16px;

    line-height: 100%;
    letter-spacing: 0%;
    color: #8a8a8a;
}
.main__block-desc {
    margin-top: 100px;
    font-weight: 600;

    font-size: 48px;

    line-height: 100%;
    letter-spacing: 0%;

    display: flex;
    align-items: center;
}

.chat_logo {
    width: 201px;
    height: 201px;
    margin-right: 30px;
}
.chat_logo img {
    width: 201px;
    height: 201px;
}
.chat__desc h1 {
    font-size: 45px;
    font-weight: 600;
    color: #333333;
}
.gradient-text {
    background: linear-gradient(90deg, #1f9d96, #2c5d58, #bc2525);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    display: inline-block;
}

.chat_desc-text {
    font-weight: 600;
    color: #33333380;
    font-size: 40px;

    line-height: 100%;
    letter-spacing: 0%;
}
.chat__cards-wrapper {
    width: 100%;
    height: 175px;
    margin-top: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat__card-element {
    width: 296px;
    height: 175px;
    background: linear-gradient(255.38deg, #1f9d96 -80.18%, #f8f8f8 90.34%);
    border-radius: 16px;
    border: 1px solid #ffffff;
}
.chat__card-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    padding: 15px;
}
.chat__card-logo {
    height: 35px;
    width: 35px;
    background-color: var(--c-red);
    opacity: 0.9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat__card-logo i {
  color: #fff;
  font-size: 20px;
  font-weight: 400;
}
.chat__card-name {
    color: var(#333333);

    font-weight: 700;
    font-style: Bold;
    font-size: 16px;

    line-height: 140%;
    letter-spacing: 0.5px;
    vertical-align: middle;
    height: 23px;
}
.chat__card-text {
    height: 56px;

    font-weight: 400;

    font-size: 11px;

    line-height: 140%;
    letter-spacing: 1.25%;
    vertical-align: middle;
}

.chat__form-answers{

  height: 320px;
  width: 873px;
  position: absolute;
  z-index: 500;
  bottom: 150px;
  left: calc(50% - 436.5px);
}



.chat__form-container {
  position: absolute;
  width: 873px;
  background-color: #D9D9D999;
  height: 80px;
  bottom: 51px;
  left: calc(50% - 436.5px);
  border-radius: 50px;
}
.chat__form-form {
  width: 100%;
  height: 100%;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat__form-form input{
  width: 700px;
  height: 30px;
  background-color: rgba(0, 0, 0, 0);
}
.chat__form-form  button{
  background-color: #1F9D96;
  border-radius: 100px;
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}





.chat_created {
    position: absolute;
    width: 267px;
    bottom: 8px;
    left: calc(50% - 133.5px);

    font-weight: 500;

    font-size: 14px;

    line-height: 100%;
    letter-spacing: 0%;
    color: #8a8a8a;
}



/* --- Переключатель состояния: как только начинается чат --- */
.is-chatting .chat__cards-wrapper { display: none !important; }
.is-chatting .chat__form-answers { display: block !important; }

/* --- Лента сообщений --- */
.chat__form-answers {
  width: 873px;
  left: calc(50% - 436.5px);
  position: absolute;
  bottom: 150px;
  z-index: 500;
  display: none; /* по умолчанию скрыт */
}

.chat__thread{
  height: 320px;
  overflow: auto;
  padding: 16px;
  background: #ffffff;

  border-radius: 16px;

}

/* сообщение */
.msg{ display:flex; gap:10px; margin-bottom:12px; align-items:flex-end; }
.msg .avatar{
  flex: 0 0 34px;
  width:34px; height:34px; border-radius:50%;
  display:grid; place-items:center;
  font-size:12px; font-weight:700; letter-spacing:.3px;
  background:#eef2f7; color:#2b2f36; border:1px solid #e5e7eb;
}
.msg .bubble{
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  word-wrap: break-word;
}
.msg.bot .bubble{ background:#f5f6f9; border:1px solid #e8e9ef; color:#111; }
.msg.user{ justify-content: flex-end; }
.msg.user .avatar{ order:2; display:none; } /* аватар юзера можно скрыть */
.msg.user .bubble{
  background: linear-gradient(135deg, var(--c-teal) 0%, var(--c-teal-dark) 100%);
  color:#fff; border:none;
}

/* индикатор печати */
.typing{
  display:flex; gap:6px; align-items:center;
  padding: 8px 0 0 8px;
}
.typing .dot{
  width:8px;height:8px;border-radius:50%;
  background:#c7ccd6; opacity:.7; animation: bounce 1.2s infinite;
}
.typing .dot:nth-child(2){ animation-delay:.15s; }
.typing .dot:nth-child(3){ animation-delay:.3s; }
@keyframes bounce{
  0%,80%,100%{ transform: translateY(0); opacity:.5; }
  40%{ transform: translateY(-6px); opacity:1; }
}

/* небольшие декоративные штрихи */
.chat__thread::-webkit-scrollbar{ width:8px; }
.chat__thread::-webkit-scrollbar-thumb{
  background:#d7dbe3; border-radius:8px;
}


/* Скрыть карточки и показать чат, когда начинается диалог */
.is-chatting .chat__cards-wrapper { display: none !important; }
.chat__form-answers { display: none; }              /* по умолчанию скрыто */
.is-chatting .chat__form-answers { display: block; } /* показываем при чате */







@media only screen and (max-width: 1370px) {
    .main__block {
        left: calc(60% - 490.5px);
    }
}
@media only screen and (max-width: 1270px) {
    .main__logo {
        display: none;
        visibility: hidden;
    }
    .main__wrapper-content {
        padding: 10px;
    }
    .main__block {
        position: initial;
        width: 100%;
        height: 100%;
        min-height: 600px;
        left: initial;
    }

    .main__block-wrapper{
        padding: 15px 15px;
    }
    .main__block-version{
        font-size: 9px;
    }
    .main__block-desc{
        margin-top: 5px;
    }
    .chat_logo {
    width: 50px;
    height: 50px;
    margin-right: 20px;
}
.chat_logo img{
    width: 100%;
    height: 100%;

}
.chat__desc h1 {
    font-size: 22px;
}
.chat_desc-text{
    font-size: 22px;
}
.chat__cards-wrapper{
    margin-top: 10px;
    height: initial;
    width: 100%;
    flex-direction: column;
}
.chat__card-element{
    margin-top: 10px;
    width: 280px;
    height: 140px;
}
.chat__card-container{
    padding: 13px;
}
.chat__form-container{
    width: 92%;
    left: initial;
}
.chat__form-form input {    
    width: 232px;
}

.chat__form-answers{
        width: 94%;
    /* left: calc(50% - 436.5px); */
    position: absolute;
    bottom: 150px;
    z-index: 500;
    left: initial;
    height: calc(100% - 300px);
}
.chat__thread{
    height: 100%;
}
}
