$placeholder-color: #9e9e9e;
$border-radius: 8px;
$border-radius-medium: 10px;
$border-radius-big: 12px;
$button-primary-background: #4EA4F6;

$color-green: #4DCD5E;
$color-error: #E53935;
$color-gray: #707579;
$color-blue: #50a2e9;

$darkgreen: #50af4f;
$color-text-green: $darkgreen;

$lightgrey: #dadce0;

$light: rgba($color-gray, 0.08);

//$small-screen: 720px;
$small-screen: 600px;
//$small-screen: 900px;
$medium-screen: 1275px;
$large-screen: 1680px;
//$large-screen: 16800px;

$floating-left-sidebar: 925px;

@mixin respond-to($media) {
  @if $media == handhelds {
    @media only screen and (max-width: $small-screen) { @content; }
    //@media only screen and (orientation: landscape) and (max-device-width: 896px) { @content; } // iPhone 11 Pro Max
  }
  @else if $media == small-screens {
    @media only screen and (min-width: $small-screen + 1) { @content; }
  }
  @else if $media == only-small-screens {
    @media only screen and (min-width: $small-screen + 1) and (max-width: $medium-screen) { @content; }
  }
  @else if $media == medium-screens {
    @media only screen and (min-width: $medium-screen + 1) { @content; }
  }
  @else if $media == only-medium-screens {
    @media only screen and (min-width: $medium-screen + 1) and (max-width: $large-screen) { @content; }
  }
  @else if $media == before-medium-screens {
    @media only screen and (max-width: $medium-screen) { @content; }
  }
  @else if $media == large-screens {
    @media only screen and (min-width: $large-screen + 1) { @content; }
  }
  @else if $media == not-handhelds {
    @media only screen and (min-width: $small-screen + 1) { @content; }
  }

  @else if $media == floating-left-sidebar {
    @media only screen and (min-width: $small-screen + 1) and (max-width: $floating-left-sidebar) { @content; }
  }
  @else if $media == until-floating-left-sidebar {
    @media only screen and (max-width: $floating-left-sidebar) { @content; }
  }
  @else if $media == no-floating-left-sidebar {
    @media only screen and (min-width: $floating-left-sidebar + 1) { @content; }
  }

  @else if $media == esg-top { // topbar + chat input + margin bottom + height of ESG 
    @media only screen and (min-height: 570px) and (min-width: $small-screen + 1) { @content; }
  }

  @else if $media == esg-bottom {
    @media only screen and (max-height: 569px) { @content; }
  }
}

:root {
  --z-below: -1;
  --color-gray: #c4c9cc;
  --color-gray-hover: rgba(112, 117, 121, .08);
  --layer-transition: .2s ease-in-out;
  //--layer-transition: .3s cubic-bezier(.33, 1, .68, 1);
  //--layer-transition: none;
  --btn-corner-transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
  --message-handhelds-margin: 5.5625rem;
  --message-beside-button-margin: 2.875rem;
  --message-time-background: rgba(0, 0, 0, .35);
  --messages-container-width: 728px;
  --esg-sticker-size: 80px;

  @include respond-to(handhelds) {
    --right-column-width: 100vw;
    --esg-sticker-size: 68px;
  }

  @include respond-to(not-handhelds) {
    --right-column-width: calc(#{$large-screen} / 4);
  }

  @include respond-to(only-medium-screens) {
    --right-column-width: 25vw;
  }
}

@import "partials/ico";
@import "partials/chatlist";
@import "partials/chat";
@import "partials/chatBubble";
@import "partials/sidebar";
@import "partials/leftSidebar";
@import "partials/rightSidebar";
@import "partials/mediaViewer";
@import "partials/ckin";
@import "partials/emojiDropdown";
@import "partials/scrollable";
@import "partials/slider";
@import "partials/selector";
@import "partials/gifsMasonry";
@import "partials/preloader";
@import "partials/ripple";
@import "partials/avatar";
@import "partials/document";
@import "partials/audio";

@import "partials/popups/popup";
@import "partials/popups/editAvatar";
@import "partials/popups/mediaAttacher";
@import "partials/popups/peer";
@import "partials/popups/stickers";
@import "partials/popups/datePicker";
@import "partials/popups/createPoll";

@import "partials/pages/pages";
@import "partials/pages/authCode";
@import "partials/pages/chats";
@import "partials/pages/password";

/* cyrillic */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Roboto'), local('Roboto-Regular'), url(assets/fonts/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2) format('woff2');
  unicode-range:U + 0400-045F, U + 0490-0491, U + 04B0-04B1, U + 2116
}

