/* Deck Manager Drag-and-Drop Enhancements - Updated for New Card Layout */

/* Deck manager specific card sizing */
.deck-manager .card,
.deck-card {
    width: 120px;
    height: 168px;
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.deck-manager .card:hover,
.deck-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Deck manager card grid layout */
.deck-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 12px;
}

/* Card being actively dragged */
.card.dragging {
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    cursor: grabbing;
}

/* Ghost image styling */
.card-ghost {
    opacity: 0.6;
    transform: rotate(3deg);
}

/* Drop zone highlighting */
.card-list.drag-zone {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.card-list.drag-zone.drag-over {
    background-color: rgba(100, 149, 237, 0.15);
    /* Cornflower blue with low opacity */
    box-shadow: inset 0 0 10px rgba(100, 149, 237, 0.5);
}

/* Drop indicator for positioning */
.drop-indicator {
    height: 4px;
    margin: 4px 0;
    background-color: #4b8bf4;
    border-radius: 2px;
    animation: pulse 1.5s infinite;
    display: none;
    /* Hidden by default, shown when needed */
}

.drop-indicator.active {
    display: block;
}

/* Card position indicator for reordering */
.reorder-indicator {
    position: absolute;
    height: 4px;
    background-color: #fd7e14;
    z-index: 100;
    width: 100%;
    display: none;
}

.reorder-indicator.active {
    display: block;
}

/* Visual feedback for valid/invalid drop targets */
.valid-drop-target {
    outline: 2px solid rgba(40, 167, 69, 0.5);
    /* Green outline */
}

.invalid-drop-target {
    outline: 2px solid rgba(220, 53, 69, 0.5);
    /* Red outline */
}

/* Animations */
@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Add transition animations for cards being added or removed */
.card-enter {
    opacity: 0;
    transform: scale(0.8);
}

.card-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-exit {
    opacity: 1;
    transform: scale(1);
}

.card-exit-active {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Card reordering transitions */
.card-reordering {
    transition: transform 0.3s ease;
}

/* Remove card indicator */
.remove-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.3));
    border: 2px solid rgba(220, 53, 69, 0.4);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.2), inset 0 1px 3px rgba(220, 53, 69, 0.1);
    padding: 10px 20px;
    font-weight: bold;
    color: #dc3545;
    display: none;
    z-index: 5;
}

.remove-indicator.active {
    display: block;
}

/* Empty state styling */
.card-list.empty-list {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.08));
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 200px;
}

.empty-list-message {
    color: rgba(0, 0, 0, 0.5);
    font-style: italic;
}

/* Enhanced card count badge */
.deck-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #17a2b8;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}