/* SwipeRow.vanilla.css — SwipeRow.css (original, kept alongside) re-skinned to the contractor-app tokens. Class names unchanged. */
.swipe-row {
  --sr-h: 72px;
  --sr-r: var(--radius-lg);
  --sr-a: 80px;
  --sr-row: var(--surface);
  --sr-text: var(--text);
  --sr-drawer: var(--accent-fill);
  --sr-on-drawer: var(--on-accent);
  --sr-action: var(--danger);
  --sr-on-action: var(--bg);
  --sr-collapse: 200ms;
  --sr-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  position: relative;
  height: var(--sr-h);
  overflow: hidden;
  opacity: 1;
  border-radius: var(--sr-r);
  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[data-disabled] {
  opacity: 0.55;
  pointer-events: none;
}

.swipe-row__clip {
  position: relative;
  height: var(--sr-h);
  border-radius: var(--sr-r);
  overflow: hidden;
  background: var(--sr-row);
  box-shadow: inset 0 0 0 var(--border-w) var(--border);
}

.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;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.swipe-row__action::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .swipe-row__action::after {
    transition: opacity 150ms ease;
  }

  .swipe-row__action:hover::after {
    opacity: 0.08;
  }
}

.swipe-row__glyph {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1;
  transition: transform 160ms var(--sr-ease-out);
}

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

.swipe-row__action:active .swipe-row__glyph {
  transform: scale(0.97);
}

.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[data-direction='right'] .swipe-row__block {
  right: calc(100% - var(--sr-a));
}

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

.swipe-row[data-direction='left'] .swipe-row__action--commit {
  left: 0;
}

.swipe-row[data-direction='right'] .swipe-row__action--commit {
  right: 0;
}

.swipe-row__surface {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 100%;
  padding: 0 var(--space-4);
  box-shadow: inset 0 0 0 var(--border-w) var(--border);
  border-radius: var(--sr-r);
  background: var(--sr-row);
  color: var(--sr-text);
  touch-action: pan-y;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .swipe-row__surface {
    cursor: grab;
  }

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

@media (pointer: coarse) {
  .swipe-row__surface {
    user-select: none;
    -webkit-user-select: none;
  }
}

.swipe-row[data-dragging] .swipe-row__surface,
.swipe-row[data-dragging] .swipe-row__surface * {
  user-select: none;
  -webkit-user-select: none;
}

.swipe-row__toggle {
  position: absolute;
  top: 50%;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  background: transparent;
  color: var(--sr-text);
  font: inherit;
  outline: none;
}

.swipe-row[data-direction='left'] .swipe-row__toggle {
  right: 12px;
}

.swipe-row[data-direction='right'] .swipe-row__toggle {
  left: 12px;
}

.swipe-row__toggle:focus-visible {
  width: auto;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  overflow: visible;
  clip-path: none;
  background: color-mix(in srgb, var(--sr-text) 12%, transparent);
  font-size: 12px;
  white-space: nowrap;
  transform: translateY(-50%);
}

.swipe-row__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

@media (prefers-reduced-motion: reduce) {
  .swipe-row__action:active .swipe-row__glyph {
    transform: none;
  }
}

/* token additions */
.swipe-row__action:focus-visible { outline: var(--ring-w) solid var(--on-accent); outline-offset: calc(var(--ring-w) * -2); }
.swipe-row__toggle:focus-visible { outline: var(--ring-w) solid var(--focus); outline-offset: var(--ring-offset); min-height: var(--tap); font-size: var(--fs-sm); }
.swipe-row__surface { touch-action: pan-y; }