/* latin-ext */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Roboto'), local('Roboto-Regular'), url(assets/fonts/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2) format('woff2');
  unicode-range:U + 0100-024F, U + 0259, U + 1E00-1EFF, U + 2020, U + 20A0-20AB, U + 20AD-20CF, U + 2113, U + 2C60-2C7F, U + A720-A7FF
}

/* latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Roboto'), local('Roboto-Regular'), url(assets/fonts/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format('woff2');
  unicode-range:U + 0000-00FF, U + 0131, U + 0152-0153, U + 02BB-02BC, U + 02C6, U + 02DA, U + 02DC, U + 2000-206F, U + 2074, U + 20AC, U + 2122, U + 2191, U + 2193, U + 2212, U + 2215, U + FEFF, U + FFFD
}

/* cyrillic */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('Roboto Medium'), local('Roboto-Medium'), url(assets/fonts/KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.woff2) format('woff2');
  unicode-range:U + 0400-045F, U + 0490-0491, U + 04B0-04B1, U + 2116
}

/* latin-ext */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('Roboto Medium'), local('Roboto-Medium'), url(assets/fonts/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.woff2) format('woff2');
  unicode-range:U + 0100-024F, U + 0259, U + 1E00-1EFF, U + 2020, U + 20A0-20AB, U + 20AD-20CF, U + 2113, U + 2C60-2C7F, U + A720-A7FF
}

/* latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('Roboto Medium'), local('Roboto-Medium'), url(assets/fonts/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2) format('woff2');
  unicode-range:U + 0000-00FF, U + 0131, U + 0152-0153, U + 02BB-02BC, U + 02C6, U + 02DA, U + 02DC, U + 2000-206F, U + 2074, U + 20AC, U + 2122, U + 2191, U + 2193, U + 2212, U + 2215, U + FEFF, U + FFFD
}

html, body {
  height: 100%;
  width: 100%;
  -webkit-font-smoothing: antialiased;

  //@include respond-to(handhelds) {
    height: calc(var(--vh, 1vh) * 100);
  //}

  /* @include respond-to(handhelds) {
    //overflow-y: auto;
    height: 100%;
    min-height: 100%;
    min-width: 100%;
  }

  @include respond-to(not-handhelds) {
    width: 100%;
    height: 100%;
  } */
}

html {
  font-size: 16px;
  overflow: hidden;
}

/* body {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 0!important;
} */

a {
  color: $color-blue;
}

