@value label from './sidebar-item.module.css';

.list {
    padding: var(--theme-spacing-sm) var(--theme-spacing-md);
}

.row {
    position: relative;
    display: flex;
    width: 100%;
    cursor: default;
    border-radius: var(--theme-radius-md);
}

.row-hover {
    .metadata,
    .compact-name {
        margin-right: 100px;
    }

    background-color: var(--theme-colors-surface);
}

.row-compact {
    align-items: center;
    padding: var(--theme-spacing-sm) var(--theme-spacing-md);
}

.compact-name {
    flex: 1;
    min-width: 0;
    padding:  0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.controls {
    position: absolute;
    top: 50%;
    right: var(--theme-spacing-xs);
    padding: var(--theme-spacing-md);
    background: var(--theme-colors-surface);
    transform: translateY(-50%);
}


.controls-compact {
    position: absolute;
    top: 50%;
    right: var(--theme-spacing-xs);
    flex-shrink: 0;
    padding: 0 var(--theme-spacing-sm);
    background: none;
    transform: translateY(-50%);
}


.row-dragged-over {
    border-radius: var(--mantine-radius-sm);
    box-shadow: 0 0 0 2px var(--theme-colors-primary);
    opacity: 0.8;
}

.row-group {
    display: flex;
    gap: var(--theme-spacing-md);
    align-items: center;
    width: 100%;
    height: 100%;
    padding: var(--theme-spacing-xs) var(--theme-spacing-md);
}

.metadata {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--theme-spacing-xs);
    min-width: 0;
    overflow: hidden;
}

.metadata-group {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--theme-spacing-md);
    align-items: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metadata-group-item {
    display: flex;
    flex-shrink: 1;
    flex-wrap: nowrap;
    gap: var(--theme-spacing-xs);
    align-items: center;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.metadata-group-item-no-shrink {
    flex-shrink: 0;
}

.metadata-group-item > * {
    flex-shrink: 0;
}

.metadata-group-item > *:last-child {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metadata-group-item-no-shrink > *:last-child {
    flex-shrink: 0;
    overflow: visible;
    text-overflow: clip;
}

.name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-container {
    flex-shrink: 0;
    width: 3rem;
    min-width: 3rem;
    height: 3rem;
}
