:root {
  /* base */
  --body-color: 18,18,18;

  /* surfaces */
  --bg-primary: 204,237,255;
  --bg-secondary: 28,28,30;
  --bg-tertiary: 32, 32, 36;

  /* text */
  --color: 243,243,243;
  --text-muted: 140, 140, 150;

  --accent: 91,192,255;
  --ring: 24, 119, 242;

  /* borders */
  --border: 50, 50, 55;

  /* status */
  --text-success: 70, 190, 110;
  --text-danger: 235, 70, 70;
}

@font-face {
    font-family: 'base';
    src: url('/fonts/basic.woff2') format('woff2'),
         url('/fonts/basic.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'icon';
    src: url('/fonts/ico5.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

*{
    -webkit-tap-highlight-color: transparent;
    font-family: 'base'!important;
}

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

h1, h2, h3, h4, p{
    margin: 0;
}

.place{
    max-width: 560px;
}

html, body {
    height: 100%;
    margin: 0;
    padding: .3rem!important;
}

body{
    background: rgb(var(--body-color));
    color: rgb(var(--color));
}

.bot{
    padding-bottom: 100px;
}

/*ADAPTIVE FUNCTIONS*/

@media (hover: hover) and (pointer: fine) {
    body {
        zoom: 1.4!important;
    }
    
}
@media (hover: none) and (pointer: coarse) and (min-width: 768px) {
    body {
        zoom: 1.1!important;
    }
    
    .navigation-mobile{
        left: 50%!important;
        transform: translateX(-50%)!important;
        margin-bottom: 20px;
        background: rgba(var(--bg-primary), .9)!important;
        backdrop-filter: blur(10px);
        border-radius: 1.6rem;
    }
    
    button.base{
        font-size: 1.26rem!important;
    }
    
    input.base{
        padding-left: 30px!important;
        height: 52px!important;
        font-size: 1.2rem;
        border-radius: 1.3rem;
    }
    
    .chat-avatar{
        min-height: 4rem;
        min-width: 4rem;
        max-height: 4rem;
        max-width: 4rem;
    }
    
    .profile-avatar{
        min-height: 6rem;
        min-width: 6rem;
        max-height: 6rem;
        max-width: 6rem;
    }
    
    .in-chat-avatar{
        min-height: 3rem;
        min-width: 3rem;
        max-height: 3rem;
        max-width: 3rem;
    }
    
    
    .chat-username{
        font-size: 1.2rem!important;
        line-height: 1.5;
    }
}

@media only screen and (max-width: 800px){
    
    button.base{
        font-size: 1.5rem!important;
    }
    
    input.base{
        padding-left: 30px!important;
        height: 52px!important;
        font-size: 1.2rem;
    }
    
    textarea.base{
        font-size: 14px!important;
    }
    
    .pc-100{
        min-width: 100%;
        max-width: 100%;
    }
    
    .profile-avatar{
        min-height: 6rem;
        min-width: 6rem;
        max-height: 6rem;
        max-width: 6rem;
    }
    
    .chat-avatar{
        min-height: 4rem;
        min-width: 4rem;
        max-height: 4rem;
        max-width: 4rem;
    }
    
    .in-chat-avatar{
        min-height: 3rem;
        min-width: 3rem;
        max-height: 3rem;
        max-width: 3rem;
    }

    .chat-username{
        font-size: 1.2rem!important;
        line-height: 1.5;
    }
}

.dropdown-menu li a {
    font-size: 1.4rem;
}
/*ELEMENTS PAGE*/


.chat-avatar{
        min-height: 3.2rem;
        min-width: 3.2rem;
        max-height: 3.2rem;
        max-width: 3.2rem;
    }
    
    .in-chat-avatar{
        min-height: 3rem;
        min-width: 3rem;
        max-height: 3rem;
        max-width: 3rem;
    }
    
    .chat-username{
        font-size: 1.2rem!important;
        line-height: 1.5;
    }
.bg-secondary {
    background: rgba(var(--bg-secondary), 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--border), 0.5);
}
#autoscale-textarea {
  width: 100%;
  min-height: 40px; /* Минимальная высота */
  max-height: 300px; /* Чтобы она не ушла в бесконечность */
  padding: 10px;
  resize: none;
  overflow-y: hidden;
  box-sizing: border-box;
  line-height: 1.5;
}

.bottom-navigation{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  height: 76px;
  padding: 10px 20px;

  background: rgb(var(--body-color));
  backdrop-filter: blur(18px);
  border-top: solid 1px rgba(var(--color), .1);

  z-index: 50;
}

/* Центрируем внутренности */
.bottom-navigation-inner{
  max-width: 700px;
  margin: 0 auto;

  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- ITEM --- */

.bnav-item{
  position: relative;
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  height: 48px;
  border-radius: 1.2rem;

  transition: background .2s ease;
}

/* --- ICON --- */

.bnav-icon{
  font-size: 1.55rem;
  color: rgba(var(--text-muted), .95);
  transition: color .2s ease, transform .2s ease, filter .2s ease;
}

/* --- ACTIVE STYLE (как тебе понравилось) --- */

.bnav-item.active .bnav-icon{
  color: rgb(var(--accent));
  transform: translateY(-2px);
  filter: drop-shadow(0 6px 14px rgba(var(--accent), .25));
}


/* --- PROFILE AVATAR --- */

.profile-avatar-nav{
  width: 30px;
  height: 30px;
  transition: all .2s ease;
}

.profile-active{
    border: solid 2px rgb(var(--accent));
}

.last-message-text {
    display: block;
    width: 100%;
    white-space: nowrap;      /* Не переносить на новую строку */
    overflow: hidden;         /* Скрыть всё, что не влезло */
    text-overflow: ellipsis;  /* Добавить троеточие в конце */
}

/* Обязательно для родителя, иначе flex-бокс будет расширяться бесконечно */
.indent-very-small.w-100 {
    min-width: 0;
}

.icon-btn{
    border: none;
    outline: none;
}

.icon-btn-colored:hover{
    color: rgb(var(--accent));
    background: transparent;
    
    transition: background .3s;
}

.icon-btn-colored:hover{
    
    background: rgba(var(--accent), .1);
}

.nav-active{
    color: rgb(var(--accent))!important;
}

.navigation-mobile a{
    width: 30%;
}

.right-fixed{
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: rgb(var(--accent));
    color: #000;
    border-radius: 50%;
    border: solid 3px rgb(var(--body-color));
    font-size: 1rem;
}

.right-fixed-nav{
    position: absolute;
    right: 0;
    top: -10px;
    display: flex;
    align-items: center;
    font-size: 12px;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: rgb(var(--accent));
    color: #000;
    border-radius: .46rem;
}

.status-dot{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(var(--accent), .12);
}

.status-online{ background: rgb(var(--text-success)); }
.status-offline{ background: rgba(var(--text-muted), .8); }

.icon-bg{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.icon-bg-btn{
    background: transparent;
}

/*ELEMENTS UI*/

input.base{
    color: rgb(var(--color));
    background: rgb(var(--bg-secondary));
    outline: none;
    height: 52px;
    font-size: 1.2rem;
    /*border: solid 2px rgb(var(--border));*/
    border: none;
    border-radius: 1.3rem;
    padding: 0.5rem;
    padding-left: 1rem!important;
    
    transition: border-color .3s, filter 0.3s;
}


button.base{
    outline: none;
    border: none;
    font-size: 1.5rem!important;
    border-radius: 999px;
    padding: 1rem 2.5rem;
    
    transition: background .3s, filter 0.3s;
}

button.base:hover{
    cursor: pointer;
}

a.base{
    text-decoration: none;
    
    transition: color .3s, filter 0.3s;
}

textarea.base{
    color: rgb(var(--color));
    background: rgb(var(--bg-secondary));
    outline: none;
    height: 36px;
    font-size: 1.2rem;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    padding-left: 1rem!important;
    resize: none;
    transition: border-color .3s;
}

textarea.base:focus{
    
}

.icon-font{
    font-family: 'icon'!important;
}

/*CUSTOM UI*/

input[type=checkbox]{
  position: absolute;
  z-index: 3;
  opacity: 0;
  margin-left: 0px;
  width: 1.4em;
  height: 1.4em;
}

input[type=checkbox]+label {
  display: inline-flex;
  align-items: center;
  user-select: none;
}
input[type=checkbox]+label::before {
  content: '';
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  flex-shrink: 0;
  flex-grow: 0;
  background-color: rgb(var(--bg-primary));
  border-radius: 0.4em;
  margin-right: 0.5em;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 50% 50%;
  transition: all .3s;
}

input[type=checkbox]:checked+label::before {
      box-shadow: 0 0 0 0.25rem rgba(var(--accent),.25);  
      background-color: rgb(var(--accent));
    }

a.primary{
    color: rgb(var(--color));
}

a.primary:hover{
    filter: brightness(40%);
}


.input-suffix-wrapper{
    position: relative;
    display: flex;
    align-items: flex-start;
}

.input-suffix-wrapper textarea{
    padding-right: 80px !important;
    min-height: 90px;
    resize: none;
}

.input-suffix{
    position: absolute;
    right: 16px;
    top: 12px;
    font-size: 0.85rem;
    pointer-events: none;
    opacity: .7;
}

.bg-light-accent{
  background: rgba(var(--accent), .8);
  border-radius: 1rem;
}

a.colored{
    color: rgb(var(--accent));
}

a.colored:hover{
    color: rgb(var(--color));
}

button.primary{
    color: rgb(var(--color));
    background: rgb(var(--bg-secondary));
}

button.primary:hover{
    filter: brightness(120%);
}

button.colored{
    color: #fff;
    background: rgb(var(--accent));
}

button.colored:hover{
    filter: brightness(120%);
}

/*BOOTSTRAP ANALOG*/

.border{
    border: solid 1px rgb(var(--border));
}

.message-out{
    color: #000;
}

.text-muted{
    color: rgb(var(--text-muted));
}

.text-danger{
    color: rgb(var(--text-danger));
}

.overflow-auto{
    overflow: auto;
}

.text-success{
    color: rgb(var(--text-success));
}

.text-color{
    color: rgb(var(--color));
}

.text-accent{
    color: rgb(var(--accent));
}

.bg-primary{
    background: rgb(var(--bg-primary));
}

.bg-transparent{
    background: transparent;
}

.bg-colored{
    background: rgb(var(--accent));
}

.bg-secondary{
    background: rgb(var(--bg-secondary));
}

.rounded{
    border-radius: 1.2rem;
}

/* Скругление только слева */
.rounded-start {
    border-radius: 1.2rem 0 0 1.2rem;
}

/* Скругление только справа */
.rounded-end {
    border-radius: 0 1.2rem 1.2rem 0;
}

/* Скругление только сверху */
.rounded-top {
    border-radius: 1.2rem 1.2rem 0 0;
}

/* Скругление только снизу */
.rounded-bottom {
    border-radius: 0 0 1.2rem 1.2rem;
}

.rounded-circle{
    border-radius: 50%;
}

.d-flex{
    display: flex;
}

.d-none{
    display: none;
}

.d-block{
    display: block;
}

.d-grid{
    display: grid;
}

.grid-start{
    justify-self: left;
}

.grid-end{
    justify-self: end;
}

.position-relative{
    position: relative;
}

.flex-column{
    flex-direction: column;
}

.flex-wrap{
    flex-wrap: wrap;
}

.align-items-center{
    align-items: center;
}

.justify-content-center{
    justify-content: center;
}

.justify-content-between{
    justify-content: space-between;
}

.pos-center{
    margin: 0 auto;
}

.text-break{
    word-break: break-all;
}

.cursor-pointer{
    cursor: pointer;
}

.text-left{
    text-align: left;
}

.text-center{
    text-align: center;
}

.text-right{
    text-align: right;
}

.w-25{
    width: 25%;
}

.w-50{
    width: 50%;
}

.w-75{
    width: 75%;
}

.w-100{
    width: 100%;
}

.w-content{
    width: fit-content;
}

.h-100{
    height: 100%;
}

.h-content{
    height: fit-content;
}

.indent-very-small{
    gap: 6px;
}

.indent-small{
    gap: 10px;
}

.indent-norm{
    gap: 16px;
}

.indent-big{
    gap: 24px;
}

.border-none{
    border: none;
}

.p-very-small{
    padding: 8px;
}

.p-small{
    padding: 12px;
}

.p-norm{
    padding: 24px;
}

.px-small{
    padding-left: 20px;
    padding-right: 20px;
}

hr{
    border: solid 1px rgb(var(--border));
}

.input-group{
    border-radius: 1rem;
}

.input-group .title{
    background: rgb(var(--body-color));
    position: absolute;
    left: 1rem;
    top: 0; 
    transform: translateY(-50%);
    color: rgb(var(--accent));
    font-size: 1rem;
}

.input-group input{
    width: 100%;
}

#message-conteiner{
    -ms-overflow-style: none; /* for Internet Explorer, Edge */
    scrollbar-width: none; /* for Firefox */
    overflow-x: hidden;
    width: 100%;
}

.message{
    word-break: break-all;
    line-height: 1.5;
}

/* Основной контейнер */

.dropdown {
  position: relative;
  display: inline-block;
}

/* Стили триггера */
.dropdown-trigger {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
  padding: 5px;
  border-radius: 8px;
  transition: background 0.3s;
}

.avatar-small {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-norm {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-big {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-active{
    border: solid 2px rgb(var(--accent));
}

/* Само меню */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  
  
  width: max-content;
  min-width: 100%;
  white-space: nowrap;
  
  background: rgb(var(--bg-primary));
  border-radius: 1rem;
  padding: 8px 0;
  list-style: none;
  display: none;
  z-index: 100;
}

/* Добавьте отступы по бокам, чтобы текст не прилипал к краям */
.dropdown-menu li a {
  display: block;
  border-radius: .8rem;
  font-size: 1.6rem;
  padding: 10px 25px; /* Увеличили боковой padding */
  color: #fff;
  text-decoration: none;
}

.dropdown-menu li a:hover { background: rgb(var(--accent)); color: #fff; }

/* Скрываем полосу прокрутки, сохраняя функционал */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE и Edge */
    scrollbar-width: none;     /* Firefox */
}

.no-scrollbar::-webkit-scrollbar {
    display: none;             /* Chrome, Safari и Opera */
}

