/*tg: @bgirlmango*/
/*todo: обрабатывать ховеры и эктивы на скроллбар*/
:root {
  --button-grey: #2b2b2b;
  --bg-dialog-blackout: rgba(0, 0, 0, .5);

  --red: #f84848;
  --red-filter: invert(42%) sepia(70%) saturate(4630%) hue-rotate(338deg) brightness(114%) contrast(94%);
  --red-clear: #ff0000;
  --green-filter: invert(79%) sepia(12%) saturate(2493%) hue-rotate(58deg) brightness(106%) contrast(95%);

  --adminbar-present-height: calc(100vh - 32px);
  --adminbar-present-mt: 97px;
  --adminbar-present-top: 32px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --black: #191919;
    --black-clear: #000;
    --white: #dadada;
    --white-clear: #fff;
    --white-hover: #fff;
    --white-filter: invert(88%) sepia(90%) saturate(23%) hue-rotate(200deg) brightness(105%) contrast(71%);
    --white-filter-hover: invert(84%) sepia(100%) saturate(0%) hue-rotate(200deg) brightness(111%) contrast(102%);
    --bg-grey: #1e1e1e;
    --bg-grey-lighten: #262626;
    --bg-tooltip: #121212;
    --button-grey-hover: #373737;
    --red-lighten: #fa8888;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --black: #efefef;
    --black-clear: #ffffff;
    --white: #353535;
    --white-clear: #000000;
    --white-hover: #121212;
    --white-filter: invert(21%) sepia(0%) saturate(124%) hue-rotate(267deg) brightness(92%) contrast(95%);
    --white-filter-hover: invert(0%) sepia(2%) saturate(4341%) hue-rotate(329deg) brightness(92%) contrast(86%);
    --bg-grey: #f7f7f7;
    --bg-grey-lighten: #efefef;
    --bg-tooltip: #f7f7f7;
    --button-grey-hover: #cdcdcd;
    --red-lighten: #f84848;
    --button-grey: #e4e4e4;
  }
}

input:-webkit-autofill {
  box-shadow: 0 0 0 1000px var(--black-clear) inset !important; /* Трюк с тенью для изменения фона */
  -webkit-text-fill-color: var(--white-clear) !important; /* Цвет текста */

}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*[hidden] {
  display: none!important;
}

html[adminbar-present="yes"] .page {
  min-height: var(--adminbar-present-height);
}

html[adminbar-present="yes"] .aside-filters {
  top: var(--adminbar-present-mt);
}

html[adminbar-present="yes"] .header {
  top: var(--adminbar-present-top);
}

html[adminbar-present="yes"] .aside-filters {
  max-height: calc(100% - 65px - 69px - var(--adminbar-present-top));
}

/*scrollbar*/
html {
  /*scrollbar-color: var(--red) var(--bg-grey);*/
  scrollbar-gutter: stable;
}

::-webkit-scrollbar {
  background-color: var(--red);
  height: 5px;
  width: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg-grey);
}

::-webkit-scrollbar-thumb {
  background-color: var(--red);
  /*border-radius: 2px;*/
  border: 3px solid var(--red);
}

.aside-filters::-webkit-scrollbar {
  width: 3px;
}

/*tags*/
html, button, input, optgroup, select, textarea, input::placeholder {
  font-family: "Roboto Mono", "Arial", sans-serif;
  line-height: 140%;
  color: var(--white);
}

html {
  background-color: var(--bg-grey);
}

button {
  cursor: pointer;
  background-color: initial;
  border: initial;
}

img {
  user-select: none;
}

/*buttons*/
.loader {
  width: 26px;
  height: 26px;
  border: 2.5px solid var(--white);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: none;
  box-sizing: border-box;
  animation: rotation .5s linear infinite;
}

