/* Cards Component Styles */

.cards-container {
  position: relative;
  display: flex;
  overflow: visible;
}

.cards-container.layout-spread {
  gap: 4px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.cards-container.layout-spread .cards-card {
  flex-shrink: 0;
}

.cards-container.layout-fan {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cards-card {
  background: white;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  position: relative;
  transition: transform 0.2s;
}

.cards-card.red {
  color: #dc2626;
}

.cards-card.black {
  color: #0f172a;
}

.cards-card .suit {
  font-size: 0.8em; /* Will be overridden by inline styles */
}

.cards-card.outline {
  background: transparent;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.cards-card.facedown {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  color: transparent;
}

.cards-card.facedown::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Small card specific */
.cards-card.facedown.size-S::before {
  inset: 2px;
  border-width: 1px;
}

/* Entry Animations */

@keyframes cards-deal {
  from {
    transform: translateX(-200px) rotate(0deg);
    opacity: 0;
  }
  to {
    transform: translateX(0) rotate(var(--card-rotation, 0deg));
    opacity: 1;
  }
}

@keyframes cards-unpile {
  0% {
    transform: translate(calc(50% - 50%), calc(50% - 50%)) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

/* Flip Animation */

@keyframes cards-flip {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

/* Scoop Animations */

@keyframes cards-scoop-collect {
  from {
    transform: translate(var(--original-x, 0), var(--original-y, 0)) rotate(var(--original-rotation, 0deg));
  }
  to {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
}

@keyframes cards-scoop-exit {
  from {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translateX(-300px) rotate(-20deg);
    opacity: 0;
  }
}
