/* /styles/moveable.css */

/* ############################### */
/*  Item dragging and deleting UI  */
/* ############################### */
.draggable-container {
    position: relative;
}

.draggable-item {
    position: relative;
    touch-action: auto;
}

.draggable-item.placeholder {
    opacity: 0.4;
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed var(--accent-red);
    border-radius: 16px;
    pointer-events: none;
}

.draggable-item.permanent-deleted {
    opacity: 0.4 !important;
    background: rgba(255, 59, 48, 0.1) !important;
    border: 2px dashed var(--accent-red) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    position: relative;
}

.draggable-item.permanent-deleted:hover {
    opacity: 0.7 !important;
    background: rgba(255, 59, 48, 0.2) !important;
    transform: scale(1.02) !important;
}

.draggable-item.permanent-deleted .fa-trash {
    font-size: 1.5em;
    margin-bottom: 0.5rem;
}

.draggable-container.drag-near-deleted .draggable-item.permanent-deleted {
    border-color: var(--accent-light-red);
    background: rgba(255, 59, 48, 0.2);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.floating-delete-zone {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 99;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
    opacity: 0;
    visibility: hidden;
}

.floating-delete-zone.visible {
    opacity: 1;
    visibility: visible;
}

.floating-delete-zone.active {
    background: linear-gradient(90deg, var(--accent-red), var(--accent-dark-red));
    color: white;
    transform: translateY(-5px);
}

.floating-delete-zone:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.floating-delete-zone.active:hover {
    background: linear-gradient(90deg, var(--accent-red), var(--accent-dark-red));
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .floating-delete-zone {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
    }
}

/* Fix for mobile hover state */
@media (hover: none) {
    .floating-delete-zone:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: none;
    }

    .floating-delete-zone.active:hover {
        background: linear-gradient(90deg, var(--accent-red), var(--accent-dark-red));
        transform: translateY(-5px);
    }
}

/* CRITICAL FIX:
 * Force all rows to have the same height based on the tallest item in the entire grid
 * to prevent vertical size mismatch when the item is being dragged because it causes
 * the entire row to expand vertically if the dragged item has higher height then any
 * items of that row which looks really odd.
*/
.achievements-grid,
.projects-grid {
    grid-auto-rows: 1fr;
}

.tech-grid {
    grid-auto-rows: 1fr;
}

