.Checkbox {
  cursor: var(--custom-cursor, pointer);
  text-align: left;
  align-items: center;
  min-height: 3rem;
  margin-bottom: 0;
  padding-inline-start: 4rem;
  display: flex;
  position: relative;
}
.Checkbox:hover,
.Checkbox:focus-visible {
  border-radius: var(--border-radius-default);
  background-color: var(--color-chat-hover);
}
.Checkbox.disabled {
  cursor: var(--custom-cursor, default);
  opacity: 0.5;
}
.Checkbox.disabled:hover {
  background: 0 0 !important;
}
.Checkbox .user-avatar {
  opacity: 0;
  transition: opacity 0.15s;
  position: absolute;
  top: 0;
  left: 0;
}
.Checkbox.round .Checkbox-main:before,
.Checkbox.round .Checkbox-main:after {
  border-radius: 50%;
}
.Checkbox.round .Checkbox-main:before {
  background-color: #0000;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}
.Checkbox.round .Checkbox-main:after {
  justify-content: center;
  align-items: center;
  font-size: 0.875rem;
  display: flex;
}
.Checkbox.withIcon {
  padding-inline-start: 1rem;
}
.Checkbox.withIcon .Checkbox-main:before,
.Checkbox.withIcon .Checkbox-main:after {
  left: auto;
  right: 1.1875rem;
}
.Checkbox.loading .Checkbox-main:before,
.Checkbox.loading .Checkbox-main:after {
  opacity: 0 !important;
}
.Checkbox.loading .Spinner {
  --spinner-size: 1.25rem;
  opacity: 0;
  animation: 0.2s forwards fade-in;
  position: absolute;
  top: 0.125rem;
  left: 0.375rem;
}
.Checkbox.blocking .Checkbox-main:before,
.Checkbox.blocking .Checkbox-main:after {
  transition: none;
}
.Checkbox.blocking input:not(:checked) ~ .Checkbox-main:before {
  border-color: var(--color-error);
}
.Checkbox.blocking input:not(:checked) ~ .Checkbox-main:after {
  content: "";
  opacity: 1;
  background-color: var(--color-error);
  border-radius: 0.25rem;
}
.Checkbox input {
  z-index: var(--z-below);
  opacity: 0;
  position: absolute;
}
.Checkbox .Checkbox-main {
  flex-grow: 1;
  grid-template-rows: auto auto;
  grid-template-columns: 1fr auto;
  align-items: center;
  display: grid;
}
.Checkbox .Checkbox-main:before,
.Checkbox .Checkbox-main:after {
  pointer-events: none;
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}
.Checkbox .Checkbox-main:before {
  border: 0.125rem solid var(--color-borders-input);
  background-color: var(--color-background);
  border-radius: 0.25rem;
  transition:
    border-color 0.1s,
    background-color 0.1s;
}
.Checkbox .Checkbox-main:after {
  speak: none;
  font-variant: normal;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "";
  color: var(--color-white);
  opacity: 0;
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  transition: opacity 0.1s;
  position: absolute;
  font-family: icons !important;
}
.Checkbox .Checkbox-main .user-avatar,
.Checkbox .Checkbox-main:before,
.Checkbox .Checkbox-main:after {
  position: absolute;
  top: 50%;
  left: 1.125rem;
  transform: translateY(-50%);
}
.Checkbox .Checkbox-main .label {
  text-align: left;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
  line-height: 1.25rem;
}
.Checkbox .Checkbox-main .right-icon {
  color: var(--color-text-secondary);
  grid-area: span 2/2;
  align-self: center;
  margin-inline: auto 0.5rem;
  font-size: 1.25rem;
}
.Checkbox .Checkbox-main .subLabel {
  color: var(--color-text-secondary);
  unicode-bidi: plaintext;
  grid-area: 2/1;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1rem;
}
.Checkbox.withSubLabel:hover,
.Checkbox.withSubLabel:focus-visible {
  border-radius: var(--border-radius-default);
  background-color: var(--color-chat-hover);
}
.Checkbox.withSubLabel .Checkbox-main {
  padding: 0.4375rem 0 0.5625rem;
}
.Checkbox .Nested-avatar-list:before,
.Checkbox .Nested-avatar-list:after {
  pointer-events: none;
  content: "";
  width: 1.125rem;
  height: 1.125rem;
  display: block;
  position: absolute;
  left: 1.125rem;
}
.Checkbox .Nested-avatar-list .label {
  align-items: center;
  column-gap: 0.6875rem;
  display: flex;
}
.Checkbox input:checked ~ .Checkbox-main:before {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
}
.Checkbox input:checked ~ .Checkbox-main:after,
.Checkbox input:checked ~ .Checkbox-main .user-avatar.user-avatar-visible {
  opacity: 1;
}
.Checkbox[dir="rtl"].loading .Spinner {
  left: auto;
  right: 0.375rem;
}
.Checkbox[dir="rtl"] .label,
.Checkbox[dir="rtl"] .subLabel {
  text-align: right;
}
.Checkbox[dir="rtl"] .Checkbox-main .user-avatar,
.Checkbox[dir="rtl"] .Checkbox-main:before,
.Checkbox[dir="rtl"] .Checkbox-main:after {
  left: auto;
  right: 1rem;
}
.Checkbox.nested {
  justify-content: space-between;
  align-items: center;
  gap: 0.3125rem;
  margin-block: 0;
  padding: 0 0 0 4rem;
  display: flex;
}
.Checkbox.nested:hover,
.Checkbox.nested:focus-visible {
  border-radius: var(--border-radius-default);
  background-color: var(--color-chat-hover);
}
.Checkbox.withNestedList {
  background-color: var(--color-background);
  margin: 0;
}
.Checkbox.withNestedList:hover,
.Checkbox.withNestedList:focus-visible {
  border-radius: var(--border-radius-default);
  background-color: var(--color-chat-hover);
}
.Checkbox.permission-group {
  padding-inline-start: 3.625rem;
}
.Checkbox.permission-group .Checkbox-main:before,
.Checkbox.permission-group .Checkbox-main:after {
  left: 1rem;
}
.Checkbox.permission-group.withNestedList {
  margin-bottom: 1rem;
}
.Checkbox.avatar {
  margin-inline-start: 3.125rem;
  padding-inline-start: 3.5rem;
}
.Checkbox .button {
  color: var(--color-text);
  gap: 0.1875rem;
  display: flex;
}
.Checkbox .group-icon {
  font-size: 0.75rem;
}
.Checkbox.nested-checkbox-group .Checkbox.Checkbox-main:before,
.Checkbox.nested-checkbox-group .Checkbox.Checkbox-main:after {
  top: 1.875rem;
  left: 2.875rem;
}
.Checkbox.onlyInput {
  min-height: auto;
  padding-inline-start: 0.8125rem;
  position: relative;
}
.Checkbox.onlyInput .Checkbox-main:before,
.Checkbox.onlyInput .Checkbox-main:after {
  top: 0;
  left: 0;
  right: 0;
}
.nested-checkbox-group {
  max-height: 0;
  padding-inline-start: 2rem;
  transition: max-height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}
.nestedButton {
  align-items: center;
  font-size: 0.875rem;
  line-height: 1;
  display: inline-flex;
}
.nestedButton .group-icon {
  font-size: 0.875rem;
}
.nested-checkbox-group-open {
  max-height: 100vh;
  transition: max-height 0.6s ease-in-out;
}
