/* ADMIN FILES STYLES */

.adm_files_grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  margin-right: -12px;
  margin-left: -12px;
}

.adm_files_cell {
  width: calc(25% - 24px);
  margin: 0 12px;
  overflow: visible;
  margin-bottom: 35px;
  display: flex;
  flex-direction: column;
}

.adm_files_cell_cover {
  width: 100%;
  height: 100%;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.files_cell_square {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  border: 1px solid #bfbfbf;
  border-bottom: none;
}

.files_cell_pic {
  width: 100%;
  height: 100%;
}

.adm_files_cell_footer {
  position: relative;
  bottom: 0;
  width: 100%;
  height: 32px;
  background: #000;
  display: block;
}

.adm_files_cell_footer_info {
  position: absolute;
  width: 100%;
  bottom: 0;
  /* padding: 8px 0; */
  background: #000;
}

.adm_files_add_block {
  width: 100%;
  aspect-ratio: 1/1;
  border: 1px solid #bfbfbf;
  display: flex;
  justify-content: center;
  align-content: center;
  align-items: center;
}

/* Если есть файлы в сетке, кнопка подстраивается под высоту ячеек */
.adm_files_grid:has(.adm_files_cell[data-file-id]) .adm_files_add_block,
.adm_files_grid:has(.adm_files_cell[data-folder-id]) .adm_files_add_block {
  aspect-ratio: unset;
  flex: 1;
  min-height: 120px;
}

.adm_files_add_info {
  padding: 0;
  margin: 0;
}

.adm_files_add_caption {
  font-family: Raleway;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.adm_files_add_plus {
  width: 52px;
  height: 52px;
  background: url(../img/icons_adm/icon_add_file_new.svg) center center no-repeat;
  background-size: contain;
  cursor: pointer;
  margin: 0 auto;
  margin-bottom: 12px;
}

.adm_files_cell_footer_cols {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  align-items: flex-start;
  align-content: flex-start;
  /* padding-left: 9px; */
  justify-content: space-between;
}

.adm_files_cell_footer_left {
  text-align: left;
  overflow-x: hidden;
}

.adm_files_cell_footer_right {
  text-align: right;
}

.adm_files_footer_text {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-align: right;
  color: #fff;
}

.adm_cell_files_name,
.adm_cell_files_date {
  padding: 8px 10px;
}

.adm_cell_files_name {
  display: block;
}

.adm_cell_files_date {
  display: block;
  color: #929292;
}

.adm_files_cell_actions_menu {
  position: relative;
}

.adm_files_cell_actions_menu_handler {
  position: absolute;
  z-index: 10;
  right: 4px;
  top: 4px;
  display: none;
}

.adm_files_cell_actions_menu_handler>a {
  display: block;
  width: 22px;
  height: 22px;
  background: url(../img/icons_adm/icon_file_actions_menu.png) center center no-repeat;
  background-size: contain;
}

.adm_files_cell_actions_menu_close {
  position: absolute;
  z-index: 10;
  right: 4px;
  top: 3px;
  display: none;
}

.adm_files_cell_actions_menu_close>a {
  display: block;
  width: 24px;
  height: 24px;
  background: url(../img/icons_adm/icon_file_action_close.png) center center no-repeat;
}

.adm_files_cell_actions {
  position: absolute;
  top: 0;
  width: 100%;
  display: none;
  z-index: 5;
}

.adm_files_cell_actions_wrap {
  background: #797979;
}

.adm_files_cell_actions_grid {
  display: flex;
  justify-content: space-between;
}

.adm_files_cell_actions_item {
  display: block;
  padding: 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 14.09px;
  letter-spacing: 0.1em;
  color: #fff;
}

.main_layout .adm_files_cell_actions_item:hover {
  color: #fff;
}

.adm_files_settings_wrap {
  margin-top: -23px;
  margin-bottom: 20px;
}

.adm_files_settings {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.adm_files_create_block {
  position: relative;
  margin-right: -10px;
}

.adm_files_create_folder {
  display: inline-block;
  padding: 10px;
  color: #000;
  font-size: 12px;
  font-weight: 400;
  padding-left: 25px;
}

.adm_files_create_folder:before {
  content: '';
  position: absolute;
  top: 7px;
  left: 5px;
  width: 16px;
  height: 16px;
  background: url(../img/icons_adm/icon_file_folder.svg) center center no-repeat;
  background-size: contain;
}

.adm_files_edit_profile {
  position: relative;
  display: inline-block;
  padding: 10px;
  color: #000;
  font-size: 12px;
  font-weight: 400;
  padding-left: 25px;
}

.adm_files_edit_profile:before {
  content: '';
  position: absolute;
  top: 7px;
  left: 5px;
  width: 16px;
  height: 16px;
  background: url(../img/icons_adm/icon_pen.svg) center center no-repeat;
  background-size: contain;
}

.adm_files_sort_block {
  display: flex;
  align-items: center;
  flex-direction: row;
}

.adm_files_sort_caption {
  color: #8f8f8f;
  font-size: 11.5px;
  font-weight: 400;
  margin-right: 10px;
  letter-spacing: 0.4px;
  padding-bottom: 2px;
}

.adm_files_sort_item {
  display: block;
  margin-right: 16px;
  color: #000;
  position: relative;
  padding: 4px 22px 4px 3px;
  cursor: pointer;
  font-size: 11.5px;
}

.adm_files_sort_item.active {
  font-weight: 600;
}

.adm_files_sort_item:after {
  content: '';
  display: block;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: url(../img/icons_adm/icon_arrows_sort.svg) center center no-repeat;
  background-size: contain;
}

.adm_files_sort_item.active,
.adm_files_sort_item:hover {
  color: #000;
}

/* Переключение видов сетка/таблица */
.adm_files_rows {
  display: none;
}

.adm_files_row_buttons {
  margin-bottom: 20px;
}

.adm_files_table_wrap {
  padding: 20px 0;
}

.adm_files_table {
  width: 100%;
}

.adm_files_table tr {
  border-bottom: 1px solid #E8E8E8;
}

.adm_files_table td {
  padding: 10px 15px;
  font-size: 14px;
  color: #000;
}

.adm_files_table .td_extension {
  width: 80px;
  text-align: center;
}

.adm_files_table .td_date {
  width: 120px;
}

.adm_files_table .td_tools {
  width: 250px;
}

.td_tools_block {
  display: flex;
  gap: 15px;
}

.td_tools_block a {
  color: #666;
  font-size: 12px;
  text-decoration: none;
}

.td_tools_block a:hover {
  color: #000;
}

/* Активация табличного вида */
.adm_files_views.active_rows_view .adm_files_rows {
  display: block;
}

.adm_files_views.active_rows_view .adm_files_grid {
  display: none;
}

@media (min-width: 1198px) {
  .adm_files_cell_cover:hover .adm_files_cell_actions {
    display: block;
  }
}

@media (max-width: 1198px) {
  .adm_files_cell_footer {
    height: 32px;
  }

  .adm_file_footer_text {
    font-size: 11px;
  }

  .adm_files_add_info {
    max-width: 110px;
  }

  .adm_files_add_plus {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
  }

  .adm_files_add_caption {
    font-size: 14px;
  }

  .adm_files_cell_actions_grid {
    padding-right: 28px;
    padding-left: 4px;
  }

  .adm_files_cell_actions_item {
    padding: 10px 6px;
    font-size: 11px;
    letter-spacing: 0.1px;
  }

  .adm_files_cell_actions_menu_handler {
    display: block;
  }

  .open_file_actions .adm_files_cell_actions {
    display: block;
  }

  .open_file_actions .adm_files_cell_actions_menu_handler {
    display: none;
  }

  .open_file_actions .adm_files_cell_actions_menu_close {
    display: block;
  }
}

@media (max-width: 950px) {
  .adm_files_cell_footer {
    height: 34px;
  }

  .adm_files_cell {
    width: calc(33.333% - 24px);
  }

  .adm_cell_files_name,
  .adm_cell_files_date {
    padding: 9px 10px;
  }
}

@media (max-width: 750px) {
  .adm_files_cell_footer_cols {
    display: flex;
    flex-direction: column;
    width: calc(100% - 39px);
    height: 100%;
    align-items: flex-start;
    align-content: flex-start;
    padding: 4px 9px;
  }

  .adm_files_cell_footer_right {
    text-align: left;
  }

  .adm_cell_files_name,
  .adm_cell_files_date {
    padding: 0px 0px;
  }

  .adm_files_footer_text {
    font-size: 12px;
  }

  .adm_cell_files_date {
    font-size: 11px
  }

  .adm_files_cell {
    width: calc(50% - 24px);
  }
}

@media (max-width: 600px) {
  .adm_files_grid {
    margin-right: -5px;
    margin-left: -5px;
  }

  .adm_files_cell {
    width: calc(50% - 10px);
    margin-bottom: 10px;
    margin: 0 5px;
    margin-bottom: 10px;
  }

  .adm_files_cell_footer {
    height: 31px;
  }

  .adm_files_footer_text {
    font-size: 12px;
  }

  .adm_files_cell_footer_left,
  .adm_files_cell_footer_right {
    width: 100%;
    text-align: left;
  }

  .adm_cell_files_date {
    font-size: 11px;
    padding-top: 3px;
  }

  .adm_files_add_info {
    max-width: 100%;
  }

  .adm_files_add_plus {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
  }

  .adm_files_add_caption {
    font-size: 13px;
  }
}

@media (max-width: 550px) {
  .adm_files_cell_actions_grid {
    padding-right: 35px;
  }

  .adm_files_cell_actions_item {
    padding: 11px 6px;
    font-size: 9px;
    letter-spacing: 0.1px;
  }
}

@media (max-width: 460px) {
  .adm_files_cell_cover {
    width: 100%;
    aspect-ratio: 1/1;
  }

  .adm_files_grid {
    display: flex;
    flex-direction: column;
    margin: 0;
  }

  .adm_files_cell {
    width: 100%;
    margin: 0;
    margin-bottom: 10px;
  }

  .adm_files_settings {
    display: flex;
    flex-direction: column;
  }

  .adm_files_sort_block {
    margin-bottom: 7px;
  }

  .adm_files_create_block {
    margin-right: 0;
    margin-left: -5px;
  }

  .adm_files_sort_item:last-child {
    margin-right: 0;
  }
}