/* SwipeToast.vanilla.css — SwipeToast.css (original, kept alongside) re-skinned to the contractor-app tokens. Class names unchanged. */
.swipe-toast {
  --st-bg: var(--text);       /* inverse of the page ground: AA in both themes */
  --st-ink: var(--bg);
  --st-fuse: var(--accent-d); /* bright accent on the inverse (dark-in-light) card; flipped for dark below */
  --st-fuse-h: 2px;
  --st-w: 26rem;
  --st-radius: var(--radius-md);
  --st-slide: 400ms;
  --st-gap: 10px;
  --st-offset: var(--space-4);
  --st-z: var(--z-toast);
  --st-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  display: grid;
  grid-template-rows: 1fr;
  width: min(var(--st-w), 100%);
  color: var(--st-ink);
  font-family: inherit;
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

.swipe-toast[data-inline='false'] {
  position: fixed;
  left: 50%;
  translate: -50% 0;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + var(--st-offset));
  z-index: var(--st-z);
  width: min(var(--st-w), calc(100vw - 2 * var(--st-offset)));
}

.swipe-toast[data-inline='true'] {
  transition: grid-template-rows var(--st-slide) var(--st-ease-out);
}

.swipe-toast[data-inline='true'][data-mounted='false'] {
  grid-template-rows: 0fr;
}

.swipe-toast[data-inline='true'][data-phase='closing'],
.swipe-toast[data-inline='true'][data-phase='gone'] {
  grid-template-rows: 0fr;
}

.swipe-toast[data-inline='true'][data-phase='closing'] {
  transition-duration: calc(var(--st-slide) * 0.7);
}

.swipe-toast[data-inline='true'][data-phase='gone'] {
  transition-duration: 200ms;
}

.swipe-toast__gate {
  min-height: 0;
}

.swipe-toast[data-inline='true'] .swipe-toast__lift {
  margin-top: var(--st-gap);
}

.swipe-toast__lift {
  opacity: 1;
  transform: translateY(0);
  transition:
    transform var(--st-slide) var(--st-ease-out),
    opacity calc(var(--st-slide) * 0.6) ease;
}

@starting-style {
  .swipe-toast[data-inline='true'] {
    grid-template-rows: 0fr;
  }

  .swipe-toast__lift {
    opacity: 0;
    transform: translateY(100%);
  }
}

.swipe-toast[data-mounted='false'] .swipe-toast__lift {
  opacity: 0;
  transform: translateY(100%);
}

.swipe-toast[data-phase='closing'] .swipe-toast__lift {
  opacity: 0;
  transform: translateY(100%);
  transition:
    transform calc(var(--st-slide) * 0.7) var(--st-ease-out),
    opacity calc(var(--st-slide) * 0.5) ease;
}

.swipe-toast[data-phase='gone'] .swipe-toast__lift {
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
}

.swipe-toast[data-instant] .swipe-toast__lift {
  transition-duration: 0s;
}

.swipe-toast__card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-3) var(--space-4);
  min-height: var(--tap);
  border-radius: var(--st-radius);
  overflow: hidden;
  background: var(--st-bg);
  box-shadow: var(--shadow-2);
  cursor: grab;
  outline: none;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.swipe-toast__card[data-swiping] {
  cursor: grabbing;
}

.swipe-toast[data-dismissible='false'] .swipe-toast__card {
  cursor: default;
  touch-action: auto;
}

.swipe-toast__icon {
  display: inline-flex;
  flex: none;
  width: 18px;
  height: 18px;
}

.swipe-toast__icon svg {
  width: 100%;
  height: 100%;
}

.swipe-toast__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.swipe-toast__title {
  font-weight: var(--fw-medium);
  line-height: 1.5;
}

.swipe-toast__desc {
  color: color-mix(in srgb, var(--st-ink) 78%, transparent);
  font-weight: var(--fw-regular);
  line-height: 1.4;
}

.swipe-toast__action,
.swipe-toast__close {
  flex: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  outline: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 160ms var(--st-ease-out),
    background-color 160ms ease,
    opacity 160ms ease;
}

.swipe-toast__action {
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--st-ink);
  color: var(--st-bg);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.swipe-toast__close {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
}

.swipe-toast__close::before {
  content: '';
  position: absolute;
  inset: 0;
}

.swipe-toast__action:active,
.swipe-toast__close:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .swipe-toast__action:hover {
    opacity: 0.88;
  }

  .swipe-toast__close:hover {
    background: color-mix(in srgb, var(--st-ink) 10%, transparent);
  }
}

.swipe-toast__fuse {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--st-fuse-h);
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--st-fuse) 18%, transparent) 9%,
    color-mix(in srgb, var(--st-fuse) 50%, transparent) 18%,
    color-mix(in srgb, var(--st-fuse) 84%, transparent) 28%,
    var(--st-fuse) 38%,
    var(--st-fuse) 62%,
    color-mix(in srgb, var(--st-fuse) 84%, transparent) 72%,
    color-mix(in srgb, var(--st-fuse) 50%, transparent) 82%,
    color-mix(in srgb, var(--st-fuse) 18%, transparent) 91%,
    transparent 100%
  );
  transform-origin: left center;
  pointer-events: none;
}

.swipe-toast[data-fuse='top'] .swipe-toast__fuse {
  top: 0;
  bottom: auto;
}

.swipe-toast[data-fuse='none'] .swipe-toast__fuse {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .swipe-toast__lift {
    transform: none !important;
    transition: opacity 200ms ease;
  }

  .swipe-toast__action:active,
  .swipe-toast__close:active {
    transform: none;
  }
}

/* --- token additions (not in the original) --- */
.swipe-toast__desc[hidden], .swipe-toast__action[hidden] { display: none; }
.swipe-toast[data-phase='gone'] { pointer-events: none; }
.swipe-toast__card:focus-visible,
.swipe-toast__action:focus-visible,
.swipe-toast__close:focus-visible {
  outline: var(--ring-w) solid var(--st-fuse);
  outline-offset: var(--ring-offset);
}
.swipe-toast__card:focus-visible { outline-color: var(--focus); }
:root[data-theme='dark'] .swipe-toast { --st-fuse: var(--accent-l); }
@media (prefers-color-scheme: dark) { :root[data-theme='auto'] .swipe-toast { --st-fuse: var(--accent-l); } }