.loader.active {
  display: inline-block;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loader-horizontal {
  width: 100%;
  height: 3px;
  display: none;
  position: relative;
  background: var(--button-grey);
  overflow: hidden;
}

.loader-horizontal.active {
  display: inline-block;
}

.loader-horizontal::after {
  content: '';
  width: 150px;
  height: 3px;
  background: var(--white);
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  animation: animloader 1s linear infinite;
}

@keyframes animloader {
  0% {
    left: 0;
    transform: translateX(-100%);
  }
  100% {
    left: 100%;
    transform: translateX(0%);
  }
}

.dialog__body .loader-horizontal {
  margin-top: 8px;
}

.button-image-text {
  position: relative;
  background-color: inherit;
  border: initial;
  display: flex;
  align-items: center;
  column-gap: 4px;
}

.button-image-text img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.button-text {
  width: auto;
  white-space: nowrap;
  position: relative;
}

.button-text_black {
  color: var(--black);
}

.button-text::before {
  content: "";
  position: absolute;
  bottom: -2px;
  width: 0;
  height: 1px;
  background-color: var(--white);
  /*transition: width .1s linear;*/
}

.button-text_black::before {
  background-color: var(--black);
}

.button-icon {
  display: flex;
  align-items: center;
  /*justify-content: center;*/
  column-gap: 4px;

  width: 44px;
  justify-content: start;
  transition: width .2s linear;
  overflow: hidden;
}

.button-icon.no-anim {
  width: initial;
}

.button-icon__img {
  width: 26px;
  height: 26px;
  filter: var(--white-filter);
  display: none;
}

.button-icon__img_fail {
  filter: var(--red-filter);
}

.button-icon__img_success {
  filter: var(--green-filter);
}

.button-icon__img.active {
  display: flex;
}

.button-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--white);
}

.button-icon_dark svg {
  fill: var(--black);
}

.button {
  position: relative;
}

.button::before {
  content: "";
  position: absolute;
  bottom: -2px;
  width: 0;
  height: 1px;
  background-color: var(--white);
  /*transition: width .1s linear;*/
}

.button-icon__name {
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
}

@media (hover: hover) {
  .button-text:hover::before {
    width: 100%;
  }

  .button:hover::before {
    width: 100%;
  }

  .button-text:hover {
    color: var(--white-hover);
  }

  .button-text_black:hover {
    color: var(--black-clear);
  }

  .button-icon:hover svg {
    fill: var(--white-hover);
  }

  .button-icon:hover .button-icon__img_general {
    filter: var(--white-filter-hover);
  }

  .button-icon_dark:hover svg {
    fill: var(--black-clear);
  }

  .button-icon:hover {
    width: auto;
  }

  .button-icon_edit:hover {
    width: 144px;
  }

  .button-icon_download:hover {
    width: 101px;
  }

  .button-icon_link:hover {
    width: 158px;
  }

  .button-icon_share:hover {
    width: 158px;
  }

  .button-icon_private-link:hover {
    width: 180px;
  }

  .button-icon:hover .button-icon__name {
    visibility: visible;
    opacity: 1;
  }

}

@media (hover: none) {
  .button-text:active::before {
    width: 100%;
  }

  .button:active::before {
    width: 100%;
  }

  .button-text:active {
    color: var(--white-hover);
  }

  .button-icon:active svg {
    fill: var(--white-hover);
  }

  .button-icon:active .button-icon__img_general {
    filter: var(--white-filter-hover);
  }

  .button-icon_dark:active svg {
    fill: var(--black-clear);
  }
}

/*inputs*/
.custom-checkbox-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  column-gap: 8px;
}

.custom-checkbox-label input[type="checkbox"] {
  display: none;
  cursor: pointer;
  appearance: none;
  background-color: initial;
  border: initial;
  outline: initial;
}

.custom-checkbox {
  font-family: "Roboto", "Arial", sans-serif;
  width: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 3px;
}

.custom-checkbox-label input[type="checkbox"] ~ .custom-checkbox .custom-checkbox__state {
  display: none;
}

.custom-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox .custom-checkbox__state {
  display: flex;
}

.custom-checkbox-label:hover {
  color: var(--white-hover);
}

.search-input {
  width: 100%;
  padding: 8px 10px;
  background-color: var(--black);
  outline: initial;
  border: initial;
  border-radius: 2px;
}

.label-search {
  font-size: 30px;
  display: flex;
}

.custom-input-label {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.custom-input {
  padding: 4px 8px;
  width: 100%;
  background-color: initial;
  border: initial;
}

.custom-input_empty {
  padding-left: 0;
}

.custom-input:focus {
  border: initial;
  outline: initial;
}

/*classes*/
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.section {
  width: 100%;
  height: 100%;
}

.root {

}

.page {
  margin: 0 auto;
  max-width: 1920px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 50px;
}

.header {
  z-index: 1;
  position: sticky;
  top: 0;
  padding: 10px 0;
  background-color: var(--bg-grey);
}

.header__container {
  display: grid;
  grid-template-columns: min-content 1fr min-content;
  grid-gap: 5px 20px;
}

#formSearchInput {
  display: flex;
  align-items: center;
  justify-content: end;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px 30px;
}

.header__btn-filter {
  display: none;
}

.logo {
  vertical-align: top;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left;
}

.c-logo {
  width: 150px;
  height: 45px;
}

