.swipe-row {
  --sr-h: 46px;
  --sr-r: 10px;
  --sr-a: 72px;
  --sr-row: rgba(255, 255, 255, 0.04);
  --sr-text: #f4f4f5;
  --sr-drawer: #18181b;
  --sr-on-drawer: #ffffff;
  --sr-action: #ef4444;
  --sr-on-action: #ffffff;
  --sr-collapse: 200ms;
  --sr-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  position: relative;
  height: var(--sr-h);
  overflow: hidden;
  opacity: 1;
  flex-shrink: 0;
  transition:
    height var(--sr-collapse) var(--sr-ease-out),
    margin-bottom var(--sr-collapse) var(--sr-ease-out),
    opacity var(--sr-collapse) var(--sr-ease-out);
}

.swipe-row[data-phase='collapsing'] {
  height: 0 !important;
  margin-bottom: 0 !important;
  opacity: 0;
}

.swipe-row__clip {
  position: relative;
  height: var(--sr-h);
  border-radius: var(--sr-r);
  overflow: hidden;
  background: var(--sr-row);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.swipe-row.is-active .swipe-row__clip {
  border-color: rgba(255, 255, 255, 0.22);
}

.swipe-row__rail {
  position: absolute;
  inset: 0;
  background: var(--sr-drawer);
}

.swipe-row__action {
  position: absolute;
  top: 0;
  display: grid;
  place-items: center;
  width: var(--sr-a);
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--sr-drawer);
  color: var(--sr-on-drawer);
  font: inherit;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.swipe-row__glyph {
  display: grid;
  justify-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

.swipe-row__icon {
  display: inline-flex;
}

.swipe-row__block {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--sr-action);
}

.swipe-row[data-direction='left'] .swipe-row__block {
  left: calc(100% - var(--sr-a));
}

.swipe-row__action--commit {
  background: transparent;
  color: var(--sr-on-action);
  left: 0;
}

.swipe-row__surface {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0 12px;
  background: var(--sr-row);
  color: var(--sr-text);
  touch-action: pan-y;
  cursor: pointer;
  user-select: none;
}

.swipe-row__label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.swipe-row[data-dragging] .swipe-row__surface {
  cursor: grabbing;
}
