/* Swipeable card deck (binary gesture) — GitHub issue #90. Partial: app/views/shared/components/_swipe_deck.html.erb */
@layer components {

.swipe-deck__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.swipe-deck__item {
  margin: 0;
  position: relative;
  z-index: 1;
}

.swipe-deck__item.swipe-deck__item--dragging {
  z-index: 40;
}

/* Fixed area: hints behind; deck (surface + footer) slides over. overflow visible for vertical cone-drag. */
.swipe-deck__slot {
  position: relative;
  border-radius: var(--radius-md);
  overflow: visible;
  isolation: isolate;
}

.swipe-deck__deck {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md, 0 4px 6px -1px color-mix(in srgb, black 8%, transparent));
  border: 1px solid var(--color-border);
  touch-action: none;
  will-change: transform;
}

.swipe-deck__hint {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  padding: var(--space-3) var(--space-2);
}

.swipe-deck__hint--left {
  left: 0;
  background: linear-gradient(
    90deg,
    var(--color-warning-bg) 0%,
    color-mix(in srgb, var(--color-warning-bg) 70%, var(--color-warning-border)) 100%
  );
  color: var(--color-warning-text);
}

.swipe-deck__hint--right {
  right: 0;
  background: linear-gradient(
    270deg,
    var(--color-success-bg) 0%,
    color-mix(in srgb, var(--color-success-bg) 65%, var(--color-success)) 100%
  );
  color: var(--color-success);
}

.swipe-deck__hint-text {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.swipe-deck__surface {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--color-surface);
  padding: var(--space-4);
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--color-text) 4%, transparent);
}

.swipe-deck__footer {
  padding: var(--space-2) var(--space-3);
  /* Solid strip so hints never show through */
  background-color: var(--color-bg);
  background-image: none;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.swipe-deck__secondary-action {
  margin: 0;
  padding: 0.4rem 0.65rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0.72;
  transition:
    opacity var(--duration-fast) var(--ease-default),
    border-color var(--duration-fast) var(--ease-default),
    color var(--duration-fast) var(--ease-default);
}

.swipe-deck__secondary-action:hover {
  opacity: 1;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.swipe-deck__secondary-action:focus-visible {
  outline: 2px solid var(--color-primary, #ea580c);
  outline-offset: 2px;
}

}