button, input, optgroup, select, textarea, html {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

input, textarea, button, select, a, div {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.whole {
  min-height: 100%;
  width: 100%;
  //min-width: 100%;
  margin: 0 auto;
  max-width: $large-screen;

  //@include respond-to(not-handhelds) {
    height: 100%;
  //}
}

.disable-hover/* ,
.disable-hover * */ {
  pointer-events: none !important;
}

@include respond-to(not-handhelds) {
  .only-handhelds {
    display: none !important;
  }
}

.container {
  margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
}

h4 {
  font-size: 2rem;
  //margin: 1.5rem 0 1rem 0;
  margin: 22px 0 14px;
  line-height: 110%;

  @include respond-to(handhelds) {
    font-size: 20px;
    margin: 2px 0 8px;
  }
}

input {
  caret-color: $button-primary-background;
}

input, textarea {
	-webkit-appearance: none;
} 

.subtitle {
  /* font-weight: 500; */
  color: #707579;
  line-height: 1.35;
}

.btn-icon {
  text-align: center;
  font-size: 1.5rem;
  line-height: 1.5rem;
  border-radius: 50%;
  transition: background-color .15s ease-in-out, opacity .15s ease-in-out;
  color: $color-gray;
  cursor: pointer;
  background-color: transparent;
  border: none;
  padding: .5rem;
  position: relative;
  overflow: hidden;
  
  /* kostil */
  display: flex;
  align-items: center;
  justify-content: center;

  &.active {
    color: $color-blue;
  }
  
  html.no-touch &:hover {
    background-color: var(--color-gray-hover);
  }

  &:disabled {
    pointer-events: none !important;
    opacity: .25;
  }
}

.btn-icon:disabled {
  color: #cacaca;
}

.btn-corner {
  --translateY: calc(100% + 20px);
  position: absolute !important;
  bottom: 20px;
  right: 20px;
  //transition: .2s ease;
  transition: var(--btn-corner-transition);
  transform: translate3d(0, var(--translateY), 0);
  z-index: 3;

  &.is-visible {
    --translateY: 0;
  }

  body.animation-level-0 & {
		transition: none !important;
	}
}

.danger {
  color: $color-error!important;
}

.btn-menu {
  visibility: hidden;
  position: absolute;
  background: #fff;
  box-shadow: 0 5px 8px 1px rgba(0,0,0,.24);
  z-index: 3;
  top: 100%;
  margin-top: 8px;
  padding: 9px 0;
  border-radius: $border-radius-medium;
  opacity: 0;
  transform: scale(.8);
  transition-property: opacity,transform,visibility;
  transition-duration: .2s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 16px;

  -webkit-user-select: none; /* disable selection/Copy of UIWebView */
  -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */

  &.active {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
  }

  &.bottom-left {
    right: 0;
    top: 100%;
    transform-origin: top right;
  }

  &.bottom-right {
    left: 0;
    top: 100%;
    transform-origin: top left;
  }

  &.top-left {
    top: initial;
    right: 0;
    bottom: 100%;
    transform-origin: bottom right;
  }

  &.top-right {
    top: initial;
    left: 0;
    bottom: 100%;
    transform-origin: bottom left;
  }

  &-item {
    display: flex;
    position: relative;
    padding: 0 40px 0 20px;
    height: 56px;
    cursor: pointer !important;
    pointer-events: all !important;
    background-position: 16px center;
    background-size: 24px 24px;
    background-repeat: no-repeat;
    color: #000;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    align-items: center;

    html.no-touch &:hover {
      background-color: rgba(112, 117, 121, 0.06);
    }

    &:before {
      color: $color-gray;
      font-size: 1.5rem;
      margin-right: 32px;
    }

    &.danger:before {
      color: $color-error;
    }
  
    @include respond-to(handhelds) {
      padding: 0 30px 0 16px;
      height: 50px;
    }
  }
}

#bubble-contextmenu, #dialogs-contextmenu {
	position: fixed;
	right: auto;
  bottom: auto;
  width: auto;
  z-index: 4;
}

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

  to {
    opacity: 1;
  }
}

