/**
 * Esup-Pod Podfile styles
 */

button.close {
  padding: 0;
  background-color: transparent;
  border: 0;
  -webkit-appearance: none;
}

.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  overflow: hidden;
  outline: 0;
}

.modal-open .modal {
  overflow-x: hidden;
  overflow-y: auto;
}

.modal-dialog {
  position: relative;
  margin: 0 auto;
  pointer-events: none;
  width: calc(100% - 2em);
  max-width: 950px;
  padding: 0 !important;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -25%);
}

.modal.show .modal-dialog {
  transform: translate(0, 0);
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - (0.5rem * 2));
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgb(0 0 0 / 20%);
  outline: 0;
  max-width: 100% !important;
  width: calc(100% - 2em);
  margin: 0 auto !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.show {
  opacity: 0.5;
}

.modal-scrollbar-measure {
  position: absolute;
  top: -9999px;
  width: 50px;
  height: 50px;
  overflow: scroll;
}

/**********************************
 ********** Improve css ***********
 **********************************/
@media only screen and (min-width: 950px) {
  /* .modal-dialog{ width: 850px; } */
}

#podfile .row {
  margin: 10px 10px 5px;
}

#podfile .col {
  padding: 5px;
  background: white;
  border: 1px solid rgb(0 0 0 / 12.5%);
}

#podifle .card-body {
  padding: 0;
  font-size: 0.8rem;
}

#podfile .card-img-top {
  width: 100%;
  height: 26vh;
  object-fit: scale-down;
}

#podifle img.directory-image {
  height: 26px;
  vertical-align: middle;
}

#podfile .list_folders {
  padding-left: 15px;
  height: auto;
  overflow: hidden;
}

#podfile #listfiles {
  max-height: 600px;
  overflow: auto;
}

/**********************************
 ********** Overrid css ***********
 **********************************/
#modal-folder_id_src .modal-body {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

#shareModalCenter #shared-people.list-group .list-group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgb(0 0 0 / 8%);
  padding: 0.8em;
}

#shareModalCenter #shared-people.list-group .list-group-item:not(:last-child) {
  border-bottom: none;
}

#shareModalCenter #shared-people.list-group .list-group-item .username, #user-search .list-group-item .empty-user-text {
  color: var(--bs-gray-dark);
  font-weight: 700;
}

#shareModalCenter
  #shared-people.list-group
  .list-group-item
  .btn-share.btn-remove {
  order: 1;
  padding: 0.4em 0.8em;
  color: #fff !important;
  background-color: var(--bs-danger);
  line-height: 1;
  flex: none;
}

#shareModalCenter #shareFormName .form-group {
  position: relative;
}

#shareModalCenter #shareFormName .form-group .form-control {
  outline: none !important;
  box-shadow: none !important;
}

#shareModalCenter #user-search.list-group {
  padding: 0.8em 0;
  width: 400px;
  max-width: 100%;
  border: 1px solid rgb(0 0 0 / 10%);
  box-shadow: 0 8px 10px 4px rgb(0 0 0 / 8%);
  position: absolute;
  top: 100%;
}

#shareModalCenter #user-search.list-group .list-group-item {
  border: none !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8em;
  line-height: 1;
}

#shareModalCenter #user-search.list-group .list-group-item .btn-share.btn-add {
  padding: 0.4em 0.8em;
  line-height: 1;
  flex: none;
}

#shareModalCenter #user-search.list-group .list-group-item .username {
  font-weight: 700;
  color: var(--bs-gray);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-header .close {
  margin: 0;
  color: var(--pod-font-color);
  opacity: 1;
  padding: 0;
  transform: translate(10px, -15px);
}

.podfilemodal {
  padding: 0 !important;
}

#podfile {
  position: relative;
  padding-bottom: 4em;
  overflow: hidden;
}

#podfile > .row {
  justify-content: space-between;
}

#podfile #dirs .dirs-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 0;
}

#podfile #dirs .dirs-nav .dirs-nav-container {
  display: flex;
}

#podfile .list_folders .folder_container:nth-child(2n),
#podfile .list_folders_sub .folder_container:nth-child(2n) {
  background-color: #f5f5f5;
}

#podfile .list_folders .folder_container,
#podfile .list_folders_sub .folder_container {
  padding: 0.4em;
}

