/* Admin job actions: keep reordering on the drag handle and destructive actions in a kebab menu. */
.project-row-actions-cell {
  position: relative;
  width: 54px;
  padding-inline: 7px !important;
  text-align: center;
}

.project-row-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.project-menu-toggle {
  width: 28px !important;
  height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #70766f !important;
  font-size: 23px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

.project-menu-toggle:hover,
.project-menu-toggle:focus-visible {
  color: #ae543d !important;
  outline: none;
  background: transparent !important;
}

.project-row-menu {
  position: fixed;
  z-index: 30;
  top: auto;
  right: auto;
  min-width: 142px;
  padding: 5px;
  border: 1px solid #e7e2d9;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(37, 38, 34, 0.14);
  text-align: left;
}

/* Keep the table horizontally scrollable when needed, without creating a
   second vertical scroll area that can trap the last row or its action menu. */
@media (min-width: 761px) {
  .project-panel > .table-scroll {
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }
}

@media (max-width: 760px) {
  .project-panel > .table-scroll {
    overflow: visible;
  }
}

.project-row-menu[hidden] {
  display: none;
}

.project-row-menu button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #a44f3c;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

.project-row-menu button:hover,
.project-row-menu button:focus-visible {
  background: #fae9e3;
  outline: none;
}

@media (max-width: 640px) {
  .project-panel tbody tr[data-project] {
    position: relative;
    overflow: visible;
  }

  .project-panel tbody tr[data-project] > td:first-child {
    padding-right: 54px !important;
  }

  .project-panel tbody tr[data-project] > td.project-row-actions-cell {
    position: absolute;
    top: 5px;
    right: 8px;
    z-index: 20;
    display: flex !important;
    align-items: flex-start;
    justify-content: flex-end;
    width: 48px;
    min-width: 48px;
    min-height: 44px;
    height: 44px;
    padding: 0 !important;
    border: 0;
  }

  .project-panel .project-row-actions {
    width: 44px;
    height: 44px;
  }

  .project-panel .project-menu-toggle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
    font-size: 23px !important;
  }

  .project-panel .project-row-menu {
    top: auto;
    right: auto;
    z-index: 40;
    min-width: 154px;
    width: max-content;
    max-width: calc(100vw - 16px);
  }
}