@keyframes fade-out-opacity {
  0% {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes fade-in-backwards-opacity {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes fade-out-backwards-opacity {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fade-in-opacity-fade-out-opacity {
  0% {
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  50% {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: .5rem 1rem;
  background-color: rgba(0, 0, 0, .66);
  color: #fff;
  font-size: 1rem;
  border-radius: $border-radius-medium;
  animation: fade-in-opacity-fade-out-opacity 3s linear forwards;
  z-index: 5;
}

hr {
  width: 100%;
  border: none;
  border-bottom: 1px solid #DADCE0;
  margin: 0 0 8px;
}

.user-title, b/* , .user-last-message b */ {
  color: #000;
  font-weight: 500;
  //font-weight: normal;
}

.user-last-message b {
  font-weight: 400;
}

.avatar-edit {
  position: relative;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;

  &-canvas {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    background-color: $color-blue;
  }

  .tgico-cameraadd {
    position: absolute;
    font-size: 48px;
	  line-height: 48px;
    top: 50%;
    left: 50%;
    transform: translateY(-50%) translateX(-50%);
    z-index: 2;
    color: #fff;
  }

  .avatar-placeholder {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    filter: brightness(0.7);
  }
}

.input-wrapper {
  width: 360px;
  margin: 0 auto;
}

.input-field {
  position: relative;
  
  .arrow-down {
    position: absolute;
    content: " ";
    top: 50%;
    bottom: 0;
    right: 21px;
    cursor: pointer;
    
    height: 0;
    width: 0;
    
    border: solid #707579;
    border-radius: 1px;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 5px;
    vertical-align: middle;
    
    z-index: 2;
    
    margin-top: -9px;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    transition: .2s all;
  }
  
  label {
    position: absolute;
    color: $placeholder-color;
    left: 1rem;
    right: auto;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    transition: .2s all, .1s opacity;
    display: inline-block;
    cursor: text;
  }
  
  input {
    --border-width: 1px;
    border: var(--border-width) solid #DADCE0;
    border-radius: $border-radius-medium;
    //padding: 0 1rem;
    padding: 0 calc(1rem - var(--border-width));
    box-sizing: border-box;
    width: 100%;
    height: 54px;
    transition: .2s border-color;
    position: relative;
    z-index: 1;

    html.no-touch & {
      &:hover:not(:focus):not(.error):not(.valid) {
        border-color: var(--color-gray);
      }
    }

    @include respond-to(handhelds) {
      height: 50px;
    }
    /* font-weight: 500; */

    /* &:hover {
      border-color: #000;
    } */
    
    &:focus {
      --border-width: 2px;
      border-color: $button-primary-background;
      //padding: 0 calc(1rem - 1px);
    }
    
    &:disabled {
      background-color: #fff;
      color: #000;
    }
    
    &.error {
      border-color: $color-error;

      & + label {
        color: $color-error!important;
      }
    }

    &.valid {
      border-color: #26962F;
      
      & + label {
        color: #26962F !important;
      }
    }

    /* &.error, &.valid {
      transition: .2s border-width;
    } */
    
    &:focus ~ .arrow-down {
      margin-top: -4px;
      transform: rotate(225deg);
      -webkit-transform: rotate(225deg);
      border-color: $button-primary-background;
    }
    
    &:focus + label {
      color: $button-primary-background;
    }
    
    &:focus + label, &:valid + label, &:disabled + label {
      top: -.5rem;
      transform: none;
      padding: 0 5px;
      left: .75rem;
      font-size: 0.75rem!important;
      //color: #666;
      opacity: 1;
    }
  }
}

.checkbox-field {
  margin: 1.25rem 0;
  display: block;
  text-align: left;
  padding: 0 1.125rem;
  /* font-weight: 500; */
  position: relative;

  @include respond-to(handhelds) {
    margin-bottom: 27px;
  }
}

.radio-field {
  display: block;
	position: relative;
	padding-left: 3.5rem;
	text-align: left;
	margin: 1.25rem 0;
	line-height: 1.5rem;
  cursor: pointer;
  
  &.hidden-widget {
    cursor: default;

    .radio-field-main {
      &::before, &::after {
        visibility: hidden;
      }
    }
  }

  > input {
    &:checked {
      & ~ .radio-field-main {
        &::before {
          border-color: $button-primary-background;
        }
    
        &::after {
          opacity: 1;
        }
      }
    }
  }

  .radio-field-main {
    &::before, &::after {
      content: '';
      display: block;
      position: absolute;
      left: .25rem;
      top: 50%;
      width: 1.25rem;
      height: 1.25rem;
      transform: translateY(-50%);
    }

    &::before {
      border: 2px solid #8d969c;
      border-radius: 50%;
      background-color: white;
      opacity: 1;
      transition: border-color .1s ease, opacity .1s ease;
    }

    &::after {
      left: .5625rem;
      width: .625rem;
      height: .625rem;
      border-radius: 50%;
      background: $button-primary-background;
      opacity: 0;
      transition: opacity .1s ease;
    }

    /* .label {
      display: block;
      word-break: break-word;
    }

    .subLabel {
      display: block;
      font-size: 0.875rem;
      line-height: 1rem;
      color: var(--color-text-secondary);
    } */
  }
}

[type="checkbox"], [type="radio"] {
  box-sizing: border-box;
  padding: 0;
  opacity: 0;
  z-index: var(--z-below);
  position: absolute;
}

[type="checkbox"] {
  & + span {
    position: relative;
    padding-left: 3.5rem;
    cursor: pointer;
    display: inline-block;
    height: 25px;
    line-height: 25px;
    user-select: none;
    transition: .2s opacity;

    &:before, &:after {
      content: '';
      left: 0;
      position: absolute;
      transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s;
    }
    
    &:before {
      border-radius: 2px;
      z-index: 1;
    }
    
    &:after {
      height: 18px;
      width: 18px;
      z-index: 0;
      border: 2px solid $button-primary-background;
      border-radius: 3px;
      top: 50%;
      transform: translateY(-50%);
    }
  }
  
  &:not(:checked) + span:before {
    width: 0;
    height: 0;
    border: 2px solid transparent;
    left: 6px;
    top: 10px;
    transform: rotateZ(45deg);
    transform-origin: 100% 100%;
  }
  
  &:checked + span:before {
    top: 4px;
    left: -1px;
    width: 8px;
    height: 14px;
    border-top: 2px solid transparent;
    border-left: 2px solid transparent;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotateZ(45deg);
    transform-origin: 100% 100%;
  }
  
  &:not(:checked) + span:after {
    background-color: transparent;
    border-color: #8d969c;
  }
  
  &:checked + span:after {
    background-color: $button-primary-background;
  }

  &:disabled + span {
    cursor: default;
    opacity: .25;
  }
}

.input-wrapper > * + * {
  margin-top: 1.5rem;
}

.select-wrapper {
  max-height: 23.5rem;
  /* height: auto; */
  position: absolute;
  width: 100%;
  top: calc(100% + .5rem);
  left: 0;
  overflow: hidden;
  background-color: #fff;
  z-index: 3;
  border-radius: $border-radius-medium;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  transition: opacity .2s ease-out, transform .2s ease-out;
  transform: scale(.95);
  transform-origin: top center;
  opacity: 0;

  &.active {
    transform: scale(1);
    opacity: 1;
  }
  
  ul {
    margin: .5rem 0;
  }
  
  li {
    /* display: flex; */
    align-items: center;
    padding: 0 1rem;
    justify-content: space-between;
    height: 3.5rem;
    cursor: pointer;
    /* font-weight: 500; */
    
    text-align: left;
    display: grid;
    grid-template-columns: calc(26px + 2rem) 1fr 50px;
    
    html.no-touch &:hover {
      background-color: var(--color-gray-hover);
    }
  }
  
  // +2 px bc of whitespace
  .emoji {
    height: 26px;
    width: 26px;
    font-size: 26px;
    line-height: 1;
  }

  .scrollable {
    position: relative;
  }
}

.phone-code {
  color: $placeholder-color;
  text-align: right;
}

::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: #909192;
  opacity: 1; /* Firefox */
}

:-ms-input-placeholder { /* Internet Explorer 10-11 */
  color: #a2acb4;
}

::-ms-input-placeholder { /* Microsoft Edge */
  color: #a2acb4;
}

input:focus, button:focus {
  outline: none;
}

// this dimensions will be used for monkey business
.auth-image {
  width: 166px;
  height: 166px;
  margin: 0 auto 18px;
  
  @include respond-to(handhelds) {
    width: 120px;
    height: 120px;
  }
}

/* .phone-wrapper {
  display: flex;
  align-items: ;
} */

.phone-edit {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-left: .4rem;
  opacity: .5;
  transition: .2s;
  cursor: pointer;
  font-size: 1.5rem;
  
  @include respond-to(handhelds) {
    margin-top: -14px;
  }
  
  html.no-touch &:hover {
    opacity: 1;
  }
}

.btn-primary {
  background: $color-blue;
  color: #fff;
  border-radius: $border-radius-medium;
  width: 100%;
  text-align: center;
  height: 54px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  padding: 0; // new
  
  html.no-touch &:hover {
    background: darken($color-blue, 8%);
  }
  
  svg, use {
    height: calc(100% - 20px);
    right: 15px;
    left: auto;
  }
}

.btn-primary.btn-circle {
  .preloader-circular {
    height: calc(100% - 20px);
    right: auto;
    left: auto;
    margin: 0;
    top: 10px;
    
    .preloader-path {
      stroke: #fff;
    }
  }
}

.btn-menu-toggle {
  position: relative;
  overflow: visible !important;
  font-weight: normal !important;
  cursor: pointer !important;
  pointer-events: all !important;

  &:not(.btn-primary).menu-open {
    background-color: var(--color-gray-hover);
  }
}

span.emoji {
  display: inline !important;
  vertical-align: unset !important;
  //line-height: 1em;
  //font-size: 1em;

  font-family: apple color emoji,segoe ui emoji,noto color emoji,android emoji,emojisymbols,emojione mozilla,twemoji mozilla,segoe ui symbol;
}

img.emoji {
  width: 18px;
  height: 18px;
  margin: 0 .125rem;

  display: inline-block;
  /* width: 100%;
  height: 100%; */
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
}

.btn-circle {
  border-radius: 50%;
  height: 54px;
  width: 54px;
  line-height: 54px;
  
  @include respond-to(handhelds) {
    height: 46px;
    width: 46px;
  }
  
  path {
    fill: white;
  }
}

.overlay::selection {
  background: transparent;
}
.crop-component::selection {
  background: transparent;
}
/* .crop-blur {
  -webkit-filter: blur(10px) sepia(0.2);
  filter: blur(10px) sepia(0.2);
} */
.crop-image,
.overlay > img {
  width: auto;
  height: auto;
  /* можно явно указать либо ширину, либо высоту */
  /* width: 500px; */
  /*либо height: 300px;*/
  display: block;
  object-fit: contain;
  object-position: center;
}
/*add stretch*/
.crop-image {
  display: block;
  position: relative;
  pointer-events: none;
}
.crop-component {
  position: relative;
  z-index: 999;
  background-color: white;
  margin: 0 auto;
  overflow: hidden;
  
  > img {
    max-width: 100%;
  }
  
  .crop-overlay-color {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: $border-radius;
  }
}
.overlay {
  position: absolute;
  left: 50%;
  top: 50%;  
  z-index: 999;
  margin-left: -100px;
  margin-top: -100px;
  width: 200px;
  height: 200px;
  /* box-shadow: 0 0 0 3px white; */
  overflow: hidden;
  box-sizing: content-box;
  border-radius: 50%;

  html.no-touch &:hover, &:active {
    cursor: move;
  }
  
  > img {
    position: absolute;
    display: block;
  }
}

[contenteditable=true] {
  user-select: text;
}

.sticky_sentinel {
  position: absolute;
  left: 0;
  right: 0; /* needs dimensions */
  visibility: hidden;
  pointer-events: none;
}

.rlottie {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;

  &.fade-in {
    animation: fade-in-opacity .2s ease forwards;
  }
}

.fade-in-transition {
  opacity: 1;
  transition: opacity .2s ease;
}

.show-more {
  padding-top: 13px;
  padding-bottom: 13px;
  cursor: pointer;
  user-select: none;
  position: relative;

  @include respond-to(not-handhelds) {
    padding-left: 8px;
  }

  .tgico-down {
    float: left;
    padding-right: 32px;
    padding-left: 16px;
    font-size: 24px;
    color: #707579;
  }
}

.chats-container #chats-container .scrollable #dialogs .rp avatar-element {
  font-size: 20px;

  &:before {
    font-size: 26px;
  }

  &.tgico-avatar_deletedaccount:before {
    font-size: 56px;
  }
}

// .message .audio .preloader-container {
// 	@include respond-to(handhelds) {
// 		width: 30px;
// 		height: 30px;
// 		left: 2px;
// 	}
// }

.btn-disabled {
  pointer-events: none !important;
  cursor: default !important;
  color: #707579 !important;

  &:before {
    color: #707579 !important;
  }
}

.content-empty {
  color: #707579;
}

@keyframes grow-icon {
  0% {
    transform: scale(.5);
    opacity: .8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}

@keyframes hide-icon {
  from {
    transform: scale(1);
    opacity: .4;
  }

  to {
    transform: scale(.5);
    opacity: 0;
  }
}

.grid-item {
  height: 0;
	padding-bottom: 100%;
	//overflow: hidden;
	position: relative;
  cursor: pointer;
  user-select: none;
  
  &-media {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
  }
}

.transition {
  .transition-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation-fill-mode: forwards!important;

    &:not(.active):not(.from):not(.to) {
      display: none !important; // Best performance when animating container
      //transform: scale(0); // Shortest initial delay
    }
  }

  /*
   * zoom-fade
   */
   &.zoom-fade {
    > .from {
      transform-origin: center;
      transform: scale(1);
      opacity: 1;
    }

    > .to {
      transform-origin: center;
      opacity: 0;
      // We can omit `transform: scale(1.1);` here because `opacity` is 0.
      // We need to for proper position calculation in `InfiniteScroll`.
    }

    &.animating {
      > .from {
        animation: fade-out-opacity .15s ease;
      }

      > .to {
        animation: fade-in-opacity .15s ease, zoom-fade-in-move .15s ease;
      }
    }
  }

  &.zoom-fade.backwards {
    > .from {
      transform: scale(1);
    }

    > .to {
      transform: scale(0.95);
    }

    &.animating {
      > .from {
        animation: fade-in-backwards-opacity .1s ease, zoom-fade-in-backwards-move .15s ease;
      }

      > .to {
        animation: fade-out-backwards-opacity .15s ease, zoom-fade-out-backwards-move .15s ease;
      }
    }
  }
}

/*
 * zoom-fade
 */
 @keyframes zoom-fade-in-move {
  0% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes zoom-fade-in-backwards-move {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

@keyframes zoom-fade-out-backwards-move {
  0% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

/* .zoom-fade {
  transition: .15s ease-in-out opacity, .15s ease-in-out transform;
  transform: scale3d(1.1, 1.1, 1);
  opacity: 0;
  display: flex;

  &.active {
    transform: scale3d(1, 1, 1);
    transform-origin: center;
    opacity: 1;
  }
} */

// *:not(input):not(textarea) {
//   -webkit-user-select: none; /* disable selection/Copy of UIWebView */
//   -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */
// }   