#podfile .list_folders .folder,
#podfile .list_folders_sub .folder
/*#podfile #dirs .dirs-nav a.folder*/ {
  display: flex;
  align-items: flex-end;
  margin-right: 1em;
}

#podfile .list_folders .folder,
#podfile .list_folders_sub .folder {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

#podfile .share-folders {
  padding-top: 0.4em;
  border-top: 2px dotted var(--pod-primary);
}

#podfile .share-folders,
#podfile #list_folders_sub {
  overflow-y: auto;
}

#podfile .share-folders .folder_title {
  display: flex;
  align-items: center;
  margin-bottom: 0.4em;
  color: var(--pod-primary);
}

#podfile .share-folders .home-directory {
  transform: translateY(-8px);
}

#podfile a.folder:not(.folder-opened) .folder-open,
#podfile a.folder-opened .folder-close {
  display: none;
}

#podfile .bi {
  margin-right: 3px;
}

#podfile #dirs .dirs-nav + * {
  /* display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr;
  grid-template-columns: 1fr;
  -ms-grid-rows: (minmax(auto, 1fr))[2];
  grid-template-rows: repeat(2, minmax(auto, 1fr) ); */
  overflow: auto;
}

#podfile #dirs .dirs-nav + * > *:nth-child(1) {
  -ms-grid-row: 1;
  -ms-grid-column: 1;
}

#podfile #dirs .dirs-nav + * > *:nth-child(2) {
  -ms-grid-row: 2;
  -ms-grid-column: 1;
}

/*
#podfile #dirs .share-folder span.home-directory{ color: var(--pod-primary); }
*/
#podfile #dirs .folder-search {
  border: 1px solid #ccc;
  font-size: 14px;
  padding: 0.4em;
  color: rgb(0 0 0 / 75%);
  flex: none;
  height: 35px;
}

#list_folders_sub .view-more-container {
  text-align: center;
}

#podfile #files #currentfolder {
  flex-grow: unset;
  flex-basis: auto;
}

#podfile #currentfolder .nav-item:not(:last-child) {
  margin-right: 0.8em;
}

#podfile #currentfolder .nav-item {
  display: flex;
  align-items: center;
}

#podfile .flex {
  display: grid;
  grid-template-rows: minmax(0.5fr, 1fr);
  grid-auto-rows: minmax(0.5fr, 1fr);
  min-height: 100%;
}

#podfile #listfiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-gap: 5px;
}

#podfile #files.loading .container-loader {
  position: relative;
  margin: 0 auto;
  margin-top: 4em;
  width: 75px;
}

#podfile #files.loading .lds-ellipsis {
  display: block;
  transform: translateX(-50%);
  width: 75px;
}

#podfile #listfiles .empty-folder-warning {
  grid-column: 1/-1;
  grid-row: 10;
  text-align: center;
  background: #fff3cd;
  color: #856404;
  font-weight: 600;
}

#podfile #listfiles .navbar-toggler-icon {
  background: none;
}

#podfile #listfiles .col-sm-2 {
  max-width: unset;
}

#podfile #listfiles .navbar {
  justify-content: flex-end;
}

#podfile #listfiles .card {
  overflow: unset;
}

#podfile #listfiles .file {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  transform: translateY(100%);
  padding: 0.4em;
  transition: 0.1s all;
}

#podfile #listfiles .file-navbar {
  justify-content: space-around;
  align-items: flex-end;
  flex-flow: row wrap;
  overflow-y: auto;
}

#podfile #listfiles .file-navbar .nav-item {
  width: 25px;
  display: inline-block;
  height: 25px;
  margin: 0 0.4em 0.4em !important;
}

#podfile #listfiles .card-body {
  overflow: hidden;
}

@media only screen and (max-width: 992px) {
  #podfile #currentfolder {
    position: absolute;
    right: 0;
    bottom: 0;
    transform: translateY(100%);
    max-width: 180px;
    z-index: 9;
    transition: all 0.1s linear 0s;
  }

  #podfile #currentfolder .navbar-nav {
    margin: 0 !important;
    width: 100%;
    display: flex;
    flex-direction: row;
  }

  #podfile #currentfolder .custom-file label {
    margin: 0;
  }
}

@media only screen and (max-width: 550px) {
  #podfile .alert-warning {
    flex-direction: column;
    line-height: 1.2;
  }

  #podfile #dirs .dirs-nav .dirs-nav-container {
    flex-direction: column;
    align-items: flex-start;
  }
}