.aside-filters {
  position: fixed;
  top: 65px;
  width: 210px;
  display: flex;
  flex-direction: column;
  row-gap: 15px;

  overflow: auto;
  max-height: calc(100% - 65px - 69px);
  padding-bottom: 10px;
}

.categories {
  list-style: none;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  row-gap: 8px;
}

.category__item {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
}

.category__item-name {
  font-family: "Roboto Mono", "Arial", sans-serif;
}

.categories_top-level {
  padding-left: 0;
}

.content {
  flex-grow: 1;
  padding-left: calc(210px + 20px);
  display: flex;
  flex-direction: column;
}

.section-cards {
  position: relative;
  display: flex;
  flex-grow: 1;
}

.soft-card-empty {
  /*position: absolute;*/
  flex-grow: 1;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
}

.soft-card-empty.active {
  display: flex;
}

.soft-cards {
  width: 100%;
  list-style: none;
  display: none;
  flex-direction: column;
  /*row-gap: 10px;*/
}

.soft-cards.active {
  display: flex;
}

.soft-card__item {
  padding: 8px 2px 8px 12px;
  display: flex;
  align-items: center;
  column-gap: 10px;
  transition: opacity .5s linear
}

.soft-card__item:not(:last-of-type) {
  border-bottom: 1px var(--button-grey-hover) solid;
}

.soft-card__item:nth-child(odd of :not([hidden])) {
  background-color: var(--bg-grey-lighten);
}

.soft-card__item:hover {
  background-color: var(--button-grey)!important;
  /*scale: 1.0015;*/
}

.soft-card__item-icon {
  flex-shrink: 0;
  filter: var(--white-filter);
  width: 40px;
  height: 40px;
  object-fit: contain;
  object-position: left;
}

.soft-card__item-body {
  flex-grow: 1;

  display: flex;
  flex-direction: column;
  row-gap: 10px;
}

.soft-card__item-name {
  word-wrap: anywhere;
}

.soft-card__item-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
}

.soft-card__item-info {
  display: flex;
  align-items: center;
  gap: 5px 20px;
}

.soft-card__item-info-detail {
  display: flex;
  align-items: center;
  column-gap: 4px;
}

.soft-card__item-size {
  width: 100px;
}

.soft-card__item-paid {
  color: var(--red-lighten);
}

.card__item-empty {
  width: 5px;
}

.soft-card__item-paid_display-xs {
  display: none;
}

.soft-card__item-buttons {
  display: flex;
}

.soft-card__item-buttons .button-icon {
  padding: 0 10px;
}

.dialog {
  border-radius: 2px;
  width: 60vw;
  max-width: 1000px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: initial;
}

.dialog::backdrop {
  background-color: var(--bg-dialog-blackout);
}

.dialog__root {

}

.dialog__header {
  padding: 0 0 0 10px;
  background-color: var(--white);
  color: var(--black-clear);
  display: grid;
  grid-template-columns: min-content 1fr min-content;
  align-items: center;
  gap: 5px 20px;
}

.dialog__btn-alter-login {
  width: min-content;
  justify-self: end;
  align-self: center;
}

.dialog__header-name {
  white-space: nowrap;
}

.dialog__body {
  background-color: var(--black-clear);
  color: var(--white-clear);
  padding: 2px 10px;
  min-height: 205px;
  display: flex;
  flex-direction: column;
}

.dialog__body a {
  color: var(--white);
}

.tooltip {
  position: relative;
}

.tooltip__body {
  padding: 5px 10px 0 10px;
  display: none;
  min-width: 100px;
  width: max-content;
  max-width: 520px;
  /*border: 1px red solid;*/
  z-index: 100000;
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
}


.tooltip__content {
  width: fit-content;
  display: flex;
  padding: 6px 15px;
  background-color: var(--bg-tooltip);

  border: 1px var(--button-grey-hover) solid;
  border-radius: 2px;
}
.tooltip__content::before {
  position: absolute;
  content: "";
  width: 100%;
  left: 0;
  bottom: -6px;
  height: 6px;
}

.tooltip:hover .tooltip__body {
  display: flex;
}

#btnCloseDialog {
  padding: 2px;
  width: fit-content;
}

#btnCloseDialog:hover {
  background-color: var(--red-clear);
}

#btnCloseDialog:hover svg {
  fill: var(--white-clear);
}

#dialogLabelPassword {
  display: none;
}

.footer__body {
  display: flex;
  flex-direction: column;
  row-gap: 5px;
}

.footer {
  position: sticky;
  bottom: 0;
  padding: 10px 0;
  background-color: var(--bg-grey);
}

.footer__container {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 5px 20px;
}

.footer__container a {
  color: var(--white);
  /*text-decoration: initial;*/
}

