﻿/* The container for each card+button in the grid.
   This establishes the positioning context for the delete button. */
.tree-card-container {
    position: relative;
}

/* The delete button itself.
   'position: absolute' takes it out of the normal layout flow,
   so it won't push other grid items around. */
.btn-delete {
    position: absolute;
    top: 0px;
    right: 0px;
    z-index: 10; /* Ensures the button is on top of the card link */

    background-color: rgba(20, 20, 20, 0.7);
    /*border: none;*/
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Hide the button by default and fade it in on hover */
    opacity: 0;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

/* Show the delete button when hovering over its container */
.tree-card-container:hover .btn-delete {
    opacity: 1;
}

.btn-delete:hover {
    transform: scale(1.1);
}
