/* 🔹 Блюр-эффект */


#blurBackground {
    backdrop-filter: blur(2px);
	z-index: 0 !important;
}

#chatTitle {
    font-size: 50px;
    position: relative;
    top: -2%;
    left: 50%;
    transform: translateX(-50%);
    width: 35%;
    display: inline-block;
    overflow: hidden;
    /*box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.8);*/
}

@keyframes shine {
    from {
        left: -100%;
    }
    to {
        left: 100%;
    }
}

.logo-container {
    position: relative;
    display: inline-block;
    width: fit-content; /* Автоматически подстраивает размер по логотипу */
    overflow: hidden; /* Обрезает блик за границами */
    top: -20px;
}

.light-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 150%;
    height: 100%;
    
    background: linear-gradient(120deg, 
        transparent 48%, 
        rgba(255, 255, 255, 0.8) 49%,  /* Сделали свет уже */
        transparent 50%);

    animation: shine 4s infinite linear;
    pointer-events: none; /* Чтобы не мешать кликам */
}



@keyframes slideUp {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
  to {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
}


#chatContainer {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 70%;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 100000;
    overflow: hidden;
   /* animation: slideUp 0.7s ease-in-out forwards;*/
    animation: slideDown 0.5s ease-in-out forwards;
}

#chatContainer.active {
    display: block;
    animation: slideUp 0.7s ease-in-out forwards;
}




/* 🔹 История чата (только вертикальный скроллинг) */
#chatOutput {
    height: 65%; /* Увеличиваем высоту */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    font-size: 16px;
    color: black;
    overflow-wrap: break-word; /* 🔥 Автоматический перенос строк */
    border: none;
  border-radius: 8px;
  background-color: #e0e0e0; /* Светло-серый фон */
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.2), inset -2px -2px 5px rgba(255, 255, 255, 0.7);
  padding: 10px;
  text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);

}

/* 🔹 Форма отправки (фиксирована внизу) */
#chatForm {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: calc(100% - 20px);
    display: flex;
    flex-direction: column;
    background: white;
    border-top: 1px solid #ccc;
}

/* 🔹 Кнопка закрытия чата */
#closeChat {
    position: absolute;
    right: 10px; /* Смещаем кнопку вправо */
    top: 10px; /* Выравниваем с заголовком */
}

/* 🔹 Поле ввода (перенос строк, прокрутка) */
#messageInput {
    width: 100%;
    min-height: 40px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
    color: white;
    background: black;
    margin-bottom: 8px;
    overflow-wrap: break-word; /* 🔥 Корректный перенос строк */
    overflow-y: auto; /* 🔥 Включаем прокрутку, если текст длинный */
    resize: none;
}



@keyframes blink {
    0% { background-color: #8133ca; }
    50% { background-color: #3c6dbf; }
    51% { background-color: #10b9fc; }
    100% { background-color: #10fce8; }

    0% { color: #ffffff; }
    50% { color: #ffffff; }
    51% { color: #000000; }
    100% { color: #000000; }
}

/* 🔹 Кнопка отправки */
#sendMessageButton {
    width: 100%;
    padding: 12px;
    background:#3c6dbf !important;
    color: white !important;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    cursor: pointer;
    /*animation: blink 3s infinite alternate;*/
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.8);
}

#sendMessageButton:hover {
    background: #333 !important;
    color: #ffffff !important;
}



/* 🔹 Кнопка открытия чата */
#openChat {
    position: fixed;
    bottom: 20px;
    left: 85%;
    transform: translateX(-50%);
    /*background: #3c6dbf;*/
    color: rgb(255, 255, 255);
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.5s ease-in-out;
    z-index: 85000;
    animation: blink 2s infinite steps(1);
}

#openChat:hover {
    background: #333 !important;
    color: #ffffff !important;
}

#openChat.clicked {
    background-color: #333 !important;
    color: #333 !important;
    transform: scale(0);
    opacity: 0;
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
}




/*


html, body {
    touch-action: manipulation; /* 🔥 Отключаем масштабирование жестами */
/*  overscroll-behavior: none; /* ✅ Запрещаем странные скроллы */

/*
}

*?


/* 🔹 Стили для МОБИЛЬНЫХ (ширина экрана меньше 768px) */
@media screen and (max-device-width: 768px){
    
    #chatTitle{
        width: 50%;
        top: 0;
        left: 0%;
    transform: translateX(0%);
    }

    

   /* #chatContainer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 75%;
    width: 90%;
    margin-top: 5%;
    overflow: hidden;
    border-radius: 12px;
    background: #f9f9f9;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}*/




	#messageInput {
		width: 100%;
		min-height: 10px;
		padding: 10px;
		border-radius: 6px;
		border: 1px solid #ccc;
		font-size: 16px;
		color: white;
		background: black;
		margin-bottom: 8px;
		overflow-wrap: break-word; /* 🔥 Корректный перенос строк */
		overflow-y: auto; /* 🔥 Включаем прокрутку, если текст длинный */
		/*resize: none;*/
	}



    #chatOutput {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px;
    height: 75%;
}




        #openChat {
        position: fixed;
            bottom: 5%;
            left: 15%;
            transform: translateX(-50%);
            background: #3c6dbf;
            color: rgb(255, 255, 255);
            padding: 20px 24px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 40px;
            transition: all 0.3s ease-in-out;
            /*width: 80%;*/
            text-align: center;
            touch-action: manipulation;
        }



        #chatForm {
                position: relative;
                bottom: auto;
                left: auto;
                transform: none;
                width: 100%;
                flex: 0 0 20%;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                padding: 1vh;
                gap: 1vh;
                box-sizing: border-box;
                background: white;
                border-top: 1px solid #ccc;
            }

#messageInput {
    flex: 1 1 60%;
    font-size: 2.5vh;
    padding: 1vh;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: black;
    color: white;
    resize: none;
    overflow: hidden;
}

#sendMessageButton {
    flex: 1 1 40%;
    font-size: 2.5vh;
    padding: 1vh;
    border-radius: 12px;
    background: #3c6dbf;
    color: white;
    border: none;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
}

        #closeChat {
        position: absolute;
        right: 25px; 
        top: 10px; 
        font-size: 20px;
        width: 10%;
    }
    
   .logo-container {
    flex: 0 0 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1vh;
    top: 1vh;
}

#chatTitle {
    width: 50%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

#closeChat {
    position: absolute;
    top: 3vh;
    right: 1vh;
    font-size: 2.5vh;
    z-index: 10;
    border-radius: 4vh;
}

#chatContainer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    height: 90%;
    max-height: 100dvh;
    width: 90%;
    padding: 1vh;
    box-sizing: border-box;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


}


#chatOutput a {
  color: #0645AD;
  text-decoration: underline;
}

#chatOutput a:hover {
  color: #0b61d8;
  text-decoration: none;
}

