.trash-app {
  display: none;
  font-family: var(--mono);
}

.app-window[data-app="trash"] {
  top: clamp(64px, 16vh, 150px);
  left: clamp(300px, 35vw, 560px);
  width: min(620px, calc(100vw - 34px));
  height: min(450px, calc(100vh - 86px));
  min-width: 470px;
  min-height: 330px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - var(--taskbar-h) - 16px);
  overflow: hidden;
  resize: both;
  border: 1px solid #57505a;
  color: #e5e1e7;
  background: #0d0b0f;
  box-shadow: none;
  font-family: var(--mono);
}

.app-window[data-app="trash"] .app-window__bar {
  border-bottom-color: #57505a;
  background: #211a23;
}

.app-window[data-app="trash"] .app-window__content {
  display: block;
  height: calc(100% - 31px);
  min-height: 0;
  padding: 0;
  background: #0d0b0f;
}

.app-window[data-app="trash"] .app-window__stamp,
.app-window[data-app="trash"] .app-window__copy {
  display: none;
}

.app-window[data-app="trash"] .trash-app {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  color: #e5e1e7;
  background: #0d0b0f;
}

.trash-menu {
  display: flex;
  gap: var(--system-menu-gap);
  min-height: var(--system-menu-height);
  align-items: center;
  padding: 0 var(--system-menu-padding-x);
  border-bottom: 1px solid var(--system-menu-divider);
  color: var(--system-chrome-text);
  background: var(--system-chrome-bg);
  font: var(--system-menu-font);
}

.trash-address {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 35px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--system-chrome-border);
  color: var(--system-chrome-muted);
  background: var(--system-chrome-bg);
  font: 700 9px/1 var(--mono);
}

.trash-address__path {
  min-width: 0;
  padding: 6px 8px;
  overflow: hidden;
  border: 1px solid var(--system-chrome-border);
  color: var(--system-chrome-text);
  background: var(--system-field-bg);
  box-shadow: inset 1px 1px 0 var(--system-field-inset);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-list {
  min-height: 0;
  overflow: auto;
  background: #0d0b0f;
  scrollbar-color: #615c64 #171419;
}

.trash-list__header,
.trash-file {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 96px 122px;
  align-items: center;
  gap: 8px;
}

.trash-list__header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 24px;
  padding: 0 12px;
  border-bottom: 1px solid #57505a;
  color: #b9b3bc;
  background: #211a23;
  font: 700 8px/1 var(--mono);
  letter-spacing: .08em;
}

.trash-files {
  --trash-row-height: 44px;
  min-height: calc(var(--trash-row-height) * 6);
  margin: 0;
  padding: 4px 6px 8px;
  list-style: none;
}

.trash-file {
  min-height: var(--trash-row-height);
  padding: 0 6px;
  color: #ddd8df;
  background: transparent;
  outline: 0;
  cursor: default;
  user-select: none;
}

.trash-file[aria-selected="true"] {
  color: #f3edf2;
  background: var(--berry);
}

.trash-file:focus-visible {
  outline: 1px dotted #f3edf2;
  outline-offset: -3px;
}

.trash-file__marker {
  position: relative;
  display: grid;
  width: 24px;
  height: 21px;
  place-items: end center;
  padding-bottom: 2px;
  border: 1px solid #8b848d;
  color: #211a23;
  background: #d8d4dc;
  box-shadow: 2px 2px 0 #050406;
}

.trash-file__marker::before {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  border-bottom: 1px solid #8b848d;
  border-left: 1px solid #8b848d;
  background: #f4f0e9;
  content: "";
}

.trash-file__marker::after {
  content: attr(data-ext);
  font: 700 6px/1 var(--mono);
  letter-spacing: -.04em;
}

.trash-file__name {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font: 700 12px/1.4 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-file__type,
.trash-file__state {
  min-width: 0;
  overflow: hidden;
  color: #928b95;
  font: 700 9px/1.3 var(--mono);
  letter-spacing: .03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-file[aria-selected="true"] .trash-file__type,
.trash-file[aria-selected="true"] .trash-file__state {
  color: #f0ebf1;
}

.trash-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--system-status-height);
  gap: 14px;
  padding: 0 9px;
  border-top: 1px solid var(--system-chrome-border);
  color: #6d6670;
  background: var(--system-chrome-bg);
  font: 700 8px/1 var(--mono);
  letter-spacing: .04em;
}

.trash-status span:last-child {
  overflow: hidden;
  color: #b52273;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .app-window[data-app="trash"] {
    position: fixed;
    top: 12px;
    left: 8px !important;
    width: calc(100vw - 16px);
    height: min(520px, calc(100vh - 72px));
    min-width: 0;
    min-height: 360px;
    resize: none;
  }

  .trash-list__header,
  .trash-file {
    grid-template-columns: 28px minmax(0, 1fr) 116px;
    gap: 6px;
  }

  .trash-files {
    --trash-row-height: 40px;
  }

  .trash-list__header span:nth-child(3),
  .trash-file__type {
    display: none;
  }

  .trash-list__header,
  .trash-file {
    padding-right: 8px;
    padding-left: 8px;
  }

  .trash-status {
    font-size: 7px;
  }
}

